Class documentation of Concepts

Loading...
Searching...
No Matches
space.hh
Go to the documentation of this file.
1
6#ifndef dgSpace_hh
7#define dgSpace_hh
8
9#include "basics/typedefs.hh"
10#include "element.hh"
11#include "elementPair.hh"
12#include "space/space.hh"
13#include "space/elementPairs.hh"
16#include "geometry/mesh.hh"
18
19#include <map>
20#include <memory>
21
22#define DEBUG_SPACE 0
23
24namespace concepts {
25
26 // *************************************************************** Scanner **
28 template<>
29 class Scan<linDG3D::FvdgElement> : public Scan<ElementWithCell<Real> > {
30 public:
33 };
34} // namespace concepts
35
36namespace linDG3D {
37 using concepts::Real;
38
39// ****************************************************************** Spaces **
40
44 class FvdgSpace : public concepts::SpaceOnCells<Real> {
45 public:
46 virtual ~FvdgSpace()
50 uint dim() const { return dim_; }
52 uint nelm() const { return nelm_; }
54 Scanner* scan() const {
55 return new concepts::PListScan<FvdgElement>(*elm_);
56 }
59 return boundaryElmPairList_;
60 }
63 return innerElmPairList_;
64 }
65
66 protected:
71 dim_(0), nelm_(0), bc_(bc), elm_(0), innerElmPairList_(0) {};
73 virtual std::ostream& info(std::ostream& os) const;
74 uint dim_;
75 uint nelm_;
78
79 concepts::ElementPairList<Real> innerElmPairList_;
80 concepts::ElementPairList<Real> boundaryElmPairList_;
81
82 void createElementPairList_();
83 };
84
85 //************************************************************ FvdgSpaceP0 **
90 class FvdgSpaceP0 : public FvdgSpace {
91 public:
97 protected:
99 virtual std::ostream& info(std::ostream& os) const;
100 };
101
102 //************************************************************ FvdgSpaceP1 **
107 class FvdgSpaceP1 : public FvdgSpace {
108 public:
114 protected:
116 virtual std::ostream& info(std::ostream& os) const;
117 };
118
119} // namespace linDG3D
120
121// *********************************************** Space Traits for Graphics **
122
123namespace graphics {
125 template<>
126 struct spaceTraits<linDG3D::FvdgSpace> {
127 static inline uint dim() { return 3; }
128 static inline bool positionConnection() { return false; }
129 static inline bool boundaryElements() { return false; }
130 };
132 template<>
133 struct spaceTraits<linDG3D::FvdgSpaceP0> {
134 static inline uint dim() { return 3; }
135 static inline bool positionConnection() { return false; }
136 static inline bool boundaryElements() { return false; }
137 };
139 template<>
140 struct spaceTraits<linDG3D::FvdgSpaceP1> {
141 static inline uint dim() { return 3; }
142 static inline bool positionConnection() { return false; }
143 static inline bool boundaryElements() { return false; }
144 };
145} // namespace graphics
146
147#endif // dgSpace_hh
static void destructor(Joiner< T, nlnk > *&j, bool values=true)
linDG3D::FvdgElement & operator++(int)=0
Returns next element in scanned space.
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
FvdgSpaceP0(concepts::Mesh3 &msh, concepts::BoundaryConditions *bc=0)
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
FvdgSpaceP1(concepts::Mesh3 &msh, concepts::BoundaryConditions *bc=0)
const concepts::ElementPairList< Real > & boundaryElmPairList() const
Returns a reference to the boundary element pair list.
Definition space.hh:58
Scanner * scan() const
Returns a new scanner over the elements in the space.
Definition space.hh:54
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
FvdgSpace(concepts::BoundaryConditions *bc)
Definition space.hh:70
uint dim() const
Returns the dimension of the space.
Definition space.hh:50
const concepts::ElementPairList< Real > & innerElmPairList() const
Returns a reference to the element pair list of the inner elements.
Definition space.hh:62
uint nelm() const
Returns the number of elements in the space.
Definition space.hh:52
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320