Go to the documentation of this file.00001
00006 #ifndef buildDofsBase_hh
00007 #define buildDofsBase_hh
00008
00009 #include "hp3D/space.hh"
00010
00011 namespace hp3D {
00012
00013
00014 class Space;
00015
00016
00017
00029 class BuildDofsBase {
00030 public:
00032 BuildDofsBase() : spc_(0) {}
00036 BuildDofsBase(Space& spc) : spc_(&spc) {}
00042 virtual void operator()(concepts::Hexahedron& cntr,
00043 concepts::TColumn<Real>*& T1) = 0;
00052 virtual BuildDofsBase* clone(Space* spc = 0) const = 0;
00054 Space* space() { return spc_; }
00055 protected:
00057 inline concepts::AdaptiveControl<>& ctrl0_(uint idx);
00059 inline concepts::AdaptiveControlP<1>& ctrl1_(uint idx);
00061 inline concepts::AdaptiveControlP<2>& ctrl2_(uint idx);
00063 inline concepts::AdaptiveControlP<3>& ctrl3_(uint idx);
00065 inline std::map<uint, concepts::VertexData>::const_iterator
00066 vertexListFind(uint idx) const;
00068 inline std::map<uint, concepts::VertexData>::const_iterator
00069 vertexListEnd() const;
00071 inline std::map<uint, concepts::EdgeData>::const_iterator
00072 edgeListFind(uint idx) const;
00074 inline std::map<uint, concepts::EdgeData>::const_iterator
00075 edgeListEnd() const;
00077 inline std::map<uint, concepts::FaceData>::const_iterator
00078 faceListFind(uint idx) const;
00080 inline std::map<uint, concepts::FaceData>::const_iterator
00081 faceListEnd() const;
00083 uint& dim_() { return spc_->dim_; }
00085 inline void deactivate_(const concepts::Connector0& vtx);
00088 inline void deactivate_(const concepts::Connector1& edg);
00091 inline void deactivate_(const concepts::Connector2& face);
00093 inline void computePmax_(const concepts::Hexahedron& cntr,
00094 ushort Pmax[3]) const;
00096 Space* spc_;
00097 };
00098
00099 concepts::AdaptiveControl<>& BuildDofsBase::ctrl0_(uint idx) {
00100 conceptsAssert(spc_, concepts::Assertion());
00101 return spc_->ctrl0_[idx];
00102 }
00103
00104 concepts::AdaptiveControlP<1>& BuildDofsBase::ctrl1_(uint idx) {
00105 conceptsAssert(spc_, concepts::Assertion());
00106 return spc_->ctrl1_->operator[](idx);
00107 }
00108
00109 concepts::AdaptiveControlP<2>& BuildDofsBase::ctrl2_(uint idx) {
00110 conceptsAssert(spc_, concepts::Assertion());
00111 return spc_->ctrl2_->operator[](idx);
00112 }
00113
00114 concepts::AdaptiveControlP<3>& BuildDofsBase::ctrl3_(uint idx) {
00115 conceptsAssert(spc_, concepts::Assertion());
00116 return spc_->ctrl3_[idx];
00117 }
00118
00119 std::map<uint, concepts::VertexData>::const_iterator
00120 BuildDofsBase::vertexListFind(uint idx) const {
00121 conceptsAssert(spc_, concepts::Assertion());
00122 return spc_->vertexList_.find(idx);
00123 }
00124
00125 std::map<uint, concepts::VertexData>::const_iterator
00126 BuildDofsBase::vertexListEnd() const {
00127 conceptsAssert(spc_, concepts::Assertion());
00128 return spc_->vertexList_.end();
00129 }
00130
00131 std::map<uint, concepts::EdgeData>::const_iterator
00132 BuildDofsBase::edgeListFind(uint idx) const {
00133 conceptsAssert(spc_, concepts::Assertion());
00134 return spc_->edgeList_.find(idx);
00135 }
00136
00137 std::map<uint, concepts::EdgeData>::const_iterator
00138 BuildDofsBase::edgeListEnd() const {
00139 conceptsAssert(spc_, concepts::Assertion());
00140 return spc_->edgeList_.end();
00141 }
00142
00143 std::map<uint, concepts::FaceData>::const_iterator
00144 BuildDofsBase::faceListFind(uint idx) const {
00145 conceptsAssert(spc_, concepts::Assertion());
00146 return spc_->faceList_.find(idx);
00147 }
00148
00149 std::map<uint, concepts::FaceData>::const_iterator
00150 BuildDofsBase::faceListEnd() const {
00151 conceptsAssert(spc_, concepts::Assertion());
00152 return spc_->faceList_.end();
00153 }
00154
00155 void BuildDofsBase::deactivate_(const concepts::Connector0& vtx) {
00156 conceptsAssert(spc_, concepts::Assertion());
00157 spc_->deactivate_(vtx);
00158 }
00159
00160 void BuildDofsBase::deactivate_(const concepts::Connector1& edg) {
00161 conceptsAssert(spc_, concepts::Assertion());
00162 spc_->deactivate_(edg);
00163 }
00164
00165 void BuildDofsBase::deactivate_(const concepts::Connector2& face) {
00166 conceptsAssert(spc_, concepts::Assertion());
00167 spc_->deactivate_(face);
00168 }
00169
00170 void BuildDofsBase::computePmax_(const concepts::Hexahedron& cntr,
00171 ushort Pmax[3]) const {
00172 conceptsAssert(spc_, concepts::Assertion());
00173 spc_->computePmax_(cntr, Pmax);
00174 }
00175
00176 }
00177
00178 #endif // buildDofsBase_hh