DUNE-FEM (unstable)

hierarchiclegendre.hh
1#ifndef DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_HLEGENDRE_HH
2#define DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_HLEGENDRE_HH
3
4#include <cassert>
5
7
8#include <dune/grid/common/gridenums.hh>
9
10#include <dune/fem/common/hybrid.hh>
11#include <dune/fem/gridpart/common/capabilities.hh>
12#include <dune/fem/space/common/capabilities.hh>
13#include <dune/fem/space/common/commoperations.hh>
14#include <dune/fem/space/common/defaultcommhandler.hh>
15#include <dune/fem/space/common/functionspace.hh>
16#include <dune/fem/space/shapefunctionset/legendre.hh>
17#include <dune/fem/space/shapefunctionset/selectcaching.hh>
18
19#include "legendre.hh"
20
21namespace Dune
22{
23
24 namespace Fem
25 {
26
27 // HierarchicalLegendreDiscontinuousGalerkinSpace
28 // ----------------------------------------------
29
30 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
31 class HierarchicLegendreDiscontinuousGalerkinSpace
32 : public LegendreDiscontinuousGalerkinSpaceBase< FunctionSpace, GridPart, polOrder, Storage, true >
33 {
34 // hierarchicalOrdering = true
35 typedef LegendreDiscontinuousGalerkinSpaceBase< FunctionSpace, GridPart, polOrder, Storage, true > BaseType;
36 typedef HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > ThisType;
37
38 public:
39 typedef typename BaseType::GridPartType GridPartType;
40 typedef typename BaseType::EntityType EntityType;
41 typedef DiscontinuousGalerkinLocalInterpolation< ThisType > InterpolationType;
42 typedef InterpolationType InterpolationImplType;
43
44 explicit HierarchicLegendreDiscontinuousGalerkinSpace ( GridPartType &gridPart,
45 const InterfaceType commInterface = InteriorBorder_All_Interface,
46 const CommunicationDirection commDirection = ForwardCommunication )
47 : BaseType( gridPart, commInterface, commDirection )
48 {}
49
50 InterpolationType interpolation () const
51 {
52 return InterpolationType( *this );
53 }
54
55 [[deprecated("Use LocalInterpolation( space ) instead!")]]
56 InterpolationType interpolation ( const EntityType &entity ) const
57 {
58 return interpolation();
59 }
60
61 InterpolationType localInterpolation () const
62 {
63 return interpolation();
64 }
65 InterpolationType localInterpolation (const EntityType &entity) const
66 {
67 return interpolation();
68 }
69
70
71 };
72
73 namespace Capabilities
74 {
75
76 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
77 struct hasFixedPolynomialOrder< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
78 {
79 static const bool v = true;
80 };
81
82 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
83 struct hasStaticPolynomialOrder< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
84 {
85 static const bool v = true;
86 static const int order = polOrder;
87 };
88
89 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
90 struct isContinuous< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
91 {
92 static const bool v = false;
93 };
94
95 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
96 struct isLocalized< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
97 {
98 static const bool v = true;
99 };
100
101 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
102 struct isAdaptive< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
103 {
104 static const bool v = true;
105 };
106
107 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
108 struct threadSafe< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
109 {
110 static const bool v = false;
111 };
112
113 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
114 struct viewThreadSafe< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
115 {
116 static const bool v = true;
117 };
118
119 template< class FunctionSpace, class GridPart, int polOrder, class Storage >
120 struct isHierarchic< HierarchicLegendreDiscontinuousGalerkinSpace< FunctionSpace, GridPart, polOrder, Storage > >
121 {
122 static const bool v = true;
123 };
124
125 } // namespace Capabilities
126
127 } // namespace Fem
128
129} // namespace Dune
130
131#endif // #ifndef DUNE_FEM_SPACE_DISCONTINUOUSGALERKIN_HLEGENDRE_HH
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:170
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:86
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:171
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:88
Dune namespace.
Definition: alignedallocator.hh:13
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)