DUNE-FEM (unstable)

dofmapper.hh
1#ifndef DUNE_FEM_SPACE_FOURIER_DOFMAPPER_HH
2#define DUNE_FEM_SPACE_FOURIER_DOFMAPPER_HH
3
4#include <cstddef>
5
6#include <dune/fem/space/mapper/dofmapper.hh>
7
8namespace Dune
9{
10
11 namespace Fem
12 {
13
14 // Internal forward declaration
15 // ----------------------------
16
17 template< class GridPart, int order > class FourierDofMapper;
18
19
20
21 // FourierDofMapperTraits
22 // ----------------------
23
24 template< class GridPart, int order >
25 struct FourierDofMapperTraits
26 {
27 typedef FourierDofMapper< GridPart, order > DofMapperType;
28
29 typedef GridPart GridPartType;
30 typedef typename GridPartType::template Codim< 0 >::EntityType ElementType;
31
32 typedef std::size_t SizeType;
33 };
34
35
36
37 // FourierDofMapper
38 // ----------------
39
40 template< class GridPart, int order >
41 class FourierDofMapper
42 : public AdaptiveDofMapper< FourierDofMapperTraits< GridPart, order > >
43 {
44 typedef FourierDofMapper< GridPart, order > ThisType;
45 typedef AdaptiveDofMapper< FourierDofMapperTraits< GridPart, order > > BaseType;
46
47 public:
48 typedef typename BaseType::Traits Traits;
49 typedef typename BaseType::ElementType ElementType;
50 typedef typename BaseType::GlobalKeyType GlobalKeyType;
51 typedef typename BaseType::SizeType SizeType;
52
53
55 // DofMapper interface methods //
57
59 static SizeType size () { return 1; }
60
62 static bool contains ( int codim ) { return false; }
63
65 static bool fixedDataSize ( int codim ) { return true; }
66
68 template< class Functor >
69 static void mapEach ( const ElementType &element, Functor f )
70 {
71 f( 0, 0 );
72 }
73
75 template< class Entity, class Functor >
76 static void mapEachEntityDof ( const Entity &entity, Functor f )
77 {}
78
80 static SizeType maxNumDofs () { return size(); }
81
83 static SizeType numDofs ( const ElementType &element ) { return size(); }
84
86 template< class Entity >
87 static SizeType numEntityDofs ( const Entity &entity )
88 {
89 return 0;
90 }
91
92
94 // AdaptviveDofMapper interface methods //
96
98 SizeType numberOfHoles ( const int block ) const { return SizeType( 0 ); }
99
101 GlobalKeyType oldIndex ( const int hole, const int block ) const
102 {
103 DUNE_THROW( Dune::NotImplemented, "Method oldIndex() not implemented yet" );
104 }
105
107 GlobalKeyType newIndex ( const int hole, const int block ) const
108 {
109 DUNE_THROW( Dune::NotImplemented, "Method newIndex() not implemented yet" );
110 }
111
113 bool consecutive () const { return true; }
114
116 SizeType oldOffSet ( const int block ) const { return SizeType( 0 ); }
117
119 SizeType offSet ( const int block ) const { return SizeType( 0 ); }
120
122 SizeType numBlocks () const { return SizeType( 1 ); }
123 };
124
125 } // namespace Fem
126
127} // namespace Dune
128
129#endif // #ifndef DUNE_FEM_SPACE_FOURIER_DOFMAPPER_HH
SizeType GlobalKeyType
at the moment this should be similar to SizeType
Definition: dofmapper.hh:230
BaseType::SizeType SizeType
type of size integer
Definition: dofmapper.hh:227
int maxNumDofs() const
obtain maximal number of DoFs on one entity
Definition: dofmapper.hh:152
SizeType numEntityDofs(const Entity &entity) const
obtain number of DoFs actually belonging to an entity
Definition: dofmapper.hh:185
SizeType numDofs(const ElementType &element) const
obtain number of DoFs on an entity
Definition: dofmapper.hh:164
void mapEach(const ElementType &element, Functor f) const
map each local DoF number to a global key
Definition: dofmapper.hh:116
Traits::ElementType ElementType
type of codimension 0 entities
Definition: dofmapper.hh:54
bool fixedDataSize(const int codim) const
Check, whether the data in a codimension has fixed size.
Definition: dofmapper.hh:86
void mapEachEntityDof(const Entity &entity, Functor f) const
map each local DoF number to a global key
Definition: dofmapper.hh:145
Default exception for dummy implementations.
Definition: exceptions.hh:263
#define DUNE_THROW(E, m)
Definition: exceptions.hh:218
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::integral_constant< std::size_t, sizeof...(II)> size(std::integer_sequence< T, II... >)
Return the size of the sequence.
Definition: integersequence.hh:75
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 27, 22:29, 2024)