dune-fem 2.8.0
Loading...
Searching...
No Matches
storage.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_SPACE_LAGRANGE_STORAGE_HH
2#define DUNE_FEM_SPACE_LAGRANGE_STORAGE_HH
3
4// local includes
5#include "dofmappercode.hh"
6
7
8namespace Dune
9{
10
11 namespace Fem
12 {
13
14 // LagrangeMapperSingletonKey
15 // --------------------------
16
17 template< class GridPart, class LagrangePointSetContainer >
19 {
21
22 public:
23 typedef GridPart GridPartType;
24 typedef LagrangePointSetContainer LagrangePointSetContainerType;
25
28 const int polOrd )
29 : gridPart_( gridPart ),
30 pointSet_( pointSet ),
31 polOrd_( polOrd )
32 {
33 }
34
35 bool operator== ( const ThisType &other ) const
36 {
37 return ((&indexSet() == &other.indexSet()) && (polOrd_ == other.polOrd_));
38 }
39
40 bool operator!= ( const ThisType &other ) const
41 {
42 return !( *this == other );
43 }
44
45 const GridPartType &gridPart () const
46 {
47 return gridPart_;
48 }
49
50 const typename GridPartType::IndexSetType &indexSet () const
51 {
52 return gridPart().indexSet();
53 }
54
56 return pointSet_;
57 }
58
59 private:
60 const GridPartType &gridPart_;
61 const LagrangePointSetContainerType &pointSet_;
62 const int polOrd_;
63 };
64
65
66
67 // LagrangeMapperSingletonFactory
68 // ------------------------------
69
70 template< class Key, class Object >
72 {
73 typedef typename Key::LagrangePointSetContainerType LagrangePointSetContainerType;
74
75 static Object *createObject ( const Key &key )
76 {
78 return new Object( key.gridPart(), codeFactory );
79 }
80
81 static void deleteObject ( Object *obj )
82 {
83 delete obj;
84 }
85 };
86
87 } // namespace Fem
88
89} // namespace Dune
90
91#endif // #ifndef DUNE_FEM_SPACE_LAGRANGE_STORAGE_HH
Definition: bindguard.hh:11
Definition: dofmappercode.hh:25
Definition: storage.hh:19
bool operator!=(const ThisType &other) const
Definition: storage.hh:40
LagrangePointSetContainer LagrangePointSetContainerType
Definition: storage.hh:24
const GridPartType::IndexSetType & indexSet() const
Definition: storage.hh:50
bool operator==(const ThisType &other) const
Definition: storage.hh:35
const GridPartType & gridPart() const
Definition: storage.hh:45
const LagrangePointSetContainerType & pointSet() const
Definition: storage.hh:55
GridPart GridPartType
Definition: storage.hh:23
LagrangeMapperSingletonKey(const GridPartType &gridPart, const LagrangePointSetContainerType &pointSet, const int polOrd)
Definition: storage.hh:26
Key::LagrangePointSetContainerType LagrangePointSetContainerType
Definition: storage.hh:73
static void deleteObject(Object *obj)
Definition: storage.hh:81
static Object * createObject(const Key &key)
Definition: storage.hh:75