Class documentation of Concepts

Loading...
Searching...
No Matches
neumannTraceSpace3d.hh
Go to the documentation of this file.
1
6#ifndef HP3D_NEUMANNTRACESPACE3D_HH_
7#define HP3D_NEUMANNTRACESPACE3D_HH_
8
9
10
11
12#include "toolbox/sequence.hh"
13#include "formula/boundary.hh"
14#include "formula/exceptions.hh"
16#include "geometry/cellConditions.hh"
17#include "space/space.hh"
18#include "hp2D/element.hh"
19#include "hp3D.hh"
20#include "hp3D/element.hh"
21#include "hp3D/face.hh"
22#include "hp3D/hexFunctions.hh"
23
26
28
29
30
31
32namespace concepts {
33
34 // forward declaration
35 class FaceNormalVectorRule;
36}
37
38namespace hp3D {
39
40 using concepts::Real;
41
42 // forward declaration
43 class Hexahedron;
44
45 // ************************************************************ NeumannTraceSpace **
46
62 public:
65
67
68
69
70// //struct representing a quad and a underlying hexahedron's refinement level (only one hex)
71// struct quad_lvl: public concepts::OutputOperator{
72// quad_lvl(const UnderlyingQuad* quad,const concepts::Level<3> level,uint k) :level(level), quad(quad), k(k) {
73// //just same level on quads are allowed, i.e. appears for bisection only
74// if(level.l_[0]!=level.l_[1])
75// throw conceptsException(concepts::MissingFeature("not implemented"));
76// }
77//
78//
79// // With this ordering a finer Edge is followed by at most 2 coarse edge where the finer edge is a child of one of them
80// //
81// //old // application this set is build of a endpoint nodes underlying Edges
82// // therefor each finer Edge is followed by its general father edge
83// //
84//
85//
86//
87// // with this ordering a Set of it has the finest edges in the first places
88// // then the key sorting comes into account
89//
90//
91// bool operator<(edge_lvl const& right) const {
92// const concepts::Edge* edgeP = dynamic_cast<const concepts::Edge*>(edge->elm);
93// const concepts::Edge* edgeR = dynamic_cast<const concepts::Edge*>(right.edge->elm);
94//
95// if(this->level.l_[0] == right.level.l_[0])
96// return edgeP->key().key()<edgeR->key().key();
97// //Note here is ">" that makes level sorting other way
98// return this->level.l_[0] > right.level.l_[0];
99//
105//
107// }
108//
109// bool operator==(edge_lvl const& right){
110// const concepts::Edge* edgeP = dynamic_cast<const concepts::Edge*>(edge->elm);
111// const concepts::Edge* edgeR = dynamic_cast<const concepts::Edge*>(right.edge->elm);
112// return edgeP->key().key()==edgeR->key().key();
113//
114// }
115//
116//
117// const UnderlyingQuad* quad;
118// const concepts::Level<3> level;
119//
120// //the UnderlyingEdge is the k-th Edge of its underlying unique quad
121// const uint k;
122//
123// protected:
124// virtual std::ostream& info(std::ostream& os) const {
125// return os << "edge_lvl("<<edge->elm->key()<<","<<level.l_[0]<<", k= "<<k<<")";
126// }
127// };
128//
129
153 const concepts::Set<uint> faceAttr,
154 concepts::FacetteTraceType<concepts::FaceNormalVectorRule>::traceTypes
157 normalVectorRule = concepts::FaceNormalVectorRule(),
158 bool emptyElm= true);
159
160
183 bool emptyElm= true);
184
189
193 virtual uint dim() const { return dim_; }
194
198 virtual uint nelm() const { return nelm_; }
199
203 virtual Scan* scan() const{
204 return new concepts::PListScan<hp2D::Element<Real> >(*elm_);
205 }
206
210// const concepts::Sequence<UnderlyingElement>
211// uelm(const concepts::Edge edge) const
212// {
213// concepts::HashMap<hp3D::NeumannTraceElement3d<Real>*>::
214// const_iterator i = edges_.find(edge.key());
215// if (i == edges_.end())
216// return concepts::Sequence<UnderlyingElement>();
217// return i->second->uelm();
218// }
219
223 //virtual void recomputeShapefunctions();
224 protected:
225 virtual std::ostream& info(std::ostream& os) const;
226 private:
228 const uint dim_;
229
231 uint nelm_;
232
233
234 // concepts::Sequence<concepts::Quad3d*> coarseCells_;
235// //number of irregular builded elements
236// uint nIrrelm_;
237
240
243
250
251 //flag controlling elements with no dofs in the space
252 bool emptyElements_;
253
254
255 // Builds the NeumanntraceElements with Informations about the Underyling Elements
257
258
259 //method reconstruct all child edges belonging to a coarse edge and writes information into the coarsetochld_map
260 //
261 // TODO: present the algorithm here
262 //
263 //
264 //
265 //
266 void reconstruct_(concepts::HashMap<concepts::Sequence<UnderlyingElement> >& irregular_uelm,
268 concepts::HashMap<concepts::Sequence<UnderlyingQuad> >::const_iterator iterNode,
269 concepts::Set<uint>& buildedEdges,
271
272// //Builds the NeumannTraceElements between irregular Elements, i.e. on k - irregular meshes
273// void prepareIrregularElements_(concepts::HashMap<concepts::Sequence<UnderlyingElement> >& irregular_uelm);
274//
275// //actually creates the irregular ELements with the help of the mappings
276// void buildIrregularElements_(concepts::HashMap<concepts::Sequence<UnderlyingElement> >& irregular_uelm,
277// concepts::HashMap<concepts::Sequence<UnderlyingQuad> >& coarsetochld_map);
278
279
290 Real weight_(bool first,const concepts::Z2 dir, const uint nUelm, const concepts::Attribute attrb) const;
291
292
293 //test for face-attribute is in the Set of requested quadAttributes
294 bool activeQuad_(const concepts::Set<uint>& quadAttr, const concepts::Connector2& quad) {
295 return quadAttr.exist(quad.attrib());
296 }
297
301 template<class F>
302 void test_(const concepts::ElementWithCell<Real>& elm, F condition);
303
304 };
305
306} // namespace hp2D
307
308
309
310
311
312#endif /* HP3D_NEUMANNTRACESPACE3D_HH_ */
bool exist(F val) const
Returns true, if a value is in the set.
Definition set.hh:296
const Attribute & attrib() const
Returns the attribute of the connector.
Definition connector.hh:108
NeumannTraceSpace3d(const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > faceAttr, concepts::FacetteTraceType< concepts::FaceNormalVectorRule >::traceTypes=concepts::FacetteTraceType< concepts::FaceNormalVectorRule >::FIRST, const concepts::FaceNormalVectorRule &normalVectorRule=concepts::FaceNormalVectorRule(), bool emptyElm=true)
NeumannTraceSpace3d(concepts::SpaceOnCells< Real > &spc, const concepts::FacetteTraceTypes< concepts::FaceNormalVectorRule > &fttypes, bool emptyElm=true)
virtual std::ostream & info(std::ostream &os) const
virtual Scan * scan() const
double Real
Definition typedefs.hh:39
Definition meshDX.hh:23