00001 // edge information for linear DG FEM in 2D 00002 00003 #ifndef EdgeInfo_hh 00004 #define EdgeInfo_hh 00005 00006 #include <basics.hh> 00007 #include <geometry.hh> 00008 00009 #include "triangle.hh" 00010 00011 namespace test { 00012 class DGEdgeInfoTest; 00013 class DGSpace2dP1Test; 00014 } 00015 00016 namespace linDG2D { 00017 00018 using concepts::Real; 00019 00020 // ************************************************************** EdgeInfo ** 00021 00028 class EdgeInfo { 00029 public: 00030 friend class test::DGEdgeInfoTest; 00031 friend class test::DGSpace2dP1Test; 00033 EdgeInfo(); 00035 void addCell(const concepts::Triangle2d* cell, const uint idx); 00039 const concepts::Triangle2d* cell(uint i) const { return cells_[i]; } 00043 uint idx(uint i) const { return idxs_[i]; } 00045 const concepts::Edge& edge() const { 00046 return *(cells_[0]->connector().edge(idxs_[0])); 00047 } 00049 Real length() const; 00051 Real meanHeight() const; 00053 const concepts::Real2d normal() const; 00061 concepts::Real2d mapRefTri(Real xi, uint i) const; 00067 concepts::Real2d map(Real xi) const; 00068 private: 00069 const concepts::Triangle2d* cells_[2]; 00070 uint idxs_[2]; 00071 }; 00072 00073 } // namespace linDG2D 00074 00075 #endif // EdgeInfo_hh