Class documentation of Concepts

Loading...
Searching...
No Matches
buildDofsBase.hh
Go to the documentation of this file.
1
8#ifndef buildDofsBase2D_hh
9#define buildDofsBase2D_hh
10
11#include "hp2D/space.hh"
12
13namespace hp2D {
14
15 // forward declaration
16 class Space;
17
18 // ********************************************************* BuildDofsBase **
19
32 public:
35
36 virtual ~BuildDofsBase() {}
37
41 BuildDofsBase(Space& spc) : spc_(&spc) {}
47 virtual void operator()(concepts::Quad& cntr,
49 const uint nn[2]) = 0;
58 virtual BuildDofsBase* clone(Space* spc = 0) const = 0;
60 Space* space() { return spc_; }
61 protected:
63 inline concepts::AdaptiveControl<>& ctrl0_(uint idx);
65 inline concepts::AdaptiveControlP<1>& ctrl1_(uint idx);
67 inline concepts::AdaptiveControlP<2>& ctrl2_(uint idx);
69 inline std::map<uint, concepts::VertexData>::const_iterator
70 vertexListFind(uint idx) const;
72 inline std::map<uint, concepts::VertexData>::const_iterator
73 vertexListEnd() const;
75 inline std::map<uint, concepts::EdgeData>::const_iterator
76 edgeListFind(uint idx) const;
78 inline std::map<uint, concepts::EdgeData>::const_iterator
79 edgeListEnd() const;
81 uint& dim_() { return spc_->dim_; }
83 inline void deactivate_(const concepts::Vertex& vtx);
86 inline void deactivate_(const concepts::Edge& edg);
88 inline void computePmax_(const concepts::Quad& cntr, ushort Pmax[2]) const;
91 };
92
97
100 return (*(spc_->ctrl1_))[idx];
101 }
102
107
108 std::map<uint, concepts::VertexData>::const_iterator
111 return spc_->vertexList_.find(idx);
112 }
113
114 std::map<uint, concepts::VertexData>::const_iterator
117 return spc_->vertexList_.end();
118 }
119
120 std::map<uint, concepts::EdgeData>::const_iterator
123 return spc_->edgeList_.find(idx);
124 }
125
126 std::map<uint, concepts::EdgeData>::const_iterator
129 return spc_->edgeList_.end();
130 }
131
134 spc_->deactivate_(vtx);
135 }
136
139 spc_->deactivate_(edg);
140 }
141
143 ushort Pmax[2]) const {
145 spc_->computePmax_(cntr, Pmax);
146 }
147
148} // namespace hp2D
149
150#endif // buildDofsBase2D_hh
concepts::AdaptiveControlP< 2 > & ctrl2_(uint idx)
Returns face tag of face with key idx.
void computePmax_(const concepts::Quad &cntr, ushort Pmax[2]) const
Computes maximal polynomial Pmax degree in cntr in tensor form.
void deactivate_(const concepts::Vertex &vtx)
Deactivates the children of the vertex vtx.
concepts::AdaptiveControl & ctrl0_(uint idx)
Returns vertex tag of vertex with key idx.
Space * spc_
Space to build the vertex degrees of freedom from.
concepts::AdaptiveControlP< 1 > & ctrl1_(uint idx)
Returns edge tag of edge with key idx.
std::map< uint, concepts::EdgeData >::const_iterator edgeListEnd() const
Returns the end of the list with edge data.
std::map< uint, concepts::VertexData >::const_iterator vertexListEnd() const
Returns the end of the list with vertex data.
virtual BuildDofsBase * clone(Space *spc=0) const =0
BuildDofsBase(Space &spc)
BuildDofsBase()
Default constructor.
virtual void operator()(concepts::Quad &cntr, concepts::TColumn< Real > *&T1, const uint nn[2])=0
std::map< uint, concepts::VertexData >::const_iterator vertexListFind(uint idx) const
Returns the iterator to the vertex data of the vertex with key idx.
uint & dim_()
Returns a reference to the dimension of the space.
std::map< uint, concepts::EdgeData >::const_iterator edgeListFind(uint idx) const
Returns the iterator to the edge data of the edge with key idx.
Space * space()
Returns the space.
#define conceptsAssert(cond, exc)