elementPair.hh

Go to the documentation of this file.
1 
6 #ifndef dgElementPair_hh
7 #define dgElementPair_hh
8 
9 #include "basics/typedefs.hh"
10 #include "space/elementPairs.hh"
11 #include "element.hh"
12 
13 #include <vector>
14 
15 #define DEBUG_FILLDATA 0
16 #define DEBUG_FILLDATA_CONSISTENCY 0
17 
18 namespace linDG3D {
19  using concepts::Real;
20 
21  // ******************************************************* FvdgElementPair **
22 
27  class FvdgElementPair : public concepts::ElementPair<Real> {
28  public:
36  const FvdgElement& elm2,
37  uint faceIdx1, uint faceIdx2);
42  FvdgElementPair(const FvdgElement& elm, uint faceIdx);
43  virtual ~FvdgElementPair();
44 
45  virtual const FvdgElement& elm1() const { return elm1_; }
46  virtual const FvdgElement& elm2() const { return elm2_; }
47 
49  Real area() const { return area_; }
51  Real diam() const { return diam_; }
53  concepts::Real3d normal() const { return normal_; }
55  uint numPairs() const { return edgePairs_.size(); }
63  uint edgeIndex( uint elem, uint edge ) const;
71  void quadrature(std::vector<Real>& weights,
72  std::vector<concepts::Real3d>& xi0,
73  std::vector<concepts::Real3d>& xi1) const;
82  void quadrature(std::vector<Real>& weights,
83  std::vector<concepts::Real3d>& xi0,
84  std::vector<concepts::Real3d>& xi1,
85  std::vector<concepts::Real3d>& x) const;
87  uint faceIdx1() const { return faceIdx1_; };
89  uint faceIdx2() const { return faceIdx2_; };
90  private:
102  uint faceIdx1_;
104  uint faceIdx2_;
106  static std::vector<Real> weights_;
107  static std::vector<concepts::Real3d> zetaAbsc_;
109  std::vector<std::pair<uint, uint> > edgePairs_;
110  void fillData_();
114  void edgVtx_(concepts::Real3d* xEdge, concepts::Real3d* xVtx) const;
115  };
116 
117 } // namespace linDG3D
118 
119 #endif // dgElementPair_hh
uint faceIdx2() const
Returns the index of the face in element 2.
Definition: elementPair.hh:89
virtual const FvdgElement & elm2() const
Definition: elementPair.hh:46
Gives access to a pair of elements.
Definition: elementPairs.hh:25
Real diam() const
Returns the diameter of the common face.
Definition: elementPair.hh:51
concepts::Real3d normal() const
Returns the normal vector of the common face.
Definition: elementPair.hh:53
static concepts::Real3d xiEdge_[6]
Definition: elementPair.hh:108
FvdgElementPair(const FvdgElement &elm1, const FvdgElement &elm2, uint faceIdx1, uint faceIdx2)
Constructor.
const FvdgElement & elm1_
Element 1.
Definition: elementPair.hh:89
Generic tetrahedral element for FV/DG method.
Definition: element.hh:31
void quadrature(std::vector< Real > &weights, std::vector< concepts::Real3d > &xi0, std::vector< concepts::Real3d > &xi1) const
Returns the quadrature information for quadrature the face.
Real diam_
Diameter of the face.
Definition: elementPair.hh:98
FvdgElementPair(const FvdgElement &elm, uint faceIdx)
Constructor for boundary "pairs": here both elements are the same.
uint numPairs() const
Returns the number of common edges.
Definition: elementPair.hh:55
Real area() const
Returns the area of the common face.
Definition: elementPair.hh:49
Stores additional information about two adjacent elements, namely the index, area,...
Definition: elementPair.hh:27
uint faceIdx1() const
Returns the index of the face in element 1.
Definition: elementPair.hh:87
Real area_
Area of the face.
Definition: elementPair.hh:96
static std::vector< concepts::Real3d > zetaAbsc_
Definition: elementPair.hh:107
concepts::Real3d normal_
Normal of the face.
Definition: elementPair.hh:100
uint edgeIndex(uint elem, uint edge) const
Returns an edge index.
uint faceIdx1_
Index of face in element 1.
Definition: elementPair.hh:102
void quadrature(std::vector< Real > &weights, std::vector< concepts::Real3d > &xi0, std::vector< concepts::Real3d > &xi1, std::vector< concepts::Real3d > &x) const
Returns the quadrature information for quadrature the face.
static std::vector< Real > weights_
Quadrature weights.
Definition: elementPair.hh:106
uint faceIdx2_
Index of face in element 2.
Definition: elementPair.hh:104
DG-FEM methods to solve elliptic and hyperbolic PDE's.
Definition: bilinearForm.hh:18
virtual const FvdgElement & elm1() const
Definition: elementPair.hh:45
void edgVtx_(concepts::Real3d *xEdge, concepts::Real3d *xVtx) const
concepts::Real3d barycentric_(concepts::Real3d zeta, concepts::Real3d *xVtx) const
std::vector< std::pair< uint, uint > > edgePairs_
Definition: elementPair.hh:109
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
const FvdgElement & elm2_
Element 2.
Definition: elementPair.hh:94
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich