00001 /* abstract base class for hp elements in 2D 00002 */ 00003 00004 #ifndef hpElement2d_h 00005 #define hpElement2d_h 00006 00007 #include <cstring> 00008 #include "basics/vectorsMatrices.hh" 00009 #include "toolbox/scannerConnectors.hh" 00010 #include "geometry/connector.hh" 00011 #include "geometry/cell.hh" 00012 #include "space/element.hh" 00013 #include "space/tmatrix.hh" 00014 00015 namespace hp2D { 00016 00017 // *************************************************************** Element ** 00018 00025 template<class F> 00026 class Element : public concepts::ElementWithCell<F> { 00027 public: 00031 inline Element(concepts::TColumn<F>* T) : T_(T) {} 00032 00036 virtual const concepts::Connector2& support() const = 0; 00037 00038 virtual const concepts::TMatrix<F>& T() const { return T_; } 00039 00041 void appendT(concepts::TColumn<F>* T) { T_.append(T); } 00042 00047 virtual concepts::Real3d vertex(uint i) const = 0; 00048 00052 virtual const concepts::Cell2& cell() const = 0; 00053 protected: 00054 virtual std::ostream& info(std::ostream& os) const; 00055 00057 concepts::TMatrix<F> T_; 00058 }; 00059 00060 } // namespace hp2D 00061 00062 namespace concepts { 00063 00064 // ****************************************************************** Scan ** 00065 00067 00068 template<class F> 00069 class Scan<hp2D::Element<F> > : public Scan<ElementWithCell<F> > { 00070 public: 00071 hp2D::Element<F>& operator++(int) = 0; 00072 }; 00073 00074 } // namespace concepts 00075 00076 #endif // hpElement2d_h