Output Exodus File for VERDE. More...
#include <ReadNCDF.hpp>
Public Member Functions | |
void | tokenize (const std::string &str, std::vector< std::string > &tokens, const char *delimiters) |
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 an ExoII 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... | |
ReadNCDF (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~ReadNCDF () |
Destructor. More... | |
ErrorCode | update (const char *exodus_file_name, const FileOptions &opts, const int num_blocks, const int *blocks_to_load, const EntityHandle file_set) |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Private Member Functions | |
bool | dimension_exists (const char *attrib_name) |
void | reset () |
ErrorCode | read_exodus_header () |
read the header from the ExoII file More... | |
ErrorCode | read_nodes (const Tag *file_id_tag) |
read the nodes More... | |
ErrorCode | read_face_blocks_headers () |
ErrorCode | read_block_headers (const int *blocks_to_load, const int num_blocks) |
read block headers, containing info about element type, number, etc. More... | |
ErrorCode | read_polyhedra_faces () |
ErrorCode | read_elements (const Tag *file_id_tag) |
read the element blocks More... | |
ErrorCode | read_global_ids () |
read in the global element ids More... | |
ErrorCode | read_nodesets () |
read the nodesets into meshsets More... | |
ErrorCode | read_sidesets () |
read the sidesets (does nothing for now) More... | |
int | exodus_file () |
exodus file bound to this object More... | |
int | number_dimensions () |
number of dimensions in this exo file More... | |
ErrorCode | get_type (char *exo_element_type, EntityType &elem_type) |
map a character exodusII element type to a TSTT type & topology More... | |
ErrorCode | get_type (EntityType &elem_type, std::string &exo_element_type) |
ErrorCode | read_qa_records (EntityHandle file_set) |
ErrorCode | read_qa_information (std::vector< std::string > &qa_record_list) |
ErrorCode | read_qa_string (char *string, int record_number, int record_position) |
ErrorCode | create_ss_elements (int *element_ids, int *side_list, int num_sides, int num_dist_factors, std::vector< EntityHandle > &entities_to_add, std::vector< EntityHandle > &reverse_entities, std::vector< double > &dist_factor_vector, int ss_seq_id) |
ErrorCode | find_side_element_type (const int element_id, ExoIIElementType &type, ReadBlockData &block_data, int &df_index, int side_id) |
ErrorCode | create_sideset_element (const std::vector< EntityHandle > &, EntityType, EntityHandle &, int &) |
creates an element with the given connectivity More... | |
int | get_number_nodes (EntityHandle handle) |
Private Attributes | |
ReadUtilIface * | readMeshIface |
Interface * | mdbImpl |
interface instance More... | |
int | ncFile |
int | CPU_WORD_SIZE |
int | IO_WORD_SIZE |
int | vertexOffset |
int to offset vertex ids with More... | |
std::string | exodusFile |
file name More... | |
int | numberNodes_loading |
number of nodes in the current exoII file More... | |
int | numberElements_loading |
number of elements in the current exoII file More... | |
int | numberElementBlocks_loading |
number of blocks in the current exoII file More... | |
int | numberFaceBlocks_loading |
number of face blocks in the current exoII file (used for polyhedra) More... | |
int | numberNodeSets_loading |
number of nodesets in the current exoII file More... | |
int | numberSideSets_loading |
number of sidesets in the current exoII file More... | |
int | numberDimensions_loading |
EntityHandle | mCurrentMeshHandle |
Meshset Handle for the mesh that is currently being read. More... | |
std::vector< char > | nodesInLoadedBlocks |
std::vector< ReadBlockData > | blocksLoading |
std::vector< EntityHandle > | polyfaces |
std::vector< ReadFaceBlockData > | faceBlocksLoading |
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 | mDistFactorTag |
Tag | mGlobalIdTag |
Tag | mQaRecordTag |
int | max_line_length |
int | max_str_length |
Range | initRange |
range of entities in initial mesh, before this read More... | |
Output Exodus File for VERDE.
Definition at line 73 of file ReadNCDF.hpp.
moab::ReadNCDF::ReadNCDF | ( | Interface * | impl = NULL | ) |
Constructor.
Get and cache predefined tag handles
Definition at line 140 of file ReadNCDF.cpp.
References DIRICHLET_SET_TAG_NAME, ErrorCode, moab::Interface::globalId_tag(), HAS_MID_NODES_TAG_NAME, MATERIAL_SET_TAG_NAME, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TAG_VARLEN, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mDirichletSetTag, mDistFactorTag, mGlobalIdTag, mHasMidNodesTag, mMaterialSetTag, mNeumannSetTag, mQaRecordTag, ncFile, NEUMANN_SET_TAG_NAME, moab::Interface::query_interface(), readMeshIface, reset(), and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 209 of file ReadNCDF.cpp.
References mdbImpl, readMeshIface, and moab::Interface::release_interface().
|
private |
creates an element with the given connectivity
Definition at line 1597 of file ReadNCDF.cpp.
References moab::Interface::create_element(), moab::CN::Dimension(), moab::error(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), MB_SUCCESS, mdbImpl, and moab::CN::VerticesPerEntity().
Referenced by create_ss_elements().
|
private |
Definition at line 1357 of file ReadNCDF.cpp.
References create_sideset_element(), moab::ReadBlockData::elemType, moab::EXOII_MAX_ELEM_TYPE, moab::EXOII_SHELL, moab::EXOII_SHELL9, moab::ExoIIUtil::ExoIIElementMBEntity, find_side_element_type(), GET_1D_DBL_VAR, moab::Interface::get_connectivity(), INS_ID, max_str_length, MB_SET_ERR, MB_SUCCESS, MBHEX, MBQUAD, MBTET, MBTRI, mdbImpl, number_dimensions(), moab::ReadBlockData::startExoId, moab::ReadBlockData::startMBId, and moab::CN::SubEntityNodeIndices().
Referenced by read_sidesets().
|
private |
|
private |
exodus file bound to this object
|
static |
Definition at line 135 of file ReadNCDF.cpp.
References iface, and ReadNCDF().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 1677 of file ReadNCDF.cpp.
References blocksLoading, moab::EXOII_HEX, moab::EXOII_HEX27, moab::EXOII_MAX_ELEM_TYPE, moab::EXOII_QUAD, moab::EXOII_QUAD9, moab::EXOII_SHELL, moab::EXOII_SHELL9, moab::EXOII_TETRA, moab::EXOII_TETRA14, moab::EXOII_TRI, moab::EXOII_TRI7, and MB_SUCCESS.
Referenced by create_ss_elements().
|
private |
|
private |
map a character exodusII element type to a TSTT type & topology
|
private |
|
virtual |
load an ExoII file
Implements moab::ReaderIface.
Definition at line 284 of file ReadNCDF.cpp.
References ErrorCode, moab::fail(), moab::Interface::get_entities_by_handle(), moab::FileOptions::get_str_option(), initRange, MATERIAL_SET_TAG_NAME, MB_FILE_DOES_NOT_EXIST, MB_SET_ERR, MB_SUCCESS, MB_UNSUPPORTED_OPERATION, mdbImpl, ncFile, moab::ReaderIface::SubsetList::num_parts, moab::ReaderIface::IDTag::num_tag_values, numberFaceBlocks_loading, read_block_headers(), read_elements(), read_exodus_header(), read_face_blocks_headers(), read_global_ids(), read_nodes(), read_nodesets(), read_polyhedra_faces(), read_qa_records(), read_sidesets(), reset(), moab::ReaderIface::SubsetList::tag_list, moab::ReaderIface::SubsetList::tag_list_length, moab::ReaderIface::IDTag::tag_name, moab::ReaderIface::IDTag::tag_values, and update().
|
inlineprivate |
number of dimensions in this exo file
Definition at line 255 of file ReadNCDF.hpp.
References numberDimensions_loading.
Referenced by create_ss_elements().
|
private |
read block headers, containing info about element type, number, etc.
Definition at line 553 of file ReadNCDF.cpp.
References moab::ReadBlockData::blockId, blocksLoading, moab::ReadBlockData::elemType, moab::EXOII_MAX_ELEM_TYPE, GET_1D_INT_VAR, GET_DIMB, max_str_length, MB_SET_ERR, MB_SUCCESS, numberElementBlocks_loading, moab::ReadBlockData::numElements, moab::ReadBlockData::reading_in, and moab::ReadBlockData::startExoId.
Referenced by load_file(), and update().
read the element blocks
Definition at line 729 of file ReadNCDF.cpp.
References moab::Interface::add_entities(), moab::ReadUtilIface::assign_ids(), blocksLoading, moab::Interface::create_element(), moab::Interface::create_meshset(), exodus_elem_order_map, moab::ExoIIUtil::ExoIIElementMBEntity, moab::fail(), GET_DIMB, moab::ReadUtilIface::get_element_connect(), GET_VAR, moab::CN::HasMidNodes(), INS_ID, moab::Range::insert(), max_str_length, MB_SET_ERR, MB_SUCCESS, MBPOLYGON, MBPOLYHEDRON, mdbImpl, MESHSET_SET, MESHSET_TRACK_OWNER, mGlobalIdTag, mHasMidNodesTag, mMaterialSetTag, ncFile, nodesInLoadedBlocks, numberNodes_loading, polyfaces, readMeshIface, moab::ReadUtilIface::reorder(), moab::ExoIIUtil::static_element_name_to_type(), moab::Interface::tag_set_data(), moab::ReadUtilIface::update_adjacencies(), vertexOffset, and moab::ExoIIUtil::VerticesPerElement.
Referenced by load_file().
|
private |
read the header from the ExoII file
Definition at line 393 of file ReadNCDF.cpp.
References CPU_WORD_SIZE, moab::fail(), GET_DIM, IO_WORD_SIZE, max_line_length, max_str_length, MB_SET_ERR, MB_SUCCESS, ncFile, numberDimensions_loading, numberElementBlocks_loading, numberElements_loading, numberFaceBlocks_loading, numberNodes_loading, numberNodeSets_loading, and numberSideSets_loading.
Referenced by load_file(), read_tag_values(), and update().
|
private |
Definition at line 620 of file ReadNCDF.cpp.
References moab::ReadFaceBlockData::faceBlockId, faceBlocksLoading, GET_1D_INT_VAR, GET_DIMB, max_str_length, MB_SET_ERR, MB_SUCCESS, numberFaceBlocks_loading, moab::ReadFaceBlockData::numElements, and moab::ReadFaceBlockData::startExoId.
Referenced by load_file().
|
private |
read in the global element ids
Definition at line 996 of file ReadNCDF.cpp.
References blocksLoading, moab::error(), ErrorCode, moab::EXOII_POLYGON, moab::EXOII_POLYHEDRON, GET_1D_INT_VAR, MB_SET_ERR, MB_START_ID, MB_SUCCESS, mdbImpl, mGlobalIdTag, numberElements_loading, numberNodes_loading, moab::Interface::tag_set_data(), and vertexOffset.
Referenced by load_file().
read the nodes
Definition at line 483 of file ReadNCDF.cpp.
References moab::ReadUtilIface::assign_ids(), moab::fail(), moab::ReadUtilIface::get_node_coords(), moab::ID_FROM_HANDLE(), moab::Range::insert(), MB_SET_ERR, MB_START_ID, MB_SUCCESS, ncFile, numberDimensions_loading, numberNodes_loading, readMeshIface, and vertexOffset.
Referenced by load_file().
|
private |
read the nodesets into meshsets
Definition at line 1050 of file ReadNCDF.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::CREATE_HANDLE(), moab::Interface::create_meshset(), moab::Range::end(), GET_1D_DBL_VAR, GET_1D_INT_VAR, GET_DIMB, moab::Interface::get_entities_by_handle(), initRange, INS_ID, max_str_length, MB_SET_ERR, MB_SUCCESS, MBVERTEX, mdbImpl, mDirichletSetTag, mDistFactorTag, MESHSET_TRACK_OWNER, mGlobalIdTag, nodesInLoadedBlocks, numberNodeSets_loading, size, moab::subtract(), moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::Interface::tag_set_by_ptr(), moab::Interface::tag_set_data(), and vertexOffset.
Referenced by load_file().
|
private |
Definition at line 660 of file ReadNCDF.cpp.
References moab::Interface::create_element(), faceBlocksLoading, moab::fail(), GET_DIMB, GET_VAR, INS_ID, max_str_length, MB_SET_ERR, MB_SUCCESS, MBPOLYGON, mdbImpl, ncFile, nodesInLoadedBlocks, numberNodes_loading, polyfaces, and vertexOffset.
Referenced by load_file().
|
private |
Definition at line 1751 of file ReadNCDF.cpp.
References GET_DIM, max_str_length, MB_SUCCESS, and read_qa_string().
Referenced by read_qa_records().
|
private |
Definition at line 1725 of file ReadNCDF.cpp.
References MB_SUCCESS, mdbImpl, mQaRecordTag, read_qa_information(), size, and moab::Interface::tag_set_by_ptr().
Referenced by load_file().
|
private |
Definition at line 1775 of file ReadNCDF.cpp.
References moab::fail(), GET_VAR, max_str_length, MB_SET_ERR, MB_SUCCESS, and ncFile.
Referenced by read_qa_information().
|
private |
read the sidesets (does nothing for now)
Definition at line 1205 of file ReadNCDF.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Interface::create_meshset(), create_ss_elements(), moab::Range::end(), ErrorCode, GET_1D_INT_VAR, GET_DIMB, moab::Interface::get_entities_by_type(), initRange, INS_ID, max_str_length, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mdbImpl, mDistFactorTag, MESHSET_SET, MESHSET_TRACK_OWNER, mGlobalIdTag, mNeumannSetTag, numberSideSets_loading, size, moab::subtract(), moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_by_ptr(), and moab::Interface::tag_set_data().
Referenced by load_file().
|
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 214 of file ReadNCDF.cpp.
References DIRICHLET_SET_TAG_NAME, ErrorCode, moab::fail(), GET_1D_INT_VAR, MATERIAL_SET_TAG_NAME, MB_FILE_DOES_NOT_EXIST, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_UNSUPPORTED_OPERATION, ncFile, NEUMANN_SET_TAG_NAME, numberElementBlocks_loading, numberNodeSets_loading, numberSideSets_loading, and read_exodus_header().
|
private |
Definition at line 189 of file ReadNCDF.cpp.
References blocksLoading, faceBlocksLoading, mCurrentMeshHandle, nodesInLoadedBlocks, numberDimensions_loading, numberElementBlocks_loading, numberElements_loading, numberFaceBlocks_loading, numberNodes_loading, numberNodeSets_loading, numberSideSets_loading, and vertexOffset.
Referenced by load_file(), and ReadNCDF().
void moab::ReadNCDF::tokenize | ( | const std::string & | str, |
std::vector< std::string > & | tokens, | ||
const char * | delimiters | ||
) |
ErrorCode moab::ReadNCDF::update | ( | const char * | exodus_file_name, |
const FileOptions & | opts, | ||
const int | num_blocks, | ||
const int * | blocks_to_load, | ||
const EntityHandle | file_set | ||
) |
Definition at line 1802 of file ReadNCDF.cpp.
References moab::CartVect::array(), moab::Range::begin(), blocksLoading, moab::AdaptiveKDTree::build_tree(), moab::Interface::delete_entities(), moab::CN::Dimension(), moab::AdaptiveKDTree::distance_search(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::ExoIIUtil::ExoIIElementMBEntity, moab::fail(), GET_1D_DBL_VAR, GET_1D_INT_VAR, moab::Interface::get_adjacencies(), moab::Interface::get_coords(), GET_DIM, moab::Interface::get_entities_by_type(), moab::Interface::get_entities_by_type_and_tag(), moab::FileOptions::get_str_option(), moab::AdaptiveKDTree::get_tree_iterator(), GET_VAR, moab::Range::insert(), moab::Interface::INTERSECT, moab::CartVect::length(), moab::Interface::list_entities(), max_str_length, MB_CHK_ERR, MB_FILE_DOES_NOT_EXIST, MB_INVALID_SIZE, MB_NOT_IMPLEMENTED, MB_SET_ERR, MB_SUCCESS, MB_TYPE_OUT_OF_RANGE, MBVERTEX, mdbImpl, mGlobalIdTag, ncFile, numberDimensions_loading, numberNodes_loading, read_block_headers(), read_exodus_header(), moab::Interface::remove_entities(), moab::Interface::set_coords(), moab::Range::size(), moab::ExoIIUtil::static_element_name_to_type(), moab::Interface::tag_get_data(), tokenize(), and moab::ExoIIUtil::VerticesPerElement.
Referenced by load_file().
|
private |
Definition at line 231 of file ReadNCDF.hpp.
Referenced by find_side_element_type(), read_block_headers(), read_elements(), read_global_ids(), reset(), and update().
|
private |
Definition at line 194 of file ReadNCDF.hpp.
Referenced by read_exodus_header().
|
private |
file name
Definition at line 201 of file ReadNCDF.hpp.
|
private |
Definition at line 236 of file ReadNCDF.hpp.
Referenced by read_face_blocks_headers(), read_polyhedra_faces(), and reset().
|
private |
range of entities in initial mesh, before this read
Definition at line 251 of file ReadNCDF.hpp.
Referenced by load_file(), read_nodesets(), and read_sidesets().
|
private |
Definition at line 195 of file ReadNCDF.hpp.
Referenced by read_exodus_header().
|
private |
Definition at line 248 of file ReadNCDF.hpp.
Referenced by read_exodus_header().
|
private |
Definition at line 248 of file ReadNCDF.hpp.
Referenced by create_ss_elements(), read_block_headers(), read_elements(), read_exodus_header(), read_face_blocks_headers(), read_nodesets(), read_polyhedra_faces(), read_qa_information(), read_qa_string(), read_sidesets(), and update().
|
private |
Meshset Handle for the mesh that is currently being read.
Definition at line 224 of file ReadNCDF.hpp.
Referenced by reset().
|
private |
interface instance
Definition at line 190 of file ReadNCDF.hpp.
Referenced by create_sideset_element(), create_ss_elements(), load_file(), read_elements(), read_global_ids(), read_nodesets(), read_polyhedra_faces(), read_qa_records(), read_sidesets(), update(), and ~ReadNCDF().
|
private |
Definition at line 241 of file ReadNCDF.hpp.
Referenced by read_nodesets(), and ReadNCDF().
|
private |
Definition at line 244 of file ReadNCDF.hpp.
Referenced by read_nodesets(), read_sidesets(), and ReadNCDF().
|
private |
Definition at line 245 of file ReadNCDF.hpp.
Referenced by read_elements(), read_global_ids(), read_nodesets(), read_sidesets(), ReadNCDF(), and update().
|
private |
Definition at line 243 of file ReadNCDF.hpp.
Referenced by read_elements(), and ReadNCDF().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 240 of file ReadNCDF.hpp.
Referenced by read_elements(), and ReadNCDF().
|
private |
Definition at line 242 of file ReadNCDF.hpp.
Referenced by read_sidesets(), and ReadNCDF().
|
private |
Definition at line 246 of file ReadNCDF.hpp.
Referenced by read_qa_records(), and ReadNCDF().
|
private |
Definition at line 192 of file ReadNCDF.hpp.
Referenced by load_file(), read_elements(), read_exodus_header(), read_nodes(), read_polyhedra_faces(), read_qa_string(), read_tag_values(), ReadNCDF(), and update().
|
private |
Definition at line 227 of file ReadNCDF.hpp.
Referenced by read_elements(), read_nodesets(), read_polyhedra_faces(), and reset().
|
private |
Definition at line 221 of file ReadNCDF.hpp.
Referenced by number_dimensions(), read_exodus_header(), read_nodes(), reset(), and update().
|
private |
number of blocks in the current exoII file
Definition at line 210 of file ReadNCDF.hpp.
Referenced by read_block_headers(), read_exodus_header(), read_tag_values(), and reset().
|
private |
number of elements in the current exoII file
Definition at line 207 of file ReadNCDF.hpp.
Referenced by read_exodus_header(), read_global_ids(), and reset().
|
private |
number of face blocks in the current exoII file (used for polyhedra)
Definition at line 213 of file ReadNCDF.hpp.
Referenced by load_file(), read_exodus_header(), read_face_blocks_headers(), and reset().
|
private |
number of nodes in the current exoII file
Definition at line 204 of file ReadNCDF.hpp.
Referenced by read_elements(), read_exodus_header(), read_global_ids(), read_nodes(), read_polyhedra_faces(), reset(), and update().
|
private |
number of nodesets in the current exoII file
Definition at line 216 of file ReadNCDF.hpp.
Referenced by read_exodus_header(), read_nodesets(), read_tag_values(), and reset().
|
private |
number of sidesets in the current exoII file
Definition at line 219 of file ReadNCDF.hpp.
Referenced by read_exodus_header(), read_sidesets(), read_tag_values(), and reset().
|
private |
Definition at line 233 of file ReadNCDF.hpp.
Referenced by read_elements(), and read_polyhedra_faces().
|
private |
Definition at line 108 of file ReadNCDF.hpp.
Referenced by read_elements(), read_nodes(), ReadNCDF(), and ~ReadNCDF().
|
private |
int to offset vertex ids with
Definition at line 198 of file ReadNCDF.hpp.
Referenced by read_elements(), read_global_ids(), read_nodes(), read_nodesets(), read_polyhedra_faces(), and reset().