dune-fem
2.4.1-rc
|
LocalAnalyticalFunctionBinder binds a C++ local analytical function (and also its Jacobian and Hessian) to an object which provides all the methods and types needed by the LocalFunctionAdapter. It stores a copy to the local analytical function. More...
#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/common/localfunctionadapter.hh>
Public Types | |
typedef DiscreteFunctionSpaceImpl | DiscreteFunctionSpaceType |
typedef AnalyticalFunctionImpl | AnalyticalFunctionType |
typedef LocalAnalyticalFunctionBinder< DiscreteFunctionSpaceType, AnalyticalFunctionType > | ThisType |
typedef DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
typedef DiscreteFunctionSpaceType::GridPartType | GridPartType |
typedef DiscreteFunctionSpaceType::EntityType | EntityType |
typedef FunctionSpaceType::DomainType | DomainType |
typedef FunctionSpaceType::RangeType | RangeType |
typedef FunctionSpaceType::JacobianRangeType | JacobianRangeType |
typedef FunctionSpaceType::HessianRangeType | HessianRangeType |
Public Member Functions | |
LocalAnalyticalFunctionBinder (const AnalyticalFunctionType &f) | |
constructor (without jacobian and without hessian) More... | |
LocalAnalyticalFunctionBinder (const AnalyticalFunctionType &f, const AnalyticalFunctionType &j) | |
constructor (without hessian) More... | |
LocalAnalyticalFunctionBinder (const AnalyticalFunctionType &f, const AnalyticalFunctionType &j, const AnalyticalFunctionType &h) | |
constructor More... | |
template<class PointType > | |
void | evaluate (const PointType &x, RangeType &ret) const |
evaluate local function More... | |
template<class PointType > | |
void | jacobian (const PointType &x, JacobianRangeType &ret) const |
evaluate jacobian local function More... | |
template<class PointType > | |
void | hessian (const PointType &x, HessianRangeType &ret) const |
evaluate hessian local function More... | |
void | init (const EntityType &entity) |
initialize to new entity More... | |
void | init (const EntityType &entity, double time) |
initialize to new entity and to new time More... | |
template<typename... Args> | |
void | initialize (const Args &..., double time) |
set time More... | |
const EntityType & | entity () const |
get entity More... | |
LocalAnalyticalFunctionBinder binds a C++ local analytical function (and also its Jacobian and Hessian) to an object which provides all the methods and types needed by the LocalFunctionAdapter. It stores a copy to the local analytical function.
Therefore, in order to transform the function
RangeType f(const DomainType& x,const double& t,const EntityType& entity) { // do stuff }
into a grid function, it is sufficient to pass it to the LocalAnalyticalFucntionBinder
typedef LocalAnalyticalFunctionBinder<DiscreteFunctionSpaceType> LocalAnalyticalFunctionType; LocalAnalyticalFunctionType localAnalyticalFunction(f);
and create the LocalFunctionAdapter
typedef LocalFunctionAdapter<LocalAnalyticalFunctionType> AdaptedFunctionType; AdaptedFunctionType fAdapted("adapted function",localAnalyticalFunction,gridPart);