00001 // space for linear FEM in 3D 00002 00003 #ifndef linSpace3D_hh 00004 #define linSpace3D_hh 00005 00006 #include "element3D.hh" 00007 #include "basics/typedefs.hh" 00008 #include "space/space.hh" 00009 #include "space/element.hh" 00010 #include "toolbox/scannerConnectors.hh" 00011 #include "toolbox/dynArray.hh" 00012 00013 namespace concepts { 00014 00015 // forward declarations 00016 class Mesh3; 00017 class BoundaryConditions; 00018 00019 // ************************************************************** Scanners ** 00020 00021 template<> 00022 class Scan<linearFEM::Tetrahedron> : public Scan<linearFEM::Element> { 00023 public: 00024 virtual linearFEM::Tetrahedron& operator++(int) = 0; 00025 }; 00026 00027 } // namespace concepts 00028 00029 namespace linearFEM { 00030 00031 // ************************************************************** Linear3d ** 00032 00036 class Linear3d : public concepts::Space<Real> { 00037 public: 00038 typedef concepts::Scan<Tetrahedron> Scan; 00039 typedef void (*SMap)(const concepts::TColumn<Real>&, 00040 concepts::TColumn<Real>&); 00045 Linear3d(concepts::Mesh3& msh, concepts::BoundaryConditions* bc = 0); 00046 virtual ~Linear3d(); 00047 virtual uint dim() const { return dim_; } 00048 virtual uint nelm() const { return nelm_; } 00049 virtual Scan* scan() const { 00050 return new concepts::PListScan<Tetrahedron>(*elm_); } 00051 protected: 00052 virtual std::ostream& info(std::ostream& os) const; 00053 private: 00055 uint dim_; 00057 uint nelm_; 00059 concepts::BoundaryConditions* bc_; 00061 concepts::Joiner<Tetrahedron*, 1>* elm_; 00062 }; 00063 00064 } // namespace linearFEM 00065 00066 #endif // linSpace3D_hh