DUNE-FEM (unstable)

basisfunctionsets.hh
1#ifndef DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_BASISFUNCTIONSETS_HH
2#define DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_BASISFUNCTIONSETS_HH
3
4#include <utility>
5
7
8#include <dune/fem/space/basisfunctionset/default.hh>
9
10namespace Dune
11{
12
13 namespace Fem
14 {
15
16 // BasisFunctionSets
17 // -----------------
18
24 {
25 public:
30
37
46
49
57 int order () const;
58
60 int order ( const EntityType &entity ) const;
61
64
66 };
67
68
69
70 // DefaultBasisFunctionSets
71 // ------------------------
72
81 template< class GridPart, class ShapeFunctionSets >
83 {
85
86 public:
88 typedef GridPart GridPartType;
89
94
95 private:
96 static const int dimension = GridPartType::dimension;
97 static const int mydimension = ShapeFunctionSetType::FunctionSpaceType::dimDomain;
98 static const int codimension = dimension - mydimension;
99
100 public:
102 typedef typename GridPartType::template Codim< codimension >::EntityType EntityType;
103
106
107 public:
112 explicit DefaultBasisFunctionSets ( ShapeFunctionSetsType &&shapeFunctionSets )
113 : shapeFunctionSets_( std::move( shapeFunctionSets ) )
114 {}
115
116 template< class... Args, std::enable_if_t< std::is_constructible< ShapeFunctionSetsType, Args &&... >::value, int > = 0 >
117 explicit DefaultBasisFunctionSets ( Args &&... args )
118 : shapeFunctionSets_( std::forward< Args >( args )... )
119 {}
120
127 DefaultBasisFunctionSets ( const ThisType & ) = delete;
128 DefaultBasisFunctionSets ( ThisType &&other ) = default;
129
130 DefaultBasisFunctionSets &operator= ( const ThisType & ) = delete;
131 DefaultBasisFunctionSets &operator= ( ThisType && ) = delete;
132
140 int order () const { return shapeFunctionSets().order(); }
141
143 int order ( const EntityType &entity ) const { return shapeFunctionSets().order( entity.type() ); }
144
147 {
148 return BasisFunctionSetType( entity, shapeFunctionSets().shapeFunctionSet( entity.type() ) );
149 }
150
153 const ShapeFunctionSetsType &shapeFunctionSets () const { return shapeFunctionSets_; }
154 ShapeFunctionSetsType &shapeFunctionSets () { return shapeFunctionSets_; }
155
156 private:
157 ShapeFunctionSetsType shapeFunctionSets_;
158 };
159
160 } // namespace Fem
161
162} // namespace Dune
163
164#endif // #ifndef DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_BASISFUNCTIONSETS_HH
interface class representing a family of basis function sets
Definition: basisfunctionsets.hh:24
int order(const EntityType &entity) const
return order for given grid part entity
ImplementationDefined BasisFunctionSetType
basis function set
Definition: basisfunctionsets.hh:27
BasisFunctionSets & operator=(const BasisFunctionSets &)=delete
assignment constructor
int order() const
return maximum order
BasisFunctionSets(const BasisFunctionSets &)=delete
copy constructor
ImplementationDefined EntityType
entity type
Definition: basisfunctionsets.hh:29
BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
return basis function set for given entity
BasisFunctionSets(BasisFunctionSets &&)
move constructor
Definition: default.hh:124
generate a set of default basis function sets from given set of shape function sets
Definition: basisfunctionsets.hh:83
int order(const EntityType &entity) const
return maximum order
Definition: basisfunctionsets.hh:143
GridPart GridPartType
grid part type
Definition: basisfunctionsets.hh:88
int order() const
return maximum order
Definition: basisfunctionsets.hh:140
Dune::Fem::DefaultBasisFunctionSet< EntityType, ShapeFunctionSetType > BasisFunctionSetType
entity type
Definition: basisfunctionsets.hh:105
BasisFunctionSetType basisFunctionSet(const EntityType &entity) const
return basis function set for given entity
Definition: basisfunctionsets.hh:146
ShapeFunctionSets ShapeFunctionSetsType
shape function sets type
Definition: basisfunctionsets.hh:91
GridPartType::template Codim< codimension >::EntityType EntityType
entity type
Definition: basisfunctionsets.hh:102
ShapeFunctionSetsType::ShapeFunctionSetType ShapeFunctionSetType
shape function set type
Definition: basisfunctionsets.hh:93
interface class representing a family of shape function sets
Definition: shapefunctionsets.hh:33
int order() const
return maximum order
Documentation related stuff.
Dune namespace.
Definition: alignedallocator.hh:13
STL namespace.
Static tag representing a codimension.
Definition: dimension.hh:24
Dummy struct used for documentation purposes.
Definition: documentation.hh:42
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)