dune-fem 2.12-git
Loading...
Searching...
No Matches
hpdg/orthogonal.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_ORTHOGONAL_HH
2#define DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_ORTHOGONAL_HH
3
5
7
13
16
17#include "blockmapper.hh"
18#include "space.hh"
19
20namespace Dune
21{
22
23 namespace Fem
24 {
25
26 namespace hpDG
27 {
28
29 // Internal forward declaration
30 // ----------------------------
31
32 template< class FunctionSpace, class GridPart, int order, class Storage = Fem::CachingStorage >
33 class OrthogonalDiscontinuousGalerkinSpace;
34
35
36
37#ifndef DOXYGEN
38
39 // OrthogonalDiscontinuousGalerkinSpaceTraits
40 // ------------------------------------------
41
42 template< class FunctionSpace, class GridPart, int order, class Storage >
43 struct OrthogonalDiscontinuousGalerkinSpaceTraits
44 {
45 using DiscreteFunctionSpaceType = hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, order, Storage >;
46
47 using FunctionSpaceType = FunctionSpace;
48
49 using GridPartType = GridPart;
50
51 using BasisFunctionSetsType = hpDG::OrthogonalBasisFunctionSets< FunctionSpaceType, GridPartType, order, Storage >;
52 using BasisFunctionSetType = typename BasisFunctionSetsType::BasisFunctionSetType;
53
54 static const int codimension = BasisFunctionSetType::EntityType::codimension;
55
56 using BlockMapperType = hpDG::DiscontinuousGalerkinBlockMapper< GridPartType, BasisFunctionSetsType >;
57 static const int localBlockSize = BasisFunctionSetsType::localBlockSize;
58 static_assert( localBlockSize == FunctionSpace::dimRange, " dimRange prob ");
59
60 typedef Hybrid::IndexRange< int, localBlockSize > LocalBlockIndices;
61
62 template< class DiscreteFunction, class Operation = Dune::Fem::DFCommunicationOperation::Copy >
63 struct CommDataHandle
64 {
65 using OperationType = Operation;
67 };
68 };
69
70#endif // #ifndef DOXYGEN
71
72
73
74 // OrthogonalDiscontinuousGalerkinSpace
75 // ------------------------------------
76
86 template< class FunctionSpace, class GridPart, int order, class Storage >
88 : public hpDG::DiscontinuousGalerkinSpace< OrthogonalDiscontinuousGalerkinSpaceTraits< FunctionSpace, GridPart, order, Storage > >
89 {
91
92 public:
93
94 static const int polynomialOrder = order ;
95
99 using KeyType = typename BaseType::KeyType;
100
102 const KeyType initialOrder,
105 : BaseType( gridPart, BasisFunctionSetsType{}, initialOrder, interface, direction )
106 {
107 }
108
115
116 template <class Function,
119 decltype(Function(std::declval<const EntityType>()))>::value,int> i=0>
125 };
126
127 } // namespace hpDG
128
130 template <class FunctionSpaceImp,
131 class GridPartImp,
132 int polOrd,
133 class Storage,
134 class VolumeQuadratureImp>
136 hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpaceImp, GridPartImp, polOrd, Storage >, VolumeQuadratureImp >
138 hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpaceImp, GridPartImp, polOrd, Storage >, VolumeQuadratureImp >
139 {
142 public:
143 using BaseType::BaseType;
144 };
145
146
147#ifndef DOXYGEN
148
149 // DefaultLocalRestrictProlong
150 // ---------------------------
151
152 template< class FunctionSpace, class GridPart, int order, class Storage >
153 class DefaultLocalRestrictProlong< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, order, Storage > >
154 : public DiscontinuousGalerkinLocalRestrictProlong< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, order, Storage >, false >
155 {
157
158 public:
159 explicit DefaultLocalRestrictProlong ( const typename BaseType::DiscreteFunctionSpaceType &space )
160 : BaseType( space )
161 {}
162 };
163
164
165#endif // #ifndef DOXYGEN
166
167
168 namespace Capabilities
169 {
171 // hpDG::OrthogonalDiscontinuousGalerkinSpace
173
174 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
175 struct hasStaticPolynomialOrder< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
176 {
177 static const bool v = true;
178 static const int order = polOrder;
179 };
180
181 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
182 struct isLocalized< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
183 {
184 static const bool v = true;
185 };
186
187 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
188 struct isAdaptive< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
189 {
190 static const bool v = true;
191 };
192
193 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
194 struct isPAdaptiveSpace< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
195 {
196 static const bool v = true;
197 };
198
199 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
200 struct viewThreadSafe< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
201 {
202 static const bool v = true;
203 };
204
205 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
206 struct isHierarchic< hpDG::OrthogonalDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
207 {
208 static const bool v = true;
209 };
210
211 } // namespace Capabilities
212
213
214 } // namespace Fem
215
216} // namespace Dune
217
218#endif // #ifndef DUNE_FEM_HPDG_SPACE_DISCONTINUOUSGALERKIN_ORTHOGONAL_HH
CommunicationDirection
InterfaceType
ForwardCommunication
InteriorBorder_All_Interface
Abstract class representing a function.
Definition common/function.hh:50
Local Mass Matrix inversion implementation, select the correct method in your implementation.
Definition localmassmatrix.hh:37
Local Mass Matrix for arbitrary spaces.
Definition localmassmatrix.hh:967
DG Local Mass Matrix for arbitrary spaces.
Definition localmassmatrix.hh:987
specialize with true if polynomial order fixed and compile time static
Definition space/common/capabilities.hh:37
static const bool v
Definition space/common/capabilities.hh:38
static const int order
Definition space/common/capabilities.hh:39
specialize with true if the space is localized, * i.e., the basis function set is based on a shape fu...
Definition space/common/capabilities.hh:68
static const bool v
Definition space/common/capabilities.hh:69
specialize with true if space can be used with AdaptiveDiscreteFunction
Definition space/common/capabilities.hh:81
static const bool v
Definition space/common/capabilities.hh:82
specialize with true if space can be used with p-adaptation
Definition space/common/capabilities.hh:93
static const bool v
Definition space/common/capabilities.hh:94
specialize with true if the space implementation is thread safe, while it is not modified
Definition space/common/capabilities.hh:119
static const bool v
Definition space/common/capabilities.hh:120
specialize with true if for a space the basis functions are sorted by the polynomial order,...
Definition space/common/capabilities.hh:131
static const bool v
Definition space/common/capabilities.hh:132
Default communication handler for discrete functions.
Definition defaultcommhandler.hh:38
GridPartType & gridPart() const
Definition discretefunctionspace.hh:766
Definition common/localrestrictprolong.hh:16
Definition discontinuousgalerkin/localrestrictprolong.hh:31
Implementation of an -adaptive discrete function space using orthogonal polynomials.
Definition hpdg/orthogonal.hh:89
typename BaseType::KeyType KeyType
Definition hpdg/orthogonal.hh:99
typename BaseType::BasisFunctionSetsType BasisFunctionSetsType
Definition hpdg/orthogonal.hh:98
typename BaseType::GridPartType GridPartType
Definition hpdg/orthogonal.hh:96
typename BaseType::EntityType EntityType
Definition hpdg/orthogonal.hh:97
OrthogonalDiscontinuousGalerkinSpace(GridPartType &gridPart, const KeyType initialOrder, const Dune::InterfaceType interface=Dune::InteriorBorder_All_Interface, const Dune::CommunicationDirection direction=Dune::ForwardCommunication)
Definition hpdg/orthogonal.hh:101
OrthogonalDiscontinuousGalerkinSpace(GridPartType &gridPart, const Dune::InterfaceType interface=Dune::InteriorBorder_All_Interface, const Dune::CommunicationDirection direction=Dune::ForwardCommunication)
Definition hpdg/orthogonal.hh:109
static const int polynomialOrder
Definition hpdg/orthogonal.hh:94
Generic implementation of a -adaptive discontinuous finite element space.
Definition hpdg/space.hh:46
typename Traits::BasisFunctionSetsType BasisFunctionSetsType
basis function sets type
Definition hpdg/space.hh:56
typename BasisFunctionSetsType::KeyType KeyType
key type identifying a basis function set
Definition hpdg/space.hh:58
T forward(T... args)