elementPair.hh

Go to the documentation of this file.
1 
6 #ifndef elementPairDG1D_hh
7 #define elementPairDG1D_hh
8 
9 #include "basics/typedefs.hh"
10 #include "space/elementPairs.hh"
11 #include "linearFEM/element1D.hh"
12 
13 // debugging
14 #include "basics/debug.hh"
15 
16 #define DGElementPairConstr_D 0
17 
18 namespace linDG1D {
19 
20  using concepts::Real;
21 
22  // ********************************************************* DGElementPair **
23 
28  class DGElementPair : public concepts::ElementPair<Real> {
29  public:
36  DGElementPair(const linearFEM::Line& elm1, const uint idx1,
37  const linearFEM::Line& elm2, const uint idx2) :
39  size1_(0), size2_(0) {
41  }
48  DGElementPair(const linearFEM::Line& elm, const uint idx,
49  const Real size1, const Real size2) :
50  elm1_(elm), elm2_(elm), idx1_(idx), idx2_(idx),
52  DEBUGL(DGElementPairConstr_D, "Element 1:" << size1 << ", Element2:"
53  << size2);
54  }
55  virtual const linearFEM::Line& elm1() const { return elm1_; }
56  virtual const linearFEM::Line& elm2() const { return elm2_; }
58  uint idx1() const { return idx1_; }
60  uint idx2() const { return idx2_; }
62  Real size1() const { return size1_; }
64  Real size2() const { return size2_; }
65  private:
68  const uint idx1_;
69  const uint idx2_;
70  const Real size1_, size2_;
71  };
72 
73 } // namespace linDG1D
74 
75 #endif // elementPairDG1D_hh
const linearFEM::Line & elm1_
Definition: elementPair.hh:66
Gives access to a pair of elements.
Definition: elementPairs.hh:25
DGElementPair(const linearFEM::Line &elm, const uint idx, const Real size1, const Real size2)
Constructor.
Definition: elementPair.hh:48
Real size1() const
Returns size of the first element.
Definition: elementPair.hh:62
Element pair for DG FEM.
Definition: elementPair.hh:28
uint idx2() const
Returns index of the vertex in the second element.
Definition: elementPair.hh:60
#define DEBUGL(doit, msg)
Real size2() const
Returns size of the second element.
Definition: elementPair.hh:64
virtual const linearFEM::Line & elm1() const
Definition: elementPair.hh:55
DGElementPair(const linearFEM::Line &elm1, const uint idx1, const linearFEM::Line &elm2, const uint idx2)
Constructor.
Definition: elementPair.hh:36
#define DGElementPairConstr_D
Definition: elementPair.hh:16
DG FEM for 1D problems using piecewise linear shape functions.
Definition: bilinearForm.hh:13
uint idx1() const
Returns index of the vertex in the first element.
Definition: elementPair.hh:58
Line element with linear shape function in 1D.
Definition: element1D.hh:34
const linearFEM::Line & elm2_
Definition: elementPair.hh:67
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
virtual const linearFEM::Line & elm2() const
Definition: elementPair.hh:56
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich