Class documentation of Concepts

Loading...
Searching...
No Matches
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"
12
13// debugging
14#include "basics/debug.hh"
15
16#define DGElementPairConstr_D 0
17
18namespace linDG1D {
19
20 using concepts::Real;
21
22 // ********************************************************* DGElementPair **
23
28 class DGElementPair : public concepts::ElementPair<Real> {
29 public:
37 const linearFEM::Line& elm2, const uint idx2) :
38 elm1_(elm1), elm2_(elm2), idx1_(idx1), idx2_(idx2),
39 size1_(0), size2_(0) {
40 DEBUGL(DGElementPairConstr_D, elm1 << ", " << elm2);
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),
51 size1_(size1), size2_(size2) {
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:
66 const linearFEM::Line& elm1_;
67 const linearFEM::Line& elm2_;
68 const uint idx1_;
69 const uint idx2_;
70 const Real size1_, size2_;
71 };
72
73} // namespace linDG1D
74
75#endif // elementPairDG1D_hh
DGElementPair(const linearFEM::Line &elm, const uint idx, const Real size1, const Real size2)
Real size1() const
Returns size of the first element.
virtual const linearFEM::Line & elm2() const
Returns reference to the second element.
DGElementPair(const linearFEM::Line &elm1, const uint idx1, const linearFEM::Line &elm2, const uint idx2)
virtual const linearFEM::Line & elm1() const
Returns reference to the first element.
uint idx1() const
Returns index of the vertex in the first element.
Real size2() const
Returns size of the second element.
uint idx2() const
Returns index of the vertex in the second element.
#define DEBUGL(doit, msg)
Definition debug.hh:40
double Real
Definition typedefs.hh:39