dune-fem 2.8.0
Loading...
Searching...
No Matches
combinedspace/combinedspace.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_SPACE_COMBINEDSPACE_COMBINEDSPACE_HH
2#define DUNE_FEM_SPACE_COMBINEDSPACE_COMBINEDSPACE_HH
3
4#include <map>
5#include <type_traits>
6#include <vector>
7
8#include <dune/fem/version.hh>
9
14
15
16namespace Dune
17{
18
19 namespace Fem
20 {
21
31 template< class DiscreteFunctionSpace, int N, DofStoragePolicy policy >
33
38 template< class DiscreteFunctionSpace, int N >
40 : public DiscreteFunctionSpace::template ToNewDimRange< DiscreteFunctionSpace::dimRange *N >::Type
41 {
43 typedef typename DiscreteFunctionSpace::template ToNewDimRange< DiscreteFunctionSpace::dimRange *N >::Type BaseType;
44
45 static const DofStoragePolicy policy = PointBased;
46
47 public:
48 typedef typename BaseType::GridPartType GridPartType;
50
52 const InterfaceType commInterface = InteriorBorder_All_Interface,
53 const CommunicationDirection commDirection = ForwardCommunication )
54 : BaseType( gridPart, commInterface, commDirection ),
55 containedSpace_( gridPart, commInterface, commDirection )
56 {}
57
58 CombinedSpace ( const ThisType& ) = delete;
59 ThisType& operator= ( const ThisType& ) = delete;
60
61 //- Additional methods
63 int numComponents () const
64 {
65 return N;
66 }
67
70 {
71 return policy;
72 }
73
76 {
77 return containedSpace_;
78 }
79
80 private:
81 ContainedDiscreteFunctionSpaceType containedSpace_;
82 };
83
84
85 template< class DiscreteFunctionSpace, int N >
87 : public PowerDiscreteFunctionSpace< DiscreteFunctionSpace, N >
88 {
91
92 static const DofStoragePolicy policy = VariableBased;
93
94 public:
97
99 const InterfaceType commInterface = InteriorBorder_All_Interface,
100 const CommunicationDirection commDirection = ForwardCommunication )
101 : BaseType( gridPart, commInterface, commDirection )
102 {}
103
104 CombinedSpace ( const ThisType& ) = delete;
105 ThisType& operator= ( const ThisType& ) = delete;
106
107 //- Additional methods
109 int numComponents () const
110 {
111 return N;
112 }
113
116 {
117 return policy;
118 }
119
122 {
123 return BaseType::containedSpace();
124 }
125 };
126
127
128
129 // specialization of DifferentDiscreteFunctionSpace for this CombinedSapce
130 template< class ContainedSpace, int N, DofStoragePolicy policy, class NewFunctionSpace >
131 struct DifferentDiscreteFunctionSpace< CombinedSpace< ContainedSpace, N, policy >, NewFunctionSpace >
132 {
134 };
135
136
137 // DefaultLocalRestrictProlong ( specialization for CombinedSpace< DiscreteFunctionSpace, N, VariableBased > )
138 template< class DiscreteFunctionSpace, int N >
140 : public DefaultLocalRestrictProlong< typename DiscreteFunctionSpace::template ToNewDimRange< DiscreteFunctionSpace::dimRange *N >::Type >
141 {
144
145 public:
147 : BaseType( space )
148 {}
149 };
150
151
152 // DefaultLocalRestrictProlong ( specialization for CombinedSpace< DiscreteFunctionSpace, N, VariableBased > )
153 template< class DiscreteFunctionSpace, int N >
155 : public PowerLocalRestrictProlong< DiscreteFunctionSpace, N >
156 {
159
160 public:
162 : BaseType( space.containedSpace() )
163 {}
164 };
165
168 } // namespace Fem
169
170} // namespace Dune
171
172#endif // #ifndef DUNE_FEM_SPACE_COMBINEDSPACE_COMBINEDSPACE_HH
Definition: bindguard.hh:11
DofStoragePolicy
Definition: dofstorage.hh:16
@ PointBased
Definition: dofstorage.hh:16
@ VariableBased
Definition: dofstorage.hh:16
Definition: combinedspace/combinedspace.hh:32
Combined Space Function Space.
Definition: combinedspace/combinedspace.hh:41
int numComponents() const
number of components
Definition: combinedspace/combinedspace.hh:63
CombinedSpace(GridPartType &gridPart, const InterfaceType commInterface=InteriorBorder_All_Interface, const CommunicationDirection commDirection=ForwardCommunication)
Definition: combinedspace/combinedspace.hh:51
DofStoragePolicy myPolicy() const
policy of this space
Definition: combinedspace/combinedspace.hh:69
BaseType::GridPartType GridPartType
Definition: combinedspace/combinedspace.hh:48
DiscreteFunctionSpace ContainedDiscreteFunctionSpaceType
Definition: combinedspace/combinedspace.hh:49
const ContainedDiscreteFunctionSpaceType & containedSpace() const
contained space
Definition: combinedspace/combinedspace.hh:75
Definition: combinedspace/combinedspace.hh:88
int numComponents() const
number of components
Definition: combinedspace/combinedspace.hh:109
CombinedSpace(GridPartType &gridPart, const InterfaceType commInterface=InteriorBorder_All_Interface, const CommunicationDirection commDirection=ForwardCommunication)
Definition: combinedspace/combinedspace.hh:98
const ContainedDiscreteFunctionSpaceType & containedSpace() const
contained space
Definition: combinedspace/combinedspace.hh:121
BaseType::GridPartType GridPartType
Definition: combinedspace/combinedspace.hh:95
BaseType::ContainedDiscreteFunctionSpaceType ContainedDiscreteFunctionSpaceType
Definition: combinedspace/combinedspace.hh:96
DofStoragePolicy myPolicy() const
policy of this space
Definition: combinedspace/combinedspace.hh:115
CombinedSpace< ContainedSpace, NewFunctionSpace::dimRange, policy > Type
Definition: combinedspace/combinedspace.hh:133
DefaultLocalRestrictProlong(const CombinedSpace< DiscreteFunctionSpace, N, PointBased > &space)
Definition: combinedspace/combinedspace.hh:146
DefaultLocalRestrictProlong(const CombinedSpace< DiscreteFunctionSpace, N, VariableBased > &space)
Definition: combinedspace/combinedspace.hh:161
Definition: powerlocalrestrictprolong.hh:24
Definition: powerspace.hh:150
Traits::GridPartType GridPartType
type of grid part
Definition: powerspace.hh:158
Definition: discretefunctionspace.hh:133
Definition: common/localrestrictprolong.hh:16
discrete function space