1 #ifndef DUNE_FEM_COMBINEDDOFSTORAGE_HH 2 #define DUNE_FEM_COMBINEDDOFSTORAGE_HH 16 template<
class ContainedMapper,
int N, DofStoragePolicy policy >
22 template<
class ContainedMapper ,
int N >
34 const int numComponents )
35 : BaseType( numComponents )
40 template<
class ContainedMapper,
int N >
74 return combinedIndex / containedSize();
80 return combinedIndex % containedSize();
87 return containedIndex + (component * containedSize());
93 return mapper_.size();
99 template<
class MapperImp,
int N, DofStoragePolicy policy >
116 const unsigned int component )
118 component_( component ),
123 assert(component_ < N);
127 mapper_(other.mapper_),
128 component_(other.component_),
129 utilGlobal_(other.utilGlobal_)
131 assert(component_ < N);
135 inline unsigned int size ()
const {
136 return mapper_.size();
138 inline unsigned int range ()
const {
141 inline const unsigned int operator[] (
unsigned int index )
const 143 utilGlobal_.newSize( mapper_.size() );
144 return utilGlobal_.combinedDof(index, component_);
148 ThisType& operator=(
const ThisType& other);
150 const ContainedMapperType& mapper_;
151 const unsigned int component_;
152 mutable DofConversionType utilGlobal_;
159 #endif // #ifndef DUNE_FEM_COMBINEDDOFSTORAGE_HH ContainedMapper ContainedMapperType
Definition: combineddofstorage.hh:44
ContainedMapper ContainedMapperType
Definition: combineddofstorage.hh:27
Specialisation for PointBased approach.
Definition: dofstorage.hh:101
int containedDof(int combinedIndex) const
Number of the (scalar) base function belonging to base function index.
Definition: combineddofstorage.hh:78
unsigned int size() const
Total number of degrees of freedom.
Definition: combineddofstorage.hh:135
CombinedDofConversionUtility(const ContainedMapperType &mapper, const int numComponents)
Definition: combineddofstorage.hh:33
int combinedDof(int containedIndex, int component) const
Definition: combineddofstorage.hh:85
Definition: dofstorage.hh:16
static DofStoragePolicy policy()
Find out what type of policy this is.
Definition: combineddofstorage.hh:61
CombinedSubMapper(const ContainedMapperType &mapper, const unsigned int component)
Definition: combineddofstorage.hh:115
const ContainedMapperType & mapper_
Definition: combineddofstorage.hh:47
unsigned int range() const
Definition: combineddofstorage.hh:138
Definition: combineddofstorage.hh:17
Definition: coordinate.hh:4
MapperImp ContainedMapperType
Definition: combineddofstorage.hh:105
CombinedDofConversionUtility< ContainedMapperType, N, policy > DofConversionType
Definition: combineddofstorage.hh:111
CombinedDofConversionUtility(const ContainedMapperType &mapper, int size)
constructor
Definition: combineddofstorage.hh:55
void newSize(int size)
Set new size after adaptation.
Definition: combineddofstorage.hh:67
Definition: dofstorage.hh:16
int containedSize() const
Definition: combineddofstorage.hh:91
Definition: combineddofstorage.hh:100
Abstract index mapper interface.
Definition: subarray.hh:16
int component(int combinedIndex) const
Definition: combineddofstorage.hh:72
CombinedSubMapper(const ThisType &other)
Definition: combineddofstorage.hh:126
DofStoragePolicy
Definition: dofstorage.hh:16