#include <ReadCCMIO.hpp>
Public Types | |
typedef std::map< int, std::vector< EntityHandle > > | TupleList |
typedef std::map< int, std::vector< int > > | SenseList |
Public Member Functions | |
ReadCCMIO (Interface *impl) | |
Constructor. More... | |
virtual | ~ReadCCMIO () |
Destructor. More... | |
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... | |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Private Member Functions | |
ErrorCode | read_processor (CCMIOID rootID, CCMIOID problemID, CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID, CCMIOSize_t proc, Range *new_ents) |
ErrorCode | read_cells (CCMIOSize_t proc, CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID, TupleList &vert_map, Range *new_cells) |
ErrorCode | construct_cells (TupleList &face_map, SenseList &sense_map, TupleList &vert_map, std::map< int, int > &cell_topo_types, std::vector< EntityHandle > &new_cells) |
ErrorCode | ccmio_to_moab_type (int ccm_type, EntityType &moab_type, bool &has_mid_nodes) |
ErrorCode | create_cell_from_faces (std::vector< EntityHandle > &facehs, std::vector< int > &senses, EntityType this_type, bool has_mid_nodes, EntityHandle &cell) |
ErrorCode | read_gids_and_types (CCMIOID problemID, CCMIOID topologyID, std::vector< EntityHandle > &cells) |
ErrorCode | read_all_faces (CCMIOID topologyID, TupleList &vert_map, TupleList &face_map, SenseList &sense_map, Range *new_faces) |
ErrorCode | read_faces (CCMIOID faceID, CCMIOEntity bdy_or_int, TupleList &vert_map, TupleList &face_map, SenseList &sense_map, Range *new_faces) |
ErrorCode | make_faces (int *farray, TupleList &vert_map, std::vector< EntityHandle > &new_faces, int num_faces) |
ErrorCode | read_vertices (CCMIOSize_t proc, CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID, Range *verts, TupleList &vert_map) |
ErrorCode | get_processors (CCMIOID stateID, CCMIOID &processorID, CCMIOID &verticesID, CCMIOID &topologyID, CCMIOID &solutionID, std::vector< CCMIOSize_t > &procs, bool &has_solution) |
ErrorCode | get_state (CCMIOID rootID, CCMIOID &problemID, CCMIOID &stateID) |
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... | |
ErrorCode | load_matset_data (CCMIOID problemID) |
ErrorCode | load_neuset_data (CCMIOID problemID) |
ErrorCode | load_metadata (CCMIOID rootID, CCMIOID problemID, CCMIOID stateID, CCMIOID processorID, const EntityHandle *file_set) |
ErrorCode | read_topology_types (CCMIOID &topologyID, std::map< int, int > &cell_topo_types) |
ErrorCode | get_int_option (const char *opt_str, EntityHandle seth, Tag &tag, CCMIOID node) |
ErrorCode | get_dbl_option (const char *opt_str, EntityHandle seth, Tag &tag, CCMIOID node) |
ErrorCode | get_str_option (const char *opt_str, EntityHandle seth, Tag &tag, CCMIOID node, const char *tag_name=NULL) |
Private Attributes | |
Tag | mMaterialSetTag |
Cached tags for reading. Note that all these tags are defined when the core is initialized. More... | |
Tag | mDirichletSetTag |
Tag | mNeumannSetTag |
Tag | mHasMidNodesTag |
Tag | mGlobalIdTag |
Tag | mNameTag |
Tag | mMaterialIdTag |
Tag | mMaterialTypeTag |
Tag | mRadiationTag |
Tag | mPorosityIdTag |
Tag | mSpinIdTag |
Tag | mGroupIdTag |
Tag | mColorIdxTag |
Tag | mProcessorIdTag |
Tag | mLightMaterialTag |
Tag | mFreeSurfaceMaterialTag |
Tag | mThicknessTag |
Tag | mProstarRegionNumberTag |
Tag | mBoundaryTypeTag |
Tag | mCreatingProgramTag |
Interface * | mbImpl |
ReadUtilIface * | readMeshIface |
std::map< int, EntityHandle > | newMatsets |
std::map< int, EntityHandle > | newNeusets |
bool | hasSolution |
Definition at line 27 of file ReadCCMIO.hpp.
typedef std::map< int, std::vector< int > > moab::ReadCCMIO::SenseList |
Definition at line 32 of file ReadCCMIO.hpp.
typedef std::map< int, std::vector< EntityHandle > > moab::ReadCCMIO::TupleList |
Definition at line 31 of file ReadCCMIO.hpp.
moab::ReadCCMIO::ReadCCMIO | ( | Interface * | impl | ) |
Constructor.
Get and cache predefined tag handles
Definition at line 92 of file ReadCCMIO.cpp.
References DIRICHLET_SET_TAG_NAME, ErrorCode, moab::Interface::globalId_tag(), HAS_MID_NODES_TAG_NAME, MATERIAL_SET_TAG_NAME, MB_CHK_SET_ERR_RET, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mDirichletSetTag, mGlobalIdTag, mHasMidNodesTag, mMaterialSetTag, mNameTag, mNeumannSetTag, NAME_TAG_NAME, NAME_TAG_SIZE, NEUMANN_SET_TAG_NAME, moab::Interface::query_interface(), readMeshIface, and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 131 of file ReadCCMIO.cpp.
References mbImpl, readMeshIface, and moab::Interface::release_interface().
|
private |
Definition at line 621 of file ReadCCMIO.cpp.
References MB_SUCCESS, MBEDGE, MBHEX, MBMAXTYPE, MBPOLYHEDRON, MBPRISM, MBPYRAMID, MBQUAD, MBTET, and MBVERTEX.
Referenced by construct_cells().
|
private |
Definition at line 552 of file ReadCCMIO.cpp.
References ccmio_to_moab_type(), create_cell_from_faces(), ErrorCode, MB_SUCCESS, mbImpl, MBMAXTYPE, mGlobalIdTag, and moab::Interface::tag_set_data().
Referenced by read_cells().
|
private |
Definition at line 679 of file ReadCCMIO.cpp.
References moab::Range::begin(), moab::Interface::create_element(), moab::CN::EntityTypeName(), moab::Range::erase(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MBHEX, mbImpl, MBMAXTYPE, MBPOLYHEDRON, MBPRISM, MBPYRAMID, MBQUAD, MBTET, MBTRI, moab::MeshTopoUtil::opposite_entity(), moab::Range::size(), and moab::Interface::type_from_handle().
Referenced by construct_cells().
|
static |
Definition at line 87 of file ReadCCMIO.cpp.
References iface, and ReadCCMIO().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 316 of file ReadCCMIO.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_DOUBLE, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by load_matset_data().
|
private |
Definition at line 299 of file ReadCCMIO.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by load_matset_data(), and load_neuset_data().
|
private |
Definition at line 1176 of file ReadCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), hasSolution, and MB_SUCCESS.
Referenced by load_file().
|
private |
Definition at line 182 of file ReadCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), and MB_SUCCESS.
Referenced by load_file().
|
private |
Definition at line 334 of file ReadCCMIO.cpp.
References moab::error(), ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_OPAQUE, mbImpl, NAME_TAG_SIZE, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by load_matset_data(), load_metadata(), and load_neuset_data().
|
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 136 of file ReadCCMIO.cpp.
References moab::Interface::add_entities(), CHK_SET_CCMERR, moab::error(), ErrorCode, get_processors(), get_state(), load_metadata(), MB_CHK_SET_ERR, MB_SET_ERR, MB_UNSUPPORTED_OPERATION, mbImpl, and read_processor().
|
private |
Definition at line 238 of file ReadCCMIO.cpp.
References moab::error(), ErrorCode, get_dbl_option(), get_int_option(), get_str_option(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, mColorIdxTag, mFreeSurfaceMaterialTag, mGroupIdTag, mLightMaterialTag, mMaterialIdTag, mMaterialSetTag, mMaterialTypeTag, mNameTag, mPorosityIdTag, mProcessorIdTag, mRadiationTag, mSpinIdTag, mThicknessTag, NAME_TAG_SIZE, newMatsets, and moab::Interface::tag_set_data().
Referenced by load_metadata().
|
private |
Definition at line 200 of file ReadCCMIO.cpp.
References moab::error(), ErrorCode, get_str_option(), load_matset_data(), load_neuset_data(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_OPAQUE, mbImpl, mCreatingProgramTag, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by load_file().
|
private |
Definition at line 364 of file ReadCCMIO.cpp.
References moab::error(), ErrorCode, get_int_option(), get_str_option(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, mBoundaryTypeTag, mNameTag, mNeumannSetTag, mProstarRegionNumberTag, NAME_TAG_NAME, newNeusets, and moab::Interface::tag_set_data().
Referenced by load_metadata().
|
private |
Definition at line 1048 of file ReadCCMIO.cpp.
References moab::Interface::create_element(), ErrorCode, MB_SUCCESS, mbImpl, MBPOLYGON, MBQUAD, and MBTRI.
Referenced by read_faces().
|
private |
Definition at line 895 of file ReadCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), ErrorCode, MB_CHK_SET_ERR, and read_faces().
Referenced by read_cells().
|
private |
Definition at line 419 of file ReadCCMIO.cpp.
References construct_cells(), moab::Range::end(), ErrorCode, moab::Range::insert(), MB_CHK_SET_ERR, MB_SUCCESS, read_all_faces(), read_gids_and_types(), and read_topology_types().
Referenced by read_processor().
|
private |
Definition at line 950 of file ReadCCMIO.cpp.
References moab::Interface::add_entities(), CHK_SET_CCMERR, moab::Interface::create_meshset(), moab::error(), ErrorCode, make_faces(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MESHSET_SET, mGlobalIdTag, mNeumannSetTag, newNeusets, and moab::Interface::tag_set_data().
Referenced by read_all_faces().
|
private |
Definition at line 506 of file ReadCCMIO.cpp.
References moab::Interface::add_entities(), CHK_SET_CCMERR, moab::Interface::create_meshset(), moab::error(), ErrorCode, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MESHSET_SET, mGlobalIdTag, newMatsets, and moab::Interface::tag_set_data().
Referenced by read_cells().
|
private |
Definition at line 399 of file ReadCCMIO.cpp.
References ErrorCode, MB_CHK_SET_ERR, read_cells(), and read_vertices().
Referenced by load_file().
|
privatevirtual |
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 1202 of file ReadCCMIO.cpp.
|
private |
Definition at line 468 of file ReadCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), and MB_SUCCESS.
Referenced by read_cells().
|
private |
Definition at line 1093 of file ReadCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), ErrorCode, moab::ReadUtilIface::get_node_coords(), MB_CHK_SET_ERR, MB_START_ID, MB_SUCCESS, mbImpl, moab::Range::merge(), mGlobalIdTag, readMeshIface, and moab::Interface::tag_set_data().
Referenced by read_processor().
|
private |
Definition at line 169 of file ReadCCMIO.hpp.
Referenced by get_processors().
|
private |
Definition at line 163 of file ReadCCMIO.hpp.
Referenced by construct_cells(), create_cell_from_faces(), get_dbl_option(), get_int_option(), get_str_option(), load_file(), load_matset_data(), load_metadata(), load_neuset_data(), make_faces(), read_faces(), read_gids_and_types(), read_vertices(), and ~ReadCCMIO().
|
private |
Definition at line 161 of file ReadCCMIO.hpp.
Referenced by load_neuset_data().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 161 of file ReadCCMIO.hpp.
Referenced by load_metadata().
|
private |
Definition at line 153 of file ReadCCMIO.hpp.
Referenced by ReadCCMIO().
|
private |
Definition at line 160 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 156 of file ReadCCMIO.hpp.
Referenced by construct_cells(), read_faces(), read_gids_and_types(), read_vertices(), and ReadCCMIO().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 155 of file ReadCCMIO.hpp.
Referenced by ReadCCMIO().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 158 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 152 of file ReadCCMIO.hpp.
Referenced by load_matset_data(), and ReadCCMIO().
|
private |
Definition at line 158 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 157 of file ReadCCMIO.hpp.
Referenced by load_matset_data(), load_neuset_data(), and ReadCCMIO().
|
private |
Definition at line 154 of file ReadCCMIO.hpp.
Referenced by load_neuset_data(), read_faces(), and ReadCCMIO().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 161 of file ReadCCMIO.hpp.
Referenced by load_neuset_data().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 159 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 161 of file ReadCCMIO.hpp.
Referenced by load_matset_data().
|
private |
Definition at line 167 of file ReadCCMIO.hpp.
Referenced by load_matset_data(), and read_gids_and_types().
|
private |
Definition at line 167 of file ReadCCMIO.hpp.
Referenced by load_neuset_data(), and read_faces().
|
private |
Definition at line 165 of file ReadCCMIO.hpp.
Referenced by read_vertices(), ReadCCMIO(), and ~ReadCCMIO().