DUNE-FEM (unstable)

function.hh
1#ifndef DUNE_FEM_FUNCTION_HH
2#define DUNE_FEM_FUNCTION_HH
3
4// dune-common includes
6
7// dune-fem includes
8#include <dune/fem/misc/bartonnackmaninterface.hh>
9#include <dune/fem/operator/common/mapping.hh>
10#include <dune/fem/version.hh>
11
12
13namespace Dune
14{
15
16 namespace Fem
17 {
18
42 template< class FunctionSpaceImp, class FunctionImp >
44 : public BartonNackmanInterface< Function< FunctionSpaceImp, FunctionImp >,
45 FunctionImp >,
46 public Mapping < typename FunctionSpaceImp :: DomainFieldType,
47 typename FunctionSpaceImp :: RangeFieldType,
48 typename FunctionSpaceImp :: DomainType,
49 typename FunctionSpaceImp :: RangeType >
50 {
52 typedef BartonNackmanInterface< ThisType, FunctionImp > BaseType;
53
54 public:
56 typedef FunctionSpaceImp FunctionSpaceType;
57
59 typedef FunctionImp FunctionType;
60
73
77
78 protected:
79 using BaseType::asImp;
80
82 Function () = default;
83
84 Function ( const ThisType& ) = default;
85
86 public:
87 ThisType& operator= ( const ThisType& ) = delete;
88
90 virtual ~Function ()
91 {}
92
97 virtual void operator()(const DomainType & arg, RangeType & dest) const
98 {
99 evaluate(arg,dest);
100 }
101
107 void evaluate ( const DomainType &x, RangeType &value ) const
108 {
110 }
111
118 {
120 }
121
127 void hessian ( const DomainType &x, HessianRangeType &hessian ) const
128 {
130 }
131
132 private:
137 virtual void apply (const DomainType& arg, RangeType& dest) const
138 {
139 operator()(arg, dest);
140 }
141 };
142
144
145 } // namespace Fem
146
147} // namespace Dune
148
149#endif // #ifndef DUNE_FEM_FUNCTION_HH
#define CHECK_AND_CALL_INTERFACE_IMPLEMENTATION(__interface_method_to_call__)
Definition: bartonnackmanifcheck.hh:61
Definition: explicitfieldvector.hh:75
ExplicitFieldVector< FieldMatrix< RangeFieldType, dimDomain, dimDomain >, dimRange > HessianRangeType
Intrinsic type used for the hessian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:79
FunctionSpaceTraits::DomainFieldType DomainFieldType
Intrinsic type used for values in the domain field (usually a double)
Definition: functionspaceinterface.hh:60
FunctionSpaceTraits::RangeType RangeType
Type of range vector (using type of range field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:71
FunctionSpaceTraits::LinearMappingType JacobianRangeType
Intrinsic type used for the jacobian values has a Dune::FieldMatrix type interface.
Definition: functionspaceinterface.hh:75
FunctionSpaceTraits::DomainType DomainType
Type of domain vector (using type of domain field) has a Dune::FieldVector type interface.
Definition: functionspaceinterface.hh:67
FunctionSpaceTraits::RangeFieldType RangeFieldType
Intrinsic type used for values in the range field (usually a double)
Definition: functionspaceinterface.hh:63
Abstract class representing a function.
Definition: function.hh:50
FunctionSpaceImp FunctionSpaceType
type of function space this function belongs to
Definition: function.hh:56
Mapping< DomainFieldType, RangeFieldType, DomainType, RangeType > MappingType
type of mapping base class
Definition: function.hh:76
virtual ~Function()
destructor
Definition: function.hh:90
FunctionSpaceType::DomainType DomainType
domain type
Definition: function.hh:66
virtual void operator()(const DomainType &arg, RangeType &dest) const
application operator call evaluate
Definition: function.hh:97
FunctionSpaceType::RangeType RangeType
range type
Definition: function.hh:68
void evaluate(const DomainType &x, RangeType &value) const
evaluate the function
Definition: function.hh:107
FunctionImp FunctionType
type of the implementation (Barton-Nackman)
Definition: function.hh:59
FunctionSpaceType::RangeFieldType RangeFieldType
field type of range
Definition: function.hh:64
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian type
Definition: function.hh:70
void jacobian(const DomainType &x, JacobianRangeType &jacobian) const
evaluate the Jacobian of the function
Definition: function.hh:117
FunctionSpaceType::DomainFieldType DomainFieldType
field type of domain
Definition: function.hh:62
void hessian(const DomainType &x, HessianRangeType &hessian) const
evaluate the hessian of the function
Definition: function.hh:127
Function()=default
default constructor
FunctionSpaceType::HessianRangeType HessianRangeType
hessian type
Definition: function.hh:72
A mapping from one vector space into another This class describes a general mapping from the domain v...
Definition: mapping.hh:47
Implements a vector constructed from a given type representing a field and a compile-time given size.
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)