00001 00002 #ifndef meshImport2Dez4u_hh 00003 #define meshImport2Dez4u_hh 00004 00005 #include "basics.hh" 00006 #include "toolbox.hh" 00007 #include "geometry.hh" 00008 00009 namespace concepts { 00010 00011 // ********************************************************* Import2dMeshEz4u ** 00012 00028 class Import2dMeshEz4u : public Mesh2 { 00029 public: 00035 Import2dMeshEz4u(const std::string filename); 00036 virtual ~Import2dMeshEz4u(); 00037 00038 inline uint ncell() const {return cell_.size(); } 00039 inline Scan2* scan() { 00040 return new PStlVectorScan<Cell2>(cell_.begin(), cell_.end()); 00041 } 00042 00043 virtual std::ostream& info(std::ostream& os) const; 00044 private: 00045 // sequence of the coordinates 00046 Sequence<Real2d> coord_; 00047 // sequence of the topological vertices 00048 Sequence<Vertex*> vtx_; 00049 // multi-array, used for identify unique nodes 00050 MultiArray<1,Vertex*> Vtx_; 00051 // sequence of the topological edges 00052 Sequence<Edge*> edg_; 00053 // multi-array, used for identify unique edges, commutable 00054 MultiArray<2, Edge*> Edg_; 00055 // sequence of the topological quads 00056 Sequence<Quad*> quad_; 00057 // sequence of the cells 00058 Sequence<Cell2*> cell_; 00059 // multi-array for the element attribute 00060 MultiArray<1,int> Attrib_elm_; 00061 // multi-array for the edge attribute, non-commutable 00062 MultiArray<2,int> Attrib_edg_; 00063 // multi-array for the vtx attribute 00064 MultiArray<1,int> Attrib_vtx_; 00065 }; 00066 00067 00068 // ********************************************************** Ez4uException ** 00069 00077 class Ez4uException : public ExceptionBase { 00078 public: 00086 Ez4uException(const std::string& error, const std::string& filename, 00087 const uint lineNr, const std::string& line) throw(); 00088 00089 virtual ~Ez4uException() throw(); 00090 protected: 00091 virtual std::ostream& info(std::ostream& os) const throw(); 00092 private: 00094 std::string error_; 00096 std::string filename_; 00098 uint lineNr_; 00100 std::string line_; 00101 }; 00102 00103 } // namespace concepts 00104 00105 #endif //meshImport2Dez4u_hh