Class documentation of Concepts

Loading...
Searching...
No Matches
traces.hh
Go to the documentation of this file.
1
8#ifndef hp2dedge_traces_hh
9#define hp2dedge_traces_hh
10
11#include "toolbox/sequence.hh"
12#include "formula/boundary.hh"
13#include "formula/exceptions.hh"
15#include "geometry/cellConditions.hh"
16#include "space/space.hh"
17#include "hp1D/element.hh"
18#include "hp2Dedge/quad.hh"
19#include "hp2Dedge/edge.hh"
20
21
22namespace concepts {
23
24 // forward declaration
25 class EdgeNormalVectorRule;
26}
27
28namespace hp2Dedge {
29
30 using concepts::Real;
31
32 // forward declaration
33 template<typename F>
34 class Quad;
35
36
37 // ************************************************************ TraceSpace **
38
52 class TraceSpace : public concepts::SpaceOnCells<Real> {
53 public:
56
57 enum traceTypes { FIRST, MEAN, JUMP };
58
65 const concepts::Set<uint> edgeAttr,
66 enum traceTypes type = FIRST,
68 normalVectorRule = concepts::EdgeNormalVectorRule());
69
79 const concepts::CellConditions* cc = 0,
80 enum traceTypes type = FIRST,
82 normalVectorRule = concepts::EdgeNormalVectorRule());
84 const concepts::CellConditions* cc = 0,
85 enum traceTypes type = FIRST,
87 normalVectorRule = concepts::EdgeNormalVectorRule());
88
89 virtual ~TraceSpace();
90
91 virtual uint dim() const { return dim_; }
92
94 virtual uint nelm() const { return nelm_; }
95
97 virtual Scan* scan() const
98 {
100 }
101
104 uelm(const concepts::Edge edge) const
105 {
107 const_iterator i = uelm_.find(edge.key());
108 if (i == uelm_.end())
110 return i->second;
111 }
112
117 uelm() const
118 {
119 return uelm_;
120 }
121
126 protected:
127 virtual std::ostream& info(std::ostream& os) const;
128 private:
130 const uint dim_;
131
133 uint nelm_;
134
137
140
143
144 std::unique_ptr<QuadEdgeBase> quadEdge_;
145
146 bool warn_edgeBuildMissElem_;
147
148 void constructType_(enum traceTypes type,
149 const concepts::EdgeNormalVectorRule& normalVectorRule);
150
154 template<class F>
155 bool build_(const Quad<Real>* elm, F condition);
156
160 template<class F>
161 void test_(const concepts::ElementWithCell<Real>& elm, F condition);
162 };
163
164} // namespace hp2Dedge
165
166
167#endif // hp2dedge_traces_hh
const Key & key() const
Returns the key of the connector.
Definition connector.hh:105
const concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm() const
Definition traces.hh:117
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
TraceSpace(const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > edgeAttr, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule())
virtual void recomputeShapefunctions()
const concepts::Sequence< UnderlyingElement > uelm(const concepts::Edge edge) const
Returns the underlying 2D elements.
Definition traces.hh:104
virtual Scan * scan() const
Returns a scanner to iterate over the elements of the space.
Definition traces.hh:97
TraceSpace(concepts::SpaceOnCells< Real > &spc, const concepts::CellConditions *cc=0, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule normalVectorRule=concepts::EdgeNormalVectorRule())
virtual uint dim() const
Returns the dimension of the space.
Definition traces.hh:91
virtual uint nelm() const
Returns the number of elements in the space.
Definition traces.hh:94
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320