Go to the documentation of this file.00001
00002
00003 #ifndef elementPairDG1D_hh
00004 #define elementPairDG1D_hh
00005
00006 #include "basics/typedefs.hh"
00007 #include "space/elementPairs.hh"
00008 #include "linearFEM/element1D.hh"
00009
00010
00011 #include "basics/debug.hh"
00012
00013 #define DGElementPairConstr_D 0
00014
00015 namespace linDG1D {
00016
00017 using concepts::Real;
00018
00019
00020
00025 class DGElementPair : public concepts::ElementPair<Real> {
00026 public:
00033 DGElementPair(const linearFEM::Line& elm1, const uint idx1,
00034 const linearFEM::Line& elm2, const uint idx2) :
00035 elm1_(elm1), elm2_(elm2), idx1_(idx1), idx2_(idx2),
00036 size1_(0), size2_(0) {
00037 DEBUGL(DGElementPairConstr_D, elm1 << ", " << elm2);
00038 }
00045 DGElementPair(const linearFEM::Line& elm, const uint idx,
00046 const Real size1, const Real size2) :
00047 elm1_(elm), elm2_(elm), idx1_(idx), idx2_(idx),
00048 size1_(size1), size2_(size2) {
00049 DEBUGL(DGElementPairConstr_D, "Element 1:" << size1 << ", Element2:"
00050 << size2);
00051 }
00052 virtual const linearFEM::Line& elm1() const { return elm1_; }
00053 virtual const linearFEM::Line& elm2() const { return elm2_; }
00055 uint idx1() const { return idx1_; }
00057 uint idx2() const { return idx2_; }
00059 Real size1() const { return size1_; }
00061 Real size2() const { return size2_; }
00062 private:
00063 const linearFEM::Line& elm1_;
00064 const linearFEM::Line& elm2_;
00065 const uint idx1_;
00066 const uint idx2_;
00067 const Real size1_, size2_;
00068 };
00069
00070 }
00071
00072 #endif // elementPairDG1D_hh