Class documentation of Concepts

Loading...
Searching...
No Matches
edge.hh
Go to the documentation of this file.
1
8#ifndef hp2dedge_hh
9#define hp2dedge_hh
10
11#include <iostream>
12#include <memory>
13#include "basics/typedefs.hh"
16#include "geometry/cell1D.hh"
18#include "geometry/integral.hh"
21#include "space/tmatrix.hh"
22#include "space/hpMethod.hh"
23#include "space/integral.hh"
24#include "hp1D/element.hh"
26
27
28namespace hp2D {
29
30 using concepts::Real;
31 using concepts::Z2;
32
33 // forward declaration
34 template<typename F>
35 class Quad;
36
37 // ************************************************************ QuadEdgeBase **
38
49 public:
56 normalVectorRule = concepts::EdgeNormalVectorRule())
57 : normalVectorRule_(normalVectorRule.clone())
58 {}
59
77 template<class F>
78 std::pair<hp1D::Element<F>*,concepts::Edge2d*>
79 edge(const Quad<F>& elm, const ushort k, bool emptyElm = true,
81 protected:
82 virtual std::ostream& info(std::ostream& os) const;
83
85 std::unique_ptr<const concepts::EdgeNormalVectorRule> normalVectorRule_;
86
97 virtual Real weight_(bool first, Z2 dir) const = 0;
98 private:
99
111 template<class F>
112 void transferDof_(const ushort* p, const ushort k, const bool rho,
113 const bool first, const Z2 dir,
114 const concepts::TMatrix<F>& T,
116
125 bool edgeDof_(const ushort* p, const ushort k, const bool rho,
126 const uint dofQuad, uint& dofEdge);
127 };
128
129 // *********************************************************** QuadEdgeFirst **
130
132 public:
134 normalVectorRule = concepts::EdgeNormalVectorRule())
135 : QuadEdgeBase(normalVectorRule) {}
136 protected:
137 virtual std::ostream& info(std::ostream& os) const;
138 private:
139 virtual Real weight_(bool first, Z2 dir) const;
140 };
141
142 // ************************************************************ QuadEdgeMean **
143
144 class QuadEdgeMean : public QuadEdgeBase {
145 public:
147 normalVectorRule = concepts::EdgeNormalVectorRule())
148 : QuadEdgeBase(normalVectorRule) {}
149 protected:
150 virtual std::ostream& info(std::ostream& os) const;
151 private:
152 virtual Real weight_(bool first, Z2 dir) const;
153 };
154
155 // ************************************************************ QuadEdgeJump **
156
157 class QuadEdgeJump : public QuadEdgeBase {
158 public:
160 normalVectorRule = concepts::EdgeNormalVectorRule())
161 : QuadEdgeBase(normalVectorRule) {}
162 protected:
163 virtual std::ostream& info(std::ostream& os) const;
164 private:
165 virtual Real weight_(bool first, Z2 dir) const;
166 };
167
168 namespace l2 {
169
170 // forward declaration
171 template<typename F>
172 class Quad;
173
174 // ************************************************************ QuadEdgeBase **
175
186 public:
193 normalVectorRule = concepts::EdgeNormalVectorRule())
194 : normalVectorRule_(normalVectorRule.clone())
195 {}
196
215template<class F>
216std::pair<hp1D::LegendreElement<F>*,concepts::Edge2d*>
217edge(const Quad<F>& elm, const ushort k, bool emptyElm = true,
218 hp1D::LegendreElement<F>* edge = 0);
219protected:
220virtual std::ostream& info(std::ostream& os) const;
221
223std::unique_ptr<const concepts::EdgeNormalVectorRule> normalVectorRule_;
224
235virtual Real weight_(bool first, Z2 dir) const = 0;
236private:
237
249template<class F>
250void transferDof_(const ushort* p, const ushort k, const bool rho,
251 const bool first, const Z2 dir,
252 const concepts::TMatrix<F>& T,
254};
255
256// *********************************************************** QuadEdgeFirst **
257
258class QuadEdgeFirst : public QuadEdgeBase {
259public:
260QuadEdgeFirst(const concepts::EdgeNormalVectorRule&
261 normalVectorRule = concepts::EdgeNormalVectorRule())
262: QuadEdgeBase(normalVectorRule) {}
263protected:
264virtual std::ostream& info(std::ostream& os) const;
265private:
266virtual Real weight_(bool first, Z2 dir) const;
267};
268
269// ************************************************************ QuadEdgeMean **
270
271class QuadEdgeMean : public QuadEdgeBase {
272public:
273QuadEdgeMean(const concepts::EdgeNormalVectorRule&
274 normalVectorRule = concepts::EdgeNormalVectorRule())
275: QuadEdgeBase(normalVectorRule) {}
276protected:
277virtual std::ostream& info(std::ostream& os) const;
278private:
279virtual Real weight_(bool first, Z2 dir) const;
280};
281
282// ************************************************************ QuadEdgeJump **
283
284class QuadEdgeJump : public QuadEdgeBase {
285public:
286QuadEdgeJump(const concepts::EdgeNormalVectorRule&
287 normalVectorRule = concepts::EdgeNormalVectorRule())
288: QuadEdgeBase(normalVectorRule) {}
289protected:
290virtual std::ostream& info(std::ostream& os) const;
291private:
292virtual Real weight_(bool first, Z2 dir) const;
293 };
294
295
296 } // namespace l2
297
298} // namespace hp2D
299
300#endif // hp2dedge_hh
std::unique_ptr< const concepts::EdgeNormalVectorRule > normalVectorRule_
Rule for defining the direction of the normal vector for new edges.
Definition edge.hh:85
virtual Real weight_(bool first, Z2 dir) const =0
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
QuadEdgeBase(const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule())
Definition edge.hh:55
std::pair< hp1D::Element< F > *, concepts::Edge2d * > edge(const Quad< F > &elm, const ushort k, bool emptyElm=true, hp1D::Element< F > *edge=0)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Definition typedefs.hh:39