Gmsh (http://www.geuz.org/gmsh) file reader. More...
#include <ReadGmsh.hpp>
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const SubsetList *subset_list=0, const Tag *file_id_tag=0) |
Load mesh from a file. More... | |
ErrorCode | read_tag_values (const char *file_name, const char *tag_name, const FileOptions &opts, std::vector< int > &tag_values_out, const SubsetList *subset_list=0) |
Read tag values from a file. More... | |
ReadGmsh (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~ReadGmsh () |
Destructor. More... | |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
factory method More... | |
Private Member Functions | |
ErrorCode | create_elements (const GmshElemType &type, const std::vector< int > &elem_ids, const std::vector< int > &matl_ids, const std::vector< int > &geom_ids, const std::vector< int > &prtn_ids, const std::vector< EntityHandle > &connectivity, const Tag *file_id_tag) |
Create an element sequence. More... | |
ErrorCode | create_sets (EntityType element_type, const Range &elements, const std::vector< int > &set_ids, int set_type) |
Add elements to sets as dictated by grouping ID in file. More... | |
ErrorCode | create_geometric_topology () |
NOT IMPLEMENTED Reconstruct parent-child relations for geometry sets from mesh connectivity. More... | |
Private Attributes | |
ReadUtilIface * | readMeshIface |
Interface * | mdbImpl |
interface instance More... | |
Tag | globalId |
Range | geomSets |
Gmsh (http://www.geuz.org/gmsh) file reader.
Definition at line 33 of file ReadGmsh.hpp.
ReadGmsh::ReadGmsh | ( | Interface * | impl = NULL | ) |
Constructor.
Definition at line 49 of file ReadGmsh.cpp.
References mdbImpl, moab::Interface::query_interface(), and readMeshIface.
Referenced by factory().
|
virtual |
Destructor.
Definition at line 54 of file ReadGmsh.cpp.
References mdbImpl, readMeshIface, and moab::Interface::release_interface().
|
private |
Create an element sequence.
Definition at line 325 of file ReadGmsh.cpp.
References create_sets(), ErrorCode, moab::ReadUtilIface::get_element_connect(), globalId, moab::Range::insert(), MB_START_ID, MB_SUCCESS, moab::GmshElemType::mb_type, MBVERTEX, mdbImpl, moab::GmshElemType::node_order, moab::GmshElemType::num_nodes, readMeshIface, moab::Interface::tag_set_data(), and moab::ReadUtilIface::update_adjacencies().
Referenced by load_file().
|
private |
NOT IMPLEMENTED Reconstruct parent-child relations for geometry sets from mesh connectivity.
Definition at line 516 of file ReadGmsh.cpp.
References moab::Range::clear(), moab::Range::empty(), geomSets, and MB_SUCCESS.
Referenced by load_file().
|
private |
Add elements to sets as dictated by grouping ID in file.
Definition at line 399 of file ReadGmsh.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Interface::create_meshset(), dim, moab::CN::Dimension(), moab::Range::empty(), moab::Range::end(), entities, ErrorCode, GEOM_DIMENSION_TAG_NAME, geomSets, moab::Interface::get_entities_by_type_and_tag(), globalId, moab::Range::insert(), moab::intersect(), MATERIAL_SET_TAG_NAME, MB_ENTITY_NOT_FOUND, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mdbImpl, MESHSET_SET, PARALLEL_PARTITION_TAG_NAME, moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by create_elements().
|
static |
factory method
Definition at line 44 of file ReadGmsh.cpp.
References iface, and ReadGmsh().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
virtual |
Load mesh from a file.
Method all readers must provide to import a mesh.
file_name | The file to read. |
file_set | Optional pointer to entity set representing file. If this is not NULL, reader may optionally tag the pointed-to set with format-specific meta-data. |
subset_list | An optional struct pointer specifying the tags identifying entity sets to be read. |
file_id_tag | If specified, reader should store for each entity it reads, a unique integer ID for this tag. |
Implements moab::ReaderIface.
Definition at line 72 of file ReadGmsh.cpp.
References moab::Range::clear(), create_elements(), create_geometric_topology(), ErrorCode, geomSets, moab::FileTokenizer::get_doubles(), moab::FileTokenizer::get_integers(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::ReadUtilIface::get_node_coords(), moab::FileTokenizer::get_string(), globalId, moab::Interface::globalId_tag(), moab::GmshUtil::gmshElemTypes, moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MATERIAL_SET_TAG_NAME, MB_FILE_DOES_NOT_EXIST, MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_START_ID, MB_SUCCESS, MB_UNSUPPORTED_OPERATION, MBMAXTYPE, mdbImpl, moab::ReaderIface::IDTag::num_tag_values, moab::GmshUtil::numGmshElemType, readMeshIface, moab::ReaderIface::SubsetList::tag_list, moab::ReaderIface::SubsetList::tag_list_length, moab::ReaderIface::IDTag::tag_name, moab::Interface::tag_set_data(), and moab::ReaderIface::IDTag::tag_values.
|
virtual |
Read tag values from a file.
Read the list if all integer tag values from the file for a tag that is a single integer value per entity.
file_name | The file to read. |
tag_name | The tag for which to read values |
tag_values_out | Output: The list of tag values. |
subset_list | An array of tag name and value sets specifying the subset of the file to read. If multiple tags are specified, the sets that match all tags (intersection) should be read. |
subset_list_length | The length of the 'subset_list' array. |
Implements moab::ReaderIface.
Definition at line 63 of file ReadGmsh.cpp.
References MB_NOT_IMPLEMENTED.
|
private |
Definition at line 80 of file ReadGmsh.hpp.
Referenced by create_geometric_topology(), create_sets(), and load_file().
|
private |
Definition at line 79 of file ReadGmsh.hpp.
Referenced by create_elements(), create_sets(), and load_file().
|
private |
interface instance
Definition at line 77 of file ReadGmsh.hpp.
Referenced by create_elements(), create_sets(), load_file(), ReadGmsh(), and ~ReadGmsh().
|
private |
Definition at line 74 of file ReadGmsh.hpp.
Referenced by create_elements(), load_file(), ReadGmsh(), and ~ReadGmsh().