#include <WriteCCMIO.hpp>
Classes | |
class | MaterialSetData |
class | MeshInfo |
contains the general information about a mesh More... | |
class | NeumannSetData |
Public Member Functions | |
WriteCCMIO (Interface *impl) | |
Constructor. More... | |
virtual | ~WriteCCMIO () |
Destructor. More... | |
ErrorCode | write_file (const char *file_name, const bool overwrite, const FileOptions &opts, const EntityHandle *output_list, const int num_sets, const std::vector< std::string > &qa_list, const Tag *tag_list=NULL, int num_tags=0, int export_dimension=3) |
writes out a 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 *filename, bool overwrite, CCMIOID &rootID) |
number of dimensions in this file More... | |
Private Member Functions | |
ErrorCode | gather_matset_info (std::vector< EntityHandle > &matsets, std::vector< MaterialSetData > &matset_data, Range &all_verts) |
gathers elements in each matset, and all the vertices used by them; marks the vertices with the mEntityMark bit flag More... | |
ErrorCode | gather_neuset_info (std::vector< EntityHandle > &neusets, std::vector< NeumannSetData > &neuset_data) |
gathers elements in each neuset More... | |
ErrorCode | close_and_compress (const char *filename, CCMIOID rootID) |
ErrorCode | initialize_file (MeshInfo &mesh_info) |
ErrorCode | write_nodes (CCMIOID rootID, const Range &nodes, const int dimension, CCMIOID &verticesID) |
write vertices to file More... | |
ErrorCode | write_cells_and_faces (CCMIOID rootID, std::vector< WriteCCMIO::MaterialSetData > &matset_data, std::vector< WriteCCMIO::NeumannSetData > &neuset_data, Range &verts, CCMIOID &topologyID) |
write cells and internal/boundary faces, using vgids and verts input More... | |
ErrorCode | write_external_faces (CCMIOID rootID, CCMIOID topologyID, int set_num, Range &facets) |
write external faces, including connectivity and connected cells More... | |
ErrorCode | get_gids (const Range &ents, int *&gids, int &minid, int &maxid) |
ErrorCode | write_meshes (MeshInfo &mesh_info, std::vector< MaterialSetData > &matset_data, std::vector< NeumannSetData > &neuset_data, Range &verts, const int *vgids) |
ErrorCode | get_valid_sides (Range &elems, const int sense, WriteCCMIO::NeumannSetData &neuset_data) |
void | reset_matset (std::vector< MaterialSetData > &matset_info) |
ErrorCode | get_neuset_elems (EntityHandle neuset, int current_sense, Range &forward_elems, Range &reverse_elems) |
ErrorCode | transform_coords (const int dimension, const int num_nodes, double *coords) |
ErrorCode | write_problem_description (CCMIOID rootID, CCMIOID stateID, CCMIOID &problemID, CCMIOID processorID, std::vector< MaterialSetData > &matset_data, std::vector< NeumannSetData > &neuset_data) |
ErrorCode | get_sets (const EntityHandle *ent_handles, int num_sets, std::vector< EntityHandle > &matsets, std::vector< EntityHandle > &dirsets, std::vector< EntityHandle > &neusets, std::vector< EntityHandle > &partsets) |
ErrorCode | create_ccmio_structure (CCMIOID rootID, CCMIOID &stateID, CCMIOID &processorID) |
create state and processor nodes More... | |
ErrorCode | write_solution_data () |
write solution (tag) data More... | |
ErrorCode | write_processor (CCMIOID processorID, CCMIOID verticesID, CCMIOID topologyID) |
finalize processor More... | |
int | moab_to_ccmio_type (EntityType etype, int has_mid_nodes[]) |
convert MOAB to CCMIO type More... | |
ErrorCode | write_int_option (const char *opt_name, EntityHandle seth, Tag &tag, CCMIOID &node) |
ErrorCode | write_dbl_option (const char *opt_name, EntityHandle seth, Tag &tag, CCMIOID &node) |
ErrorCode | write_str_option (const char *opt_name, EntityHandle seth, Tag &tag, CCMIOID &node, const char *other_name=NULL) |
Private Attributes | |
Interface * | mbImpl |
interface instance More... | |
WriteUtilIface * | mWriteIface |
std::string | fileName |
file name More... | |
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 | mPartitionSetTag |
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 |
Tag | mEntityMark |
int | mDimension |
bool | mWholeMesh |
Definition at line 51 of file WriteCCMIO.hpp.
moab::WriteCCMIO::WriteCCMIO | ( | Interface * | impl | ) |
Constructor.
Get and cache predefined tag handles
Definition at line 109 of file WriteCCMIO.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_TYPE_BIT, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mbImpl, mDirichletSetTag, mEntityMark, mGlobalIdTag, mHasMidNodesTag, mMaterialSetTag, mNameTag, mNeumannSetTag, mPartitionSetTag, mWriteIface, NAME_TAG_NAME, NAME_TAG_SIZE, NEUMANN_SET_TAG_NAME, PARALLEL_PARTITION_TAG_NAME, moab::Interface::query_interface(), and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 149 of file WriteCCMIO.cpp.
References mbImpl, mEntityMark, mWriteIface, moab::Interface::release_interface(), and moab::Interface::tag_delete().
|
private |
Definition at line 284 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), and MB_SUCCESS.
Referenced by write_file().
|
private |
create state and processor nodes
Definition at line 247 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), moab::kStateName, and MB_SUCCESS.
Referenced by write_file().
|
static |
Definition at line 104 of file WriteCCMIO.cpp.
References iface, and WriteCCMIO().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
gathers elements in each matset, and all the vertices used by them; marks the vertices with the mEntityMark bit flag
Definition at line 616 of file WriteCCMIO.cpp.
References moab::Range::empty(), ErrorCode, moab::WriteUtilIface::gather_nodes_from_elements(), moab::Interface::get_entities_by_dimension(), MB_CHK_SET_ERR, MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_SUCCESS, mbImpl, mDimension, mEntityMark, mMaterialSetTag, mNameTag, mWholeMesh, mWriteIface, NAME_TAG_SIZE, moab::Interface::tag_get_data(), moab::Interface::tag_set_data(), and moab::Interface::type_from_handle().
Referenced by write_file().
|
private |
gathers elements in each neuset
Definition at line 676 of file WriteCCMIO.cpp.
References ErrorCode, moab::Interface::get_entities_by_dimension(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mbImpl, mDimension, mGlobalIdTag, mNameTag, mNeumannSetTag, NAME_TAG_SIZE, and moab::Interface::tag_get_data().
Referenced by write_file().
|
private |
Definition at line 713 of file WriteCCMIO.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, mGlobalIdTag, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by write_external_faces().
|
private |
Definition at line 1274 of file WriteCCMIO.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, mbImpl, moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::TYPE_FROM_HANDLE().
|
private |
Definition at line 311 of file WriteCCMIO.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), moab::Interface::get_entities_by_type_and_tag(), MB_SUCCESS, MBENTITYSET, mbImpl, mDirichletSetTag, mMaterialSetTag, mNeumannSetTag, mPartitionSetTag, and moab::Interface::tag_get_data().
Referenced by write_file().
|
private |
|
private |
convert MOAB to CCMIO type
Definition at line 1136 of file WriteCCMIO.cpp.
References MBEDGE, MBHEX, MBPOLYHEDRON, MBPRISM, MBPYRAMID, MBQUAD, MBTET, and MBVERTEX.
Referenced by write_cells_and_faces().
|
protected |
number of dimensions in this file
open a file for writing
Definition at line 302 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), and MB_SUCCESS.
Referenced by write_file().
|
private |
|
private |
Definition at line 789 of file WriteCCMIO.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_DOUBLE, mbImpl, MESH_TRANSFORM_TAG_NAME, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_nodes().
|
private |
write cells and internal/boundary faces, using vgids and verts input
Definition at line 820 of file WriteCCMIO.cpp.
References moab::WriteUtilIface::assign_ids(), moab::Range::begin(), CHK_SET_CCMERR, moab::Range::clear(), moab::Range::empty(), moab::error(), ErrorCode, moab::Skinner::find_skin(), moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::CN::HasMidNodes(), moab::Range::insert(), moab::CN::MAX_NODES_PER_ELEMENT, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_OPAQUE, mbImpl, MBPOLYGON, MBPOLYHEDRON, mDimension, mEntityMark, moab::Range::merge(), mGlobalIdTag, moab_to_ccmio_type(), mWholeMesh, mWriteIface, moab::CN::NumSubEntities(), moab::CN::SideNumber(), moab::Range::size(), moab::CN::SubEntityConn(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), moab::Interface::type_from_handle(), moab::TYPE_FROM_HANDLE(), and write_external_faces().
Referenced by write_file().
|
private |
Definition at line 552 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), ErrorCode, MB_SUCCESS, MB_TYPE_DOUBLE, mbImpl, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_problem_description().
|
private |
write external faces, including connectivity and connected cells
Definition at line 1192 of file WriteCCMIO.cpp.
References moab::Range::begin(), CHK_SET_CCMERR, moab::Range::end(), moab::error(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::WriteUtilIface::get_element_connect(), get_gids(), MB_CHK_SET_ERR, MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_SUCCESS, mbImpl, mDimension, mEntityMark, mGlobalIdTag, mWholeMesh, mWriteIface, moab::Range::rbegin(), moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by write_cells_and_faces().
|
virtual |
writes out a file
Implements moab::WriterIface.
Definition at line 155 of file WriteCCMIO.cpp.
References moab::WriteUtilIface::assign_ids(), close_and_compress(), create_ccmio_structure(), ErrorCode, gather_matset_info(), gather_neuset_info(), get_sets(), MB_CHK_SET_ERR, MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_SUCCESS, mDimension, mDirichletSetTag, mGlobalIdTag, mMaterialSetTag, mNeumannSetTag, mWriteIface, open_file(), write_cells_and_faces(), write_nodes(), write_problem_description(), write_processor(), and write_solution_data().
|
private |
Definition at line 529 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), ErrorCode, MB_SUCCESS, MB_TYPE_INTEGER, mbImpl, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_problem_description().
|
private |
|
private |
write vertices to file
Definition at line 732 of file WriteCCMIO.cpp.
References moab::Range::begin(), CHK_SET_CCMERR, moab::Range::end(), moab::error(), ErrorCode, moab::WriteUtilIface::get_node_coords(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, mGlobalIdTag, mWriteIface, moab::Range::size(), moab::Interface::tag_get_data(), and transform_coords().
Referenced by write_file().
|
private |
Definition at line 356 of file WriteCCMIO.cpp.
References moab::Range::begin(), CHK_SET_CCMERR, moab::Range::empty(), moab::error(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_OPAQUE, MBENTITYSET, mbImpl, mBoundaryTypeTag, mColorIdxTag, mCreatingProgramTag, mFreeSurfaceMaterialTag, mGroupIdTag, mLightMaterialTag, mMaterialIdTag, mMaterialTypeTag, mNameTag, mPorosityIdTag, mProcessorIdTag, mProstarRegionNumberTag, mRadiationTag, mSpinIdTag, mThicknessTag, NAME_TAG_SIZE, moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), write_dbl_option(), write_int_option(), and write_str_option().
Referenced by write_file().
|
private |
finalize processor
Definition at line 235 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), and MB_SUCCESS.
Referenced by write_file().
|
private |
write solution (tag) data
Definition at line 229 of file WriteCCMIO.cpp.
References MB_SUCCESS.
Referenced by write_file().
|
private |
Definition at line 575 of file WriteCCMIO.cpp.
References CHK_SET_CCMERR, moab::error(), ErrorCode, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_OPAQUE, mbImpl, moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_problem_description().
|
private |
file name
Definition at line 139 of file WriteCCMIO.hpp.
|
private |
interface instance
Definition at line 135 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), gather_neuset_info(), get_gids(), get_neuset_elems(), get_sets(), transform_coords(), write_cells_and_faces(), write_dbl_option(), write_external_faces(), write_int_option(), write_nodes(), write_problem_description(), write_str_option(), WriteCCMIO(), and ~WriteCCMIO().
|
private |
Definition at line 155 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 155 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Meshset Handle for the mesh that is currently being read.
Definition at line 142 of file WriteCCMIO.hpp.
|
private |
Definition at line 159 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), gather_neuset_info(), write_cells_and_faces(), write_external_faces(), and write_file().
|
private |
Definition at line 147 of file WriteCCMIO.hpp.
Referenced by get_sets(), write_file(), and WriteCCMIO().
|
private |
Definition at line 157 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), write_cells_and_faces(), write_external_faces(), WriteCCMIO(), and ~WriteCCMIO().
|
private |
Definition at line 154 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 151 of file WriteCCMIO.hpp.
Referenced by gather_neuset_info(), get_gids(), write_cells_and_faces(), write_external_faces(), write_file(), write_nodes(), and WriteCCMIO().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 150 of file WriteCCMIO.hpp.
Referenced by WriteCCMIO().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 152 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 146 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), get_sets(), write_file(), and WriteCCMIO().
|
private |
Definition at line 152 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 152 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), gather_neuset_info(), write_problem_description(), and WriteCCMIO().
|
private |
Definition at line 148 of file WriteCCMIO.hpp.
Referenced by gather_neuset_info(), get_sets(), write_file(), and WriteCCMIO().
|
private |
Definition at line 149 of file WriteCCMIO.hpp.
Referenced by get_sets(), and WriteCCMIO().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 155 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 153 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 155 of file WriteCCMIO.hpp.
Referenced by write_problem_description().
|
private |
Definition at line 161 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), write_cells_and_faces(), and write_external_faces().
|
private |
Definition at line 136 of file WriteCCMIO.hpp.
Referenced by gather_matset_info(), write_cells_and_faces(), write_external_faces(), write_file(), write_nodes(), WriteCCMIO(), and ~WriteCCMIO().