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"
17 #include "graphics/spaceTraits.hh"
18 
19 #include <map>
20 #include <memory>
21 
22 #define DEBUG_SPACE 0
23 
24 namespace concepts {
25 
26  // *************************************************************** Scanner **
28  template<>
29  class Scan<linDG3D::FvdgElement> : public Scan<ElementWithCell<Real> > {
30  public:
33  };
34 } // namespace concepts
35 
36 namespace 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 {
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 
81 
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 
123 namespace 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
Scanner * scan() const
Returns a new scanner over the elements in the space.
Definition: space.hh:54
Generic space of tetrahedral elements for FV/DGFE method.
Definition: space.hh:44
Space of piecewise constant functions on tetrahedrons.
Definition: space.hh:90
concepts::ElementPairList< Real > boundaryElmPairList_
Definition: space.hh:80
An abstract class for 3D meshes.
Definition: mesh.hh:112
Joiner class with multiple successors, i.e.
uint dim() const
Returns the dimension of the space.
Definition: space.hh:50
FvdgSpace(concepts::BoundaryConditions *bc)
Constructor.
Definition: space.hh:70
Generic tetrahedral element for FV/DG method.
Definition: element.hh:31
concepts::ElementPairList< Real > innerElmPairList_
Definition: space.hh:79
FvdgSpaceP1(concepts::Mesh3 &msh, concepts::BoundaryConditions *bc=0)
Constructor.
const concepts::ElementPairList< Real > & innerElmPairList() const
Returns a reference to the element pair list of the inner elements.
Definition: space.hh:62
virtual ~FvdgSpace()
Definition: space.hh:46
concepts::BoundaryConditions * bc_
Definition: space.hh:76
uint nelm() const
Returns the number of elements in the space.
Definition: space.hh:52
Traits for a space.
Definition: spaceTraits.hh:51
Graphics.
Definition: basis.hh:33
void createElementPairList_()
FvdgSpaceP0(concepts::Mesh3 &msh, concepts::BoundaryConditions *bc=0)
Constructor.
An abstract class for scanning a mesh (a set of cells) or a space (a set of elements).
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
linDG3D::FvdgElement & operator++(int)=0
Returns next element in scanned space.
concepts::Joiner< FvdgElement *, 1 > * elm_
Definition: space.hh:77
Abstract class for a space.
Definition: space.hh:81
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
DG-FEM methods to solve elliptic and hyperbolic PDE's.
Definition: bilinearForm.hh:18
static void destructor(Joiner< T, nlnk > *&j, bool values=true)
Static function to delete the list/tree.
concepts::Scan< FvdgElement > Scanner
Definition: space.hh:48
Space of piecewise linear functions on tetrahedrons.
Definition: space.hh:107
const concepts::ElementPairList< Real > & boundaryElmPairList() const
Returns a reference to the boundary element pair list.
Definition: space.hh:58
virtual std::ostream & info(std::ostream &os) const
Returns the dimension and the number of the elements in the space.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Scanner for a list of pointers.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich