Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

hp2D/buildDofsBase.hh
Go to the documentation of this file.
00001 
00006 #ifndef buildDofsBase2D_hh
00007 #define buildDofsBase2D_hh
00008 
00009 #include "hp2D/space.hh"
00010 
00011 namespace hp2D {
00012 
00013   // forward declaration
00014    class Space;
00015 
00016   // ********************************************************* BuildDofsBase **
00017 
00029   class BuildDofsBase {
00030   public:
00032     BuildDofsBase() : spc_(0) {}
00033 
00034     virtual ~BuildDofsBase() {}
00035 
00039     BuildDofsBase(Space& spc) : spc_(&spc) {}
00045     virtual void operator()(concepts::Quad& cntr,
00046           concepts::TColumn<Real>*& T1,
00047           const uint nn[2]) = 0;
00056     virtual BuildDofsBase* clone(Space* spc = 0) const = 0;
00058     Space* space() { return spc_; }
00059   protected:
00061     inline concepts::AdaptiveControl<>& ctrl0_(uint idx);
00063     inline concepts::AdaptiveControlP<1>& ctrl1_(uint idx);
00065     inline concepts::AdaptiveControlP<2>& ctrl2_(uint idx);
00067     inline std::map<uint, concepts::VertexData>::const_iterator
00068     vertexListFind(uint idx) const;
00070     inline std::map<uint, concepts::VertexData>::const_iterator
00071     vertexListEnd() const;
00073     inline std::map<uint, concepts::EdgeData>::const_iterator
00074     edgeListFind(uint idx) const;
00076     inline std::map<uint, concepts::EdgeData>::const_iterator
00077     edgeListEnd() const;
00079     uint& dim_() { return spc_->dim_; }
00081     inline void deactivate_(const concepts::Vertex& vtx);
00084     inline void deactivate_(const concepts::Edge& edg);
00086     inline void computePmax_(const concepts::Quad& cntr, ushort Pmax[2]) const;
00088     Space* spc_;
00089   };
00090 
00091   concepts::AdaptiveControl<>& BuildDofsBase::ctrl0_(uint idx) {
00092     conceptsAssert(spc_, concepts::Assertion());
00093     return spc_->ctrl0_[idx];
00094   }
00095 
00096   concepts::AdaptiveControlP<1>& BuildDofsBase::ctrl1_(uint idx) {
00097     conceptsAssert(spc_, concepts::Assertion());
00098     return (*(spc_->ctrl1_))[idx];
00099   }
00100 
00101   concepts::AdaptiveControlP<2>& BuildDofsBase::ctrl2_(uint idx) {
00102     conceptsAssert(spc_, concepts::Assertion());
00103     return spc_->ctrl2_[idx];
00104   }
00105 
00106   std::map<uint, concepts::VertexData>::const_iterator
00107   BuildDofsBase::vertexListFind(uint idx) const {
00108     conceptsAssert(spc_, concepts::Assertion());
00109     return spc_->vertexList_.find(idx);
00110   }
00111 
00112   std::map<uint, concepts::VertexData>::const_iterator
00113   BuildDofsBase::vertexListEnd() const {
00114     conceptsAssert(spc_, concepts::Assertion());
00115     return spc_->vertexList_.end();
00116   }
00117 
00118   std::map<uint, concepts::EdgeData>::const_iterator
00119   BuildDofsBase::edgeListFind(uint idx) const {
00120     conceptsAssert(spc_, concepts::Assertion());
00121     return spc_->edgeList_.find(idx);
00122   }
00123 
00124   std::map<uint, concepts::EdgeData>::const_iterator
00125   BuildDofsBase::edgeListEnd() const {
00126     conceptsAssert(spc_, concepts::Assertion());
00127     return spc_->edgeList_.end();
00128   }
00129 
00130   void BuildDofsBase::deactivate_(const concepts::Vertex& vtx) {
00131     conceptsAssert(spc_, concepts::Assertion());
00132     spc_->deactivate_(vtx);
00133   }
00134 
00135   void BuildDofsBase::deactivate_(const concepts::Edge& edg) {
00136     conceptsAssert(spc_, concepts::Assertion());
00137     spc_->deactivate_(edg);
00138   }
00139 
00140   void BuildDofsBase::computePmax_(const concepts::Quad& cntr,
00141            ushort Pmax[2]) const {
00142     conceptsAssert(spc_, concepts::Assertion());
00143     spc_->computePmax_(cntr, Pmax);
00144   }
00145 
00146 } // namespace hp2D
00147 
00148 #endif // buildDofsBase2D_hh

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)