Output Exodus File for VERDE. More...
#include <WriteNCDF.hpp>
Classes | |
struct | ExodusMeshInfo |
contains the general information about a mesh More... | |
Public Member Functions | |
WriteNCDF (Interface *impl) | |
Constructor. More... | |
virtual | ~WriteNCDF () |
Destructor. More... | |
ErrorCode | write_file (const char *exodus_file_name, const bool overwrite, const FileOptions &opts, const EntityHandle *output_list, const int num_sets, const std::vector< std::string > &qa_records, const Tag *=NULL, int=0, int user_dimension=3) |
writes out an ExoII file More... | |
Public Member Functions inherited from moab::WriterIface | |
virtual | ~WriterIface () |
Static Public Member Functions | |
static WriterIface * | factory (Interface *) |
Protected Member Functions | |
ErrorCode | open_file (const char *file_name) |
number of dimensions in this exo file More... | |
Private Member Functions | |
ErrorCode | gather_mesh_information (ExodusMeshInfo &mesh_info, std::vector< MaterialSetData > &block_info, std::vector< NeumannSetData > &sideset_info, std::vector< DirichletSetData > &nodeset_info, std::vector< EntityHandle > &blocks, std::vector< EntityHandle > &sidesets, std::vector< EntityHandle > &nodesets) |
ErrorCode | write_header (ExodusMeshInfo &mesh_info, std::vector< MaterialSetData > &block_info, std::vector< NeumannSetData > &sideset_info, std::vector< DirichletSetData > &nodeset_info, const char *filename) |
ErrorCode | initialize_exodus_file (ExodusMeshInfo &mesh_info, std::vector< MaterialSetData > &block_data, std::vector< NeumannSetData > &sideset_data, std::vector< DirichletSetData > &nodeset_data, const char *title_string, bool write_maps=true, bool write_sideset_distribution_factors=true) |
ErrorCode | write_qa_string (const char *string, int record_number, int record_position) |
ErrorCode | write_qa_records (std::vector< std::string > &qa_record_list) |
ErrorCode | write_nodes (int num_nodes, Range &nodes, int dimension) |
ErrorCode | write_poly_faces (ExodusMeshInfo &mesh_info) |
ErrorCode | write_elementblocks (ExodusMeshInfo &mesh_info, std::vector< MaterialSetData > &block_data) |
ErrorCode | write_exodus_integer_variable (const char *variable_name, int *variable_array, int start_position, int number_values) |
ErrorCode | write_global_node_order_map (int num_nodes, Range &nodes) |
ErrorCode | write_global_element_order_map (int num_elements) |
ErrorCode | write_element_order_map (int num_elements) |
ErrorCode | write_BCs (std::vector< NeumannSetData > &sidesets, std::vector< DirichletSetData > &nodesets) |
ErrorCode | find_side_element_type (const int element_id, ExoIIElementType &type) |
void | reset_block (std::vector< MaterialSetData > &block_info) |
free up allocated Ranges More... | |
ErrorCode | get_sideset_elems (EntityHandle sideset, int current_sense, Range &forward_elems, Range &reverse_elems) |
recursive function; given a meshset handle, get the entities and put them on the right list, then call recursively for any contained meshsets, first checking for sense reversals More... | |
ErrorCode | get_valid_sides (Range &elems, ExodusMeshInfo &mesh_info, const int sense, NeumannSetData &sideset_data) |
Static Private Member Functions | |
static void | time_and_date (char *time_string, char *date_string) |
get the time and date in strings More... | |
Private Attributes | |
Interface * | mdbImpl |
interface instance More... | |
WriteUtilIface * | mWriteIface |
std::string | exodusFile |
file name More... | |
int | ncFile |
EntityHandle | mCurrentMeshHandle |
Meshset Handle for the mesh that is currently being read. More... | |
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 | mGeomDimensionTag |
Tag | mDistFactorTag |
Tag | mGlobalIdTag |
Tag | mQaRecordTag |
Tag | mEntityMark |
int | repeat_face_blocks |
Output Exodus File for VERDE.
Definition at line 85 of file WriteNCDF.hpp.
moab::WriteNCDF::WriteNCDF | ( | Interface * | impl | ) |
Constructor.
Get and cache predefined tag handles
Definition at line 100 of file WriteNCDF.cpp.
References DIRICHLET_SET_TAG_NAME, moab::Interface::globalId_tag(), HAS_MID_NODES_TAG_NAME, MATERIAL_SET_TAG_NAME, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TAG_VARLEN, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mDirichletSetTag, mDistFactorTag, mEntityMark, mGlobalIdTag, mHasMidNodesTag, mMaterialSetTag, mNeumannSetTag, mQaRecordTag, mWriteIface, NEUMANN_SET_TAG_NAME, moab::Interface::query_interface(), and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 133 of file WriteNCDF.cpp.
References mdbImpl, mEntityMark, mWriteIface, ncFile, moab::Interface::release_interface(), and moab::Interface::tag_delete().
|
static |
Definition at line 95 of file WriteNCDF.cpp.
References iface, and WriteNCDF().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
|
private |
Definition at line 364 of file WriteNCDF.cpp.
References moab::Range::all_of_type(), moab::Range::back(), moab::Range::begin(), moab::CN::Dimension(), moab::MaterialSetData::element_type, moab::MaterialSetData::elements, moab::NeumannSetData::elements, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::EXOII_MAX_ELEM_TYPE, moab::EXOII_POLYGON, moab::EXOII_POLYHEDRON, moab::Range::front(), moab::WriteUtilIface::gather_nodes_from_elements(), moab::Interface::get_connectivity(), moab::ExoIIUtil::get_element_type_from_num_verts(), moab::Interface::get_entities_by_handle(), moab::Interface::get_parent_meshsets(), get_sideset_elems(), get_valid_sides(), moab::MaterialSetData::id, moab::DirichletSetData::id, moab::NeumannSetData::id, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TYPE_BIT, MB_TYPE_OUT_OF_RANGE, MBEDGE, MBQUAD, MBTRI, MBVERTEX, mdbImpl, mDirichletSetTag, mDistFactorTag, mEntityMark, moab::NeumannSetData::mesh_set_handle, mMaterialSetTag, mNeumannSetTag, mQaRecordTag, mWriteIface, moab::DirichletSetData::node_dist_factors, moab::DirichletSetData::nodes, moab::WriteNCDF::ExodusMeshInfo::nodes, moab::WriteNCDF::ExodusMeshInfo::num_dim, moab::WriteNCDF::ExodusMeshInfo::num_elementblocks, moab::WriteNCDF::ExodusMeshInfo::num_elements, moab::WriteNCDF::ExodusMeshInfo::num_nodes, moab::WriteNCDF::ExodusMeshInfo::num_polyhedra_blocks, moab::MaterialSetData::number_attributes, moab::MaterialSetData::number_elements, moab::NeumannSetData::number_elements, moab::DirichletSetData::number_nodes, moab::MaterialSetData::number_nodes_per_element, moab::WriteNCDF::ExodusMeshInfo::polyhedronFaces, moab::WriteNCDF::ExodusMeshInfo::qaRecords, size, moab::Range::size(), moab::Range::subset_by_dimension(), moab::subtract(), moab::Interface::tag_delete(), moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), moab::TYPE_FROM_HANDLE(), and moab::ExoIIUtil::VerticesPerElement.
Referenced by write_file().
|
private |
recursive function; given a meshset handle, get the entities and put them on the right list, then call recursively for any contained meshsets, first checking for sense reversals
Definition at line 2285 of file WriteNCDF.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Interface::get_entities_by_handle(), MB_TYPE_INTEGER, MBENTITYSET, mdbImpl, moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::TYPE_FROM_HANDLE().
Referenced by gather_mesh_information().
|
private |
Definition at line 650 of file WriteNCDF.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::NeumannSetData::elements, moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::NeumannSetData::id, MB_CHK_SET_ERR, MB_SUCCESS, MBPOLYGON, mdbImpl, mDistFactorTag, mEntityMark, moab::NeumannSetData::mesh_set_handle, moab::Interface::side_number(), moab::NeumannSetData::side_numbers, moab::NeumannSetData::ss_dist_factors, moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::TYPE_FROM_HANDLE(), and moab::CN::VerticesPerEntity().
Referenced by gather_mesh_information().
|
private |
Definition at line 1569 of file WriteNCDF.cpp.
References moab::Range::begin(), moab::MaterialSetData::element_type, moab::MaterialSetData::elements, moab::ExoIIUtil::ElementTypeNames, moab::Range::end(), ErrorCode, moab::EXOII_POLYGON, moab::EXOII_POLYHEDRON, moab::Interface::get_connectivity(), moab::MaterialSetData::id, moab::DirichletSetData::id, moab::NeumannSetData::id, INS_ID, length(), moab::ExoIIInterface::MAX_STR_LENGTH, MB_CHK_ERR, MB_SET_ERR, MB_SET_ERR_CONT, MB_SUCCESS, mdbImpl, ncFile, moab::WriteNCDF::ExodusMeshInfo::num_dim, moab::WriteNCDF::ExodusMeshInfo::num_elementblocks, moab::WriteNCDF::ExodusMeshInfo::num_elements, moab::WriteNCDF::ExodusMeshInfo::num_nodes, moab::MaterialSetData::number_attributes, moab::MaterialSetData::number_elements, moab::NeumannSetData::number_elements, moab::DirichletSetData::number_nodes, moab::MaterialSetData::number_nodes_per_element, moab::WriteNCDF::ExodusMeshInfo::polyhedronFaces, moab::WriteNCDF::ExodusMeshInfo::qaRecords, repeat_face_blocks, moab::Range::size(), and moab::NeumannSetData::ss_dist_factors.
Referenced by write_header().
|
protected |
number of dimensions in this exo file
open an ExoII file for writing
Definition at line 2266 of file WriteNCDF.cpp.
References moab::fail(), MB_SET_ERR, MB_SUCCESS, and ncFile.
|
private |
|
staticprivate |
get the time and date in strings
Definition at line 152 of file WriteNCDF.cpp.
References moab::TIME_STR_LEN.
Referenced by write_file(), and write_header().
|
private |
Definition at line 1363 of file WriteNCDF.cpp.
References moab::NeumannSetData::elements, ErrorCode, moab::fail(), GET_VAR, moab::NeumannSetData::id, moab::ID_FROM_HANDLE(), INS_ID, MB_CHK_SET_ERR, MB_CHK_SET_ERR_RET_VAL, MB_SET_ERR, MB_SUCCESS, mdbImpl, mGlobalIdTag, ncFile, moab::NeumannSetData::number_elements, moab::NeumannSetData::side_numbers, moab::NeumannSetData::ss_dist_factors, moab::Interface::tag_get_data(), and write_exodus_integer_variable().
Referenced by write_file().
|
private |
Definition at line 1289 of file WriteNCDF.cpp.
References moab::error(), MB_SET_ERR, MB_SUCCESS, and write_exodus_integer_variable().
Referenced by write_file().
|
private |
Definition at line 1035 of file WriteNCDF.cpp.
References moab::Range::all_of_type(), moab::Range::begin(), moab::MaterialSetData::element_type, moab::MaterialSetData::elements, moab::Range::end(), ErrorCode, exodus_elem_order_map, moab::EXOII_POLYGON, moab::EXOII_POLYHEDRON, moab::ExoIIUtil::ExoIIElementMBEntity, moab::fail(), moab::Interface::get_connectivity(), moab::WriteUtilIface::get_element_connect(), GET_VAR, moab::MaterialSetData::id, moab::Range::index(), INS_ID, MB_CHK_ERR, MB_SET_ERR, MB_SET_ERR_CONT, MB_SUCCESS, mdbImpl, mGlobalIdTag, mWriteIface, ncFile, moab::MaterialSetData::number_elements, moab::MaterialSetData::number_nodes_per_element, moab::WriteNCDF::ExodusMeshInfo::polyhedronFaces, moab::WriteUtilIface::reorder(), moab::Range::size(), and write_exodus_integer_variable().
Referenced by write_file().
|
private |
Definition at line 1317 of file WriteNCDF.cpp.
References moab::fail(), GET_VAR, MB_SET_ERR, MB_SUCCESS, and ncFile.
Referenced by write_BCs(), write_element_order_map(), write_elementblocks(), write_global_element_order_map(), write_global_node_order_map(), and write_poly_faces().
|
virtual |
writes out an ExoII file
Implements moab::WriterIface.
Definition at line 170 of file WriteNCDF.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Range::clear(), moab::Interface::create_meshset(), moab::Range::empty(), moab::Range::end(), entities, moab::fail(), gather_mesh_information(), moab::Interface::get_dimension(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), moab::FileOptions::get_null_option(), GET_VAR, MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_SUCCESS, MBENTITYSET, mdbImpl, mDirichletSetTag, MESHSET_SET, mMaterialSetTag, mNeumannSetTag, ncFile, moab::WriteNCDF::ExodusMeshInfo::nodes, moab::WriteNCDF::ExodusMeshInfo::num_dim, moab::WriteNCDF::ExodusMeshInfo::num_elements, moab::WriteNCDF::ExodusMeshInfo::num_nodes, moab::WriteNCDF::ExodusMeshInfo::polyhedronFaces, moab::WriteNCDF::ExodusMeshInfo::qaRecords, repeat_face_blocks, reset_block(), moab::Interface::tag_get_data(), moab::Interface::tag_set_data(), time_and_date(), write_BCs(), write_element_order_map(), write_elementblocks(), write_global_element_order_map(), write_global_node_order_map(), write_header(), write_nodes(), write_poly_faces(), and write_qa_records().
|
private |
Definition at line 1263 of file WriteNCDF.cpp.
References moab::error(), MB_SET_ERR, MB_SUCCESS, and write_exodus_integer_variable().
Referenced by write_file().
Definition at line 1228 of file WriteNCDF.cpp.
References moab::Range::begin(), moab::Range::end(), moab::error(), moab::ID_FROM_HANDLE(), MB_SET_ERR, MB_SUCCESS, and write_exodus_integer_variable().
Referenced by write_file().
|
private |
Definition at line 1004 of file WriteNCDF.cpp.
References initialize_exodus_file(), moab::ExoIIInterface::MAX_LINE_LENGTH, MB_SUCCESS, time_and_date(), and moab::TIME_STR_LEN.
Referenced by write_file().
Definition at line 799 of file WriteNCDF.cpp.
References ErrorCode, moab::fail(), moab::WriteUtilIface::get_node_coords(), GET_VAR, moab::ExoIIInterface::MAX_STR_LENGTH, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_DOUBLE, mdbImpl, MESH_TRANSFORM_TAG_NAME, mGlobalIdTag, mWriteIface, ncFile, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_file().
|
private |
Definition at line 924 of file WriteNCDF.cpp.
References moab::Range::begin(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::fail(), moab::Interface::get_connectivity(), GET_DIM, GET_VAR, INS_ID, MB_CHK_ERR, MB_SET_ERR, MB_SET_ERR_CONT, MB_SUCCESS, mdbImpl, ncFile, moab::WriteNCDF::ExodusMeshInfo::num_polyhedra_blocks, moab::WriteNCDF::ExodusMeshInfo::polyhedronFaces, repeat_face_blocks, moab::Range::size(), and write_exodus_integer_variable().
Referenced by write_file().
|
private |
Definition at line 755 of file WriteNCDF.cpp.
References MB_SUCCESS, and write_qa_string().
Referenced by write_file().
|
private |
Definition at line 769 of file WriteNCDF.cpp.
References moab::fail(), GET_VAR, MB_SET_ERR, MB_SUCCESS, and ncFile.
Referenced by write_qa_records().
|
private |
file name
Definition at line 135 of file WriteNCDF.hpp.
|
private |
Meshset Handle for the mesh that is currently being read.
Definition at line 139 of file WriteNCDF.hpp.
|
private |
interface instance
Definition at line 131 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), get_sideset_elems(), get_valid_sides(), initialize_exodus_file(), write_BCs(), write_elementblocks(), write_file(), write_nodes(), write_poly_faces(), and ~WriteNCDF().
|
private |
Definition at line 144 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteNCDF().
|
private |
Definition at line 148 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), get_valid_sides(), and WriteNCDF().
|
private |
Definition at line 152 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), get_valid_sides(), WriteNCDF(), and ~WriteNCDF().
|
private |
Definition at line 147 of file WriteNCDF.hpp.
|
private |
Definition at line 149 of file WriteNCDF.hpp.
Referenced by write_BCs(), write_elementblocks(), write_nodes(), and WriteNCDF().
|
private |
Definition at line 146 of file WriteNCDF.hpp.
Referenced by WriteNCDF().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 143 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteNCDF().
|
private |
Definition at line 145 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteNCDF().
|
private |
Definition at line 150 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), and WriteNCDF().
|
private |
Definition at line 132 of file WriteNCDF.hpp.
Referenced by gather_mesh_information(), write_elementblocks(), write_nodes(), WriteNCDF(), and ~WriteNCDF().
|
private |
Definition at line 136 of file WriteNCDF.hpp.
Referenced by initialize_exodus_file(), open_file(), write_BCs(), write_elementblocks(), write_exodus_integer_variable(), write_file(), write_nodes(), write_poly_faces(), write_qa_string(), and ~WriteNCDF().
|
private |
Definition at line 154 of file WriteNCDF.hpp.
Referenced by initialize_exodus_file(), write_file(), and write_poly_faces().