edgeInfo.hh

Go to the documentation of this file.
1 
6 #ifndef EdgeInfo_hh
7 #define EdgeInfo_hh
8 
9 #include <basics.hh>
10 #include <geometry.hh>
11 
12 #include "triangle.hh"
13 
14 namespace test {
15  class DGEdgeInfoTest;
16  class DGSpace2dP1Test;
17 }
18 
19 namespace linDG2D {
20 
21  using concepts::Real;
22 
23  // ************************************************************** EdgeInfo **
24 
31  class EdgeInfo {
32  public:
33  friend class test::DGEdgeInfoTest;
34  friend class test::DGSpace2dP1Test;
38  void addCell(const concepts::Triangle2d* cell, const uint idx);
42  const concepts::Triangle2d* cell(uint i) const { return cells_[i]; }
46  uint idx(uint i) const { return idxs_[i]; }
48  const concepts::Edge& edge() const {
49  return *(cells_[0]->connector().edge(idxs_[0]));
50  }
52  Real length() const;
54  Real meanHeight() const;
56  const concepts::Real2d normal() const;
64  concepts::Real2d mapRefTri(Real xi, uint i) const;
71  private:
73  uint idxs_[2];
74  };
75 
76 } // namespace linDG2D
77 
78 #endif // EdgeInfo_hh
Triangle & connector() const
Returns the triangle connector (topology)
Definition: cell2D.hh:91
const concepts::Triangle2d * cells_[2]
Definition: edgeInfo.hh:72
const concepts::Real2d normal() const
Return a vector normal to the edge, pointing out of first triangle.
A 2D cell: triangle.
Definition: cell2D.hh:31
const concepts::Edge & edge() const
Return topological edge represented.
Definition: edgeInfo.hh:48
DG FEM for 2D problems using piecewise linear shape functions.
Definition: bilinearForm.hh:15
Edge * edge(uint i) const
Returns a 1D component: edge.
Definition: topology.hh:224
Unit tests.
Definition: testcase.hh:66
Edge information for DG FEM.
Definition: edgeInfo.hh:31
uint idx(uint i) const
Return index of edge represented in cell i.
Definition: edgeInfo.hh:46
concepts::Real2d map(Real xi) const
Maps a point on the reference edge (0,1) onto the physical edge.
Testing linDG2D::SpaceP1.
Definition: spaceTest.hh:23
Testing linDG2D::EdgeInfo.
Definition: edgeInfoTest.hh:21
const concepts::Triangle2d * cell(uint i) const
Return cell adjacent to the edge.
Definition: edgeInfo.hh:42
void addCell(const concepts::Triangle2d *cell, const uint idx)
Add a cell adjacent to the edge.
Real meanHeight() const
Return the mean height of the triangle(s) adjacent to the edge.
concepts::Real2d mapRefTri(Real xi, uint i) const
Maps a point on the reference edge (0,1) onto the reference triangle of cell i.
An edge in the topology.
Definition: topology.hh:73
Real length() const
Return the length of the edge.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
EdgeInfo()
Default Constructor. Needed to get new EdgeInfo from a hash map access.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich