https://mooseframework.inl.gov
PeriodicFunction.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "Function.h"
13 #include "FunctionInterface.h"
14 
15 class PeriodicFunction : public Function, protected FunctionInterface
16 {
17 public:
20 
21  using Function::value;
22  virtual Real value(Real t, const Point & p) const override;
23  virtual ADReal value(const ADReal & t, const ADPoint & p) const override;
24 
25 private:
28 
31 
33  const Real _period_x;
34 
36  const Real _period_y;
37 
39  const Real _period_z;
40 
47  template <typename T, typename P>
48  T valueInternal(const T & t, const P & p) const;
49 };
const Real _period_z
Period for repetition of the base function in the z direction.
Base class for function objects.
Definition: Function.h:36
T valueInternal(const T &t, const P &p) const
Templated function where the actual computation of the value as a function of time and spatial coordi...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:47
PeriodicFunction(const InputParameters &parameters)
const Real _period_y
Period for repetition of the base function in the y direction.
const Real _period_time
Period for repetition of the base function in time.
static InputParameters validParams()
const Function & _base_function
Function used as a basis for the periodic function.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _period_x
Period for repetition of the base function in the x direction.
const InputParameters & parameters() const
Get the parameters of the object.
virtual Real value(Real t, const Point &p) const
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...
Definition: Function.C:44
Interface for objects that need to use functions.
virtual Real value(Real t, const Point &p) const override
Override this to evaluate the scalar function at point (t,x,y,z), by default this returns zero...