moab
|
00001 00018 #ifndef READ_GMSH_HPP 00019 #define READ_GMSH_HPP 00020 00021 #include "moab/Forward.hpp" 00022 #include "moab/ReaderIface.hpp" 00023 #include "moab/Range.hpp" 00024 00025 namespace moab { 00026 00027 class ReadUtilIface; 00028 struct GmshElemType; 00029 00034 class ReadGmsh : public ReaderIface 00035 { 00036 00037 public: 00038 00040 static ReaderIface* factory( Interface* ); 00041 00042 ErrorCode load_file( const char* file_name, 00043 const EntityHandle* file_set, 00044 const FileOptions& opts, 00045 const SubsetList* subset_list = 0, 00046 const Tag* file_id_tag = 0 ); 00047 00048 ErrorCode read_tag_values( const char* file_name, 00049 const char* tag_name, 00050 const FileOptions& opts, 00051 std::vector<int>& tag_values_out, 00052 const SubsetList* subset_list = 0 ); 00053 00055 ReadGmsh(Interface* impl = NULL); 00056 00058 virtual ~ReadGmsh(); 00059 00060 private: 00061 00062 ErrorCode create_elements( const GmshElemType& type, 00063 const std::vector<int>& elem_ids, 00064 const std::vector<int>& matl_ids, 00065 const std::vector<int>& geom_ids, 00066 const std::vector<int>& prtn_ids, 00067 const std::vector<EntityHandle>& connectivity, 00068 const Tag* file_id_tag ); 00069 00070 ErrorCode create_sets( EntityType element_type, 00071 const Range& elements, 00072 const std::vector<int>& set_ids, 00073 int set_type ); 00074 00075 ErrorCode create_geometric_topology(); 00076 00077 00078 ReadUtilIface* readMeshIface; 00079 00081 Interface* mdbImpl; 00082 00083 Tag globalId; 00084 Range geomSets; 00085 }; 00086 00087 } // namespace moab 00088 00089 #endif