Class documentation of Concepts

Loading...
Searching...
No Matches
spaceTraits.hh
Go to the documentation of this file.
1
6#ifndef spaceTraits_hh
7#define spaceTraits_hh
8
9#include "basics/typedefs.hh"
10
11namespace hp2D {
12 class Space;
13}
14
15namespace hp3D {
16 class Space;
17}
18
19namespace linearFEM {
20 class Linear2d;
21 class Linear3d;
22}
23
24namespace vectorial {
25 template<typename F>
26 class Space;
27}
28
29namespace graphics {
30
31 // ********************************************************** Space traits **
32
50 template<typename space>
51 struct spaceTraits {};
52
54 template<>
55 struct spaceTraits<hp2D::Space> {
56 static inline uint dim() { return 2; }
57 static inline bool positionConnection() { return false; }
58 static inline bool boundaryElements() { return false; }
59 };
60
62 template<>
63 struct spaceTraits<hp3D::Space> {
64 static inline uint dim() { return 3; }
65 static inline bool positionConnection() { return false; }
66 static inline bool boundaryElements() { return false; }
67 };
68
70 template<>
71 struct spaceTraits<linearFEM::Linear2d> {
72 static inline uint dim() { return 2; }
73 static inline bool positionConnection() { return false; }
74 static inline bool boundaryElements() { return false; }
75 };
76
78 template<>
79 struct spaceTraits<linearFEM::Linear3d> {
80 static inline uint dim() { return 3; }
81 static inline bool positionConnection() { return false; }
82 static inline bool boundaryElements() { return false; }
83 };
84
86 template<>
87 struct spaceTraits<vectorial::Space<concepts::Real> > {
88 static inline uint dim() { return dim_; }
89 static inline bool positionConnection() { return posCon_; }
90 static inline bool boundaryElements() { return bem_; }
91 static uint dim_;
92 static bool posCon_;
93 static bool bem_;
94 static inline void setDim(uint dim) { dim_ = dim; }
95 static inline void setposCon(bool posCon) { posCon_ = posCon; }
96 static inline void setBEM(bool bem) { bem_ = bem; }
97 };
98
99} // namespace graphics
100
101#endif // spaceTraits_hh
Definition bem.hh:18
Definition meshDX.hh:23