dune-fem  2.4.1-rc
Public Types | List of all members
Dune::Fem::InstationaryFunction< Function, StoragePolicy > Class Template Reference

implementation of a Dune::Fem::Function taking an instationary function More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/common/instationary.hh>

Inheritance diagram for Dune::Fem::InstationaryFunction< Function, StoragePolicy >:
Inheritance graph

Public Types

typedef BaseType::DomainType DomainType
 domain type More...
 

Public Member Functions

Constructon
 InstationaryFunction (const Function &function, double time)
 
 InstationaryFunction (Function &&function, double time)
 
Public member methods
void evaluate (const DomainType &x, typename BaseType::RangeType &value) const
 evaluate the function More...
 
void jacobian (const DomainType &x, typename BaseType::JacobianRangeType &jacobian) const
 evaluate the Jacobian of the function More...
 
void hessian (const DomainType &x, typename BaseType::HessianRangeType &hessian) const
 evaluate the hessian of the function More...
 
Set time
double setTime (double time)
 set time to give value More...
 
double time () const
 return set time More...
 

Detailed Description

template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
class Dune::Fem::InstationaryFunction< Function, StoragePolicy >

implementation of a Dune::Fem::Function taking an instationary function

It is assumed that all evaluation methods are present on the parameter function and have a second parameter for the time:

void Function::evaluate(const DomainType &x, double time, RangeType &value) const;
void Function::jacobian(const DomainType &x, double time, JacobianRangeType &value) const;
void Function::hessian(const DomainType &x, double time, HessianRangeType &value) const;

Users may prescribe how the parameter function is stored by providing a second template parameter, the storage policy. The policy is class that must be constructible from a function object or reference and that has a single method:

const Function &Policy::get() const;

The default policy is to copy the function parameter. The free-standing method

may be used to conveniently create a new instance of InstationaryFunction. Use

auto g = instationaryFunction( std::cref( f ), 0. );

to create an instationary function that holds a reference to f instead of a copy.

Template Parameters
Functionan instationary function
StoragePolicystorage policy

Member Typedef Documentation

template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
typedef BaseType::DomainType Dune::Fem::InstationaryFunction< Function, StoragePolicy >::DomainType

domain type

Constructor & Destructor Documentation

template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
Dune::Fem::InstationaryFunction< Function, StoragePolicy >::InstationaryFunction ( const Function function,
double  time 
)
inline
template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
Dune::Fem::InstationaryFunction< Function, StoragePolicy >::InstationaryFunction ( Function &&  function,
double  time 
)
inline

Member Function Documentation

template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
void Dune::Fem::InstationaryFunction< Function, StoragePolicy >::evaluate ( const DomainType x,
typename BaseType::RangeType value 
) const
inline

evaluate the function

Parameters
[in]xevaluation point
[out]valuevalue of the function in x
template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
void Dune::Fem::InstationaryFunction< Function, StoragePolicy >::hessian ( const DomainType x,
typename BaseType::HessianRangeType hessian 
) const
inline

evaluate the hessian of the function

Parameters
[in]xevaluation point
[out]hessianvalue of the hessian in x
template<class Function, template< class > class StoragePolicy = __InstationaryFunction::HoldCopy>
void Dune::Fem::InstationaryFunction< Function, StoragePolicy >::jacobian ( const DomainType x,
typename BaseType::JacobianRangeType jacobian 
) const
inline

evaluate the Jacobian of the function

Parameters
[in]xevaluation point
[out]jacobianvalue of the Jacobian in x
double Dune::Fem::BasicInstationaryFunction< Function::FunctionSpaceType , InstationaryFunction< Function, StoragePolicy > >::setTime ( double  time)
inlineinherited

set time to give value

Parameters
[in]timetime to be used
Returns
set time
double Dune::Fem::BasicInstationaryFunction< Function::FunctionSpaceType , InstationaryFunction< Function, StoragePolicy > >::time ( ) const
inlineinherited

The documentation for this class was generated from the following file: