DUNE-FEM (unstable)

localfunctionsetadapter.hh
1#ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSETADAPTER_HH
2#define DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSETADAPTER_HH
3
4#include <cassert>
5#include <cstddef>
6
7#include <dune/fem/common/coordinate.hh>
8#include <dune/fem/storage/entitygeometry.hh>
9
10namespace Dune
11{
12
13 namespace Fem
14 {
15
16 // LocalFunctionSetAdapter
17 // -----------------------
18
26 template< class Entity, class FunctionSet >
28 : public EntityGeometryStorage< Entity >
29 {
30 protected:
32
33 public:
36
38 typedef typename BaseType::Geometry Geometry;
39
42
45
54
56 : BaseType(),
57 functionSet_( functionSet )
58 {}
59
61 : BaseType( entity ), functionSet_( functionSet )
62 {}
63
65 int order () const { return functionSet_.order(); }
66
67 using BaseType :: entity;
68 using BaseType :: geometry;
69 using BaseType :: bind;
70 using BaseType :: unbind;
71
73 std::size_t size () const { return functionSet().size(); }
74
76 template< class Point, class Functor >
77 void evaluateEach ( const Point &x, Functor functor ) const
78 {
79 DomainType y = geometry().global( coordinate( x ) );
80 functionSet().evaluateEach( y, functor );
81 }
82
84 template< class Point, class Functor >
85 void jacobianEach ( const Point &x, Functor functor ) const
86 {
87 DomainType y = geometry().global( coordinate( x ) );
88 functionSet().jacobianEach( y, functor );
89 }
90
92 template< class Point, class Functor >
93 void hessianEach ( const Point &x, Functor functor ) const
94 {
95 DomainType y = geometry().global( coordinate( x ) );
96 functionSet().hessianEach( y, functor );
97 }
98
99 // Non-interface methods
100 // ---------------------
101
103 const FunctionSetType functionSet () const { return functionSet_; }
104
105 private:
106 FunctionSetType functionSet_;
107 };
108
109 } // namespace Fem
110
111} // namespace Dune
112
113#endif // #ifndef DUNE_FEM_FUNCTION_LOCALFUNCTION_LOCALFUNCTIONSETADAPTER_HH
Wrapper class for entities.
Definition: entity.hh:66
implementation of entity and geometry storage for basis function set and local functions
Definition: entitygeometry.hh:35
const Entity & entity() const
return entity
Definition: entitygeometry.hh:101
const Geometry & geometry() const
return geometry
Definition: entitygeometry.hh:111
void unbind()
release entity and geometry object
Definition: entitygeometry.hh:164
void bind(const EntityType &entity)
set new entity object and geometry if enabled
Definition: entitygeometry.hh:135
EntityType::Geometry Geometry
type of geometry
Definition: entitygeometry.hh:42
Definition: explicitfieldvector.hh:75
Global basis functions.
Definition: functionset.hh:26
int order() const
return order of basis functions
std::size_t size() const
return number of basis functions
void evaluateEach(const DomainType &x, Functor functor) const
void hessianEach(const DomainType &x, Functor functor) const
void jacobianEach(const DomainType &x, Functor functor) const
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
A vector valued function space.
Definition: functionspace.hh:60
Dune namespace.
Definition: alignedallocator.hh:13
convert (global) function set to local function set
Definition: localfunctionsetadapter.hh:29
FunctionSet FunctionSetType
function set type
Definition: localfunctionsetadapter.hh:41
FunctionSpaceType::HessianRangeType HessianRangeType
hessian range type
Definition: localfunctionsetadapter.hh:53
BaseType::EntityType EntityType
entity type
Definition: localfunctionsetadapter.hh:35
void evaluateEach(const Point &x, Functor functor) const
Definition: localfunctionsetadapter.hh:77
const FunctionSetType functionSet() const
return function set
Definition: localfunctionsetadapter.hh:103
void jacobianEach(const Point &x, Functor functor) const
Definition: localfunctionsetadapter.hh:85
FunctionSpaceType::JacobianRangeType JacobianRangeType
jacobian range type
Definition: localfunctionsetadapter.hh:51
FunctionSpaceType::DomainType DomainType
domain type
Definition: localfunctionsetadapter.hh:47
int order() const
return order of basis functions
Definition: localfunctionsetadapter.hh:65
BaseType::Geometry Geometry
geometry
Definition: localfunctionsetadapter.hh:38
void hessianEach(const Point &x, Functor functor) const
Definition: localfunctionsetadapter.hh:93
std::size_t size() const
return number of basis functions
Definition: localfunctionsetadapter.hh:73
FunctionSet::FunctionSpaceType FunctionSpaceType
function space type
Definition: localfunctionsetadapter.hh:44
FunctionSpaceType::RangeType RangeType
range type
Definition: localfunctionsetadapter.hh:49
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)