1 #ifndef DUNE_FEM_FUNCTION_COMMON_INSTATIONARY_HH 2 #define DUNE_FEM_FUNCTION_COMMON_INSTATIONARY_HH 31 template<
class FunctionSpace,
class Function >
59 double time ()
const {
return time_; }
71 namespace __InstationaryFunction
77 template<
class Function >
80 explicit HoldCopy (
Function function )
84 const Function &
get ()
const noexcept {
return function_; }
95 template<
class Function >
98 explicit HoldReference (
const Function &
function )
99 : function_(
function )
102 const Function &
get ()
const noexcept {
return function_.get(); }
105 std::reference_wrapper< const Function > function_;
110 #endif // #ifndef DOXYGEN 153 template<
class >
class StoragePolicy = __InstationaryFunction::HoldCopy >
155 :
public BasicInstationaryFunction< typename Function::FunctionSpaceType, InstationaryFunction< Function, StoragePolicy > >,
156 private StoragePolicy< Function >
159 typedef StoragePolicy< Function > StoragePolicyType;
171 StoragePolicyType( function )
176 StoragePolicyType(
std::
move( function ) )
211 template<
class Function >
216 return InstationaryFunctionType(
std::move(
function ), time );
219 template<
class Function >
224 return InstationaryFunctionType(
function.
get(), time );
231 #endif // #ifndef DUNE_FEM_FUNCTION_COMMON_INSTATIONARY_HH
BaseType::DomainType DomainType
domain type
Definition: instationary.hh:163
void evaluate(const DomainType &x, typename BaseType::RangeType &value) const
evaluate the function
Definition: instationary.hh:186
InstationaryFunction< Function, __InstationaryFunction::HoldCopy > instationaryFunction(Function function, double time)
Definition: instationary.hh:213
InstationaryFunction(Function &&function, double time)
Definition: instationary.hh:174
FunctionSpaceType::DomainType DomainType
domain type
Definition: function.hh:66
void jacobian(const DomainType &x, JacobianRangeType &jacobian) const
evaluate the Jacobian of the function
Definition: function.hh:121
void hessian(const DomainType &x, HessianRangeType &hessian) const
evaluate the hessian of the function
Definition: function.hh:131
double time() const
return set time
Definition: instationary.hh:59
FunctionSpaceType::RangeType RangeType
range type
Definition: function.hh:68
void jacobian(const DomainType &x, typename BaseType::JacobianRangeType &jacobian) const
evaluate the Jacobian of the function
Definition: instationary.hh:192
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type
Definition: function.hh:70
double setTime(double time)
set time to give value
Definition: instationary.hh:56
Definition: coordinate.hh:4
void move(ArrayInterface< T > &array, const unsigned int oldOffset, const unsigned int newOffset, const unsigned int length)
Definition: array_inline.hh:38
Function()
default constructor
Definition: function.hh:82
implementation of a Dune::Fem::Function taking an instationary function
Definition: instationary.hh:154
InstationaryFunction(const Function &function, double time)
Definition: instationary.hh:169
void hessian(const DomainType &x, typename BaseType::HessianRangeType &hessian) const
evaluate the hessian of the function
Definition: instationary.hh:198
Abstract class representing a function.
Definition: function.hh:43
basic wrapper class (still a CRTP) for instationary functions
Definition: instationary.hh:32
FunctionSpaceType::HessianRangeType HessianRangeType
hessian type
Definition: function.hh:72
BasicInstationaryFunction(double time)
Definition: instationary.hh:40
void evaluate(const DomainType &x, RangeType &value) const
evaluate the function
Definition: function.hh:111