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 
11 namespace hp2D {
12  class Space;
13 }
14 
15 namespace hp3D {
16  class Space;
17 }
18 
19 namespace linearFEM {
20  class Linear2d;
21  class Linear3d;
22 }
23 
24 namespace vectorial {
25  template<typename F>
26  class Space;
27 }
28 
29 namespace 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
Vector valued space.
Definition: spaceTraits.hh:26
Vector valued problems.
Definition: spaceTraits.hh:24
2D hp-FEM for H1-conforming elements.
Space for linear FEM in 3D using tetrahedra.
Definition: space3D.hh:39
Traits for a space.
Definition: spaceTraits.hh:51
Graphics.
Definition: basis.hh:33
Linear FEM in 1D, 2D and 3D.
Definition: spaceTraits.hh:19
Used for the basic classes of the boundary element method.
Definition: bform.hh:13
Space for linear triangular and bilinear quadrilateral FEM in 2D.
Definition: space2D.hh:44
3D hp-FEM for H1-conforming elements.
Definition: meshDX.hh:23
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich