00001 00004 #ifndef appRaduSpace_hh 00005 #define appRaduSpace_hh 00006 00007 #include "toolbox/scannerConnectors.hh" 00008 #include "geometry/mesh.hh" 00009 #include "space/space.hh" 00010 #include "app-radu/element.hh" 00011 00012 // ************************************************************** Constant3d ** 00013 00023 template <class F = concepts::Real> 00024 class Constant3d : public concepts::Space<F> { 00025 private: 00027 uint dim_; 00029 uint nelm_; 00031 concepts::Joiner<concepts::Element<F>*, 1>* elm_; 00032 00037 void constructor_(concepts::Tetrahedron3d* cell, uint lvl); 00042 void constructor_(concepts::Hexahedron3d* cell, uint lvl); 00047 void constructor_(concepts::Parallelepiped3d* cell, uint lvl); 00048 00049 protected: 00050 std::ostream& info(std::ostream& os) const; 00051 00052 public: 00058 Constant3d(concepts::Mesh3& msh, uint lvl); 00059 virtual ~Constant3d(); 00060 00062 uint dim() const {return dim_;} 00064 uint nelm() const {return nelm_;} 00066 inline concepts::Scan<concepts::Element<F> >* scan() const; 00067 }; 00068 00069 template <class F> 00070 inline concepts::Scan<concepts::Element<F> >* Constant3d<F>::scan() const { 00071 return new concepts::PListScan<concepts::Element<F> >(*elm_); 00072 } 00073 00074 template <class F> 00075 inline std::ostream& Constant3d<F>::info(std::ostream& os) const { 00076 os << "Constant3d(dim = " << dim_ << ", nelm = " << nelm_ << ')'; 00077 return os; 00078 } 00079 00080 #endif // appRaduSpace_hh