#include <WriteTemplate.hpp>
Classes | |
struct | DirichletSetData |
struct used to hold data for each nodeset to be output; used by initialize_file to initialize the file header for increased speed More... | |
struct | MaterialSetData |
struct used to hold data for each block to be output; used by initialize_file to initialize the file header for increased speed More... | |
class | MeshInfo |
contains the general information about a mesh More... | |
struct | NeumannSetData |
struct used to hold data for each sideset to be output; used by initialize_file to initialize the file header for increased speed More... | |
Public Member Functions | |
WriteTemplate (Interface *impl) | |
Constructor. More... | |
virtual | ~WriteTemplate () |
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) |
number of dimensions in this file More... | |
Private Member Functions | |
ErrorCode | gather_mesh_information (MeshInfo &mesh_info, std::vector< MaterialSetData > &matset_info, std::vector< NeumannSetData > &neuset_info, std::vector< DirichletSetData > &dirset_info, std::vector< EntityHandle > &matsets, std::vector< EntityHandle > &neusets, std::vector< EntityHandle > &dirsets) |
ErrorCode | initialize_file (MeshInfo &mesh_info) |
ErrorCode | write_nodes (const int num_nodes, const Range &nodes, const int dimension) |
ErrorCode | write_matsets (MeshInfo &mesh_info, std::vector< MaterialSetData > &matset_data, std::vector< NeumannSetData > &neuset_data) |
ErrorCode | get_valid_sides (Range &elems, const int sense, WriteTemplate::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) |
Private Attributes | |
Interface * | mbImpl |
interface instance More... | |
WriteUtilIface * | mWriteIface |
std::string | fileName |
file name 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 | mGlobalIdTag |
Tag | mEntityMark |
Definition at line 50 of file WriteTemplate.hpp.
moab::WriteTemplate::WriteTemplate | ( | Interface * | impl | ) |
Constructor.
Get and cache predefined tag handles
Definition at line 52 of file WriteTemplate.cpp.
References DIRICHLET_SET_TAG_NAME, moab::Interface::globalId_tag(), MATERIAL_SET_TAG_NAME, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_BIT, MB_TYPE_INTEGER, mDirichletSetTag, mEntityMark, mGlobalIdTag, mMaterialSetTag, mNeumannSetTag, mWriteIface, NEUMANN_SET_TAG_NAME, moab::Interface::query_interface(), and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 75 of file WriteTemplate.cpp.
References mbImpl, mEntityMark, mWriteIface, moab::Interface::release_interface(), and moab::Interface::tag_delete().
|
static |
Definition at line 47 of file WriteTemplate.cpp.
References iface, and WriteTemplate().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 182 of file WriteTemplate.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::WriteTemplate::MaterialSetData::element_type, moab::WriteTemplate::MaterialSetData::elements, moab::WriteTemplate::NeumannSetData::elements, moab::Range::end(), ErrorCode, moab::EXOII_MAX_ELEM_TYPE, moab::WriteUtilIface::gather_nodes_from_elements(), moab::Interface::get_connectivity(), moab::ExoIIUtil::get_element_type_from_num_verts(), moab::Interface::get_entities_by_handle(), get_neuset_elems(), moab::Interface::get_parent_meshsets(), get_valid_sides(), moab::WriteTemplate::MaterialSetData::id, moab::WriteTemplate::DirichletSetData::id, moab::WriteTemplate::NeumannSetData::id, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TYPE_BIT, mbImpl, MBMAXTYPE, MBVERTEX, mDirichletSetTag, mEntityMark, moab::WriteTemplate::NeumannSetData::mesh_set_handle, mMaterialSetTag, mNeumannSetTag, moab::WriteTemplate::MaterialSetData::moab_type, mWriteIface, moab::WriteTemplate::DirichletSetData::nodes, moab::WriteTemplate::MeshInfo::nodes, moab::WriteTemplate::MeshInfo::num_dim, moab::WriteTemplate::MeshInfo::num_elements, moab::WriteTemplate::MeshInfo::num_matsets, moab::WriteTemplate::MeshInfo::num_nodes, moab::WriteTemplate::MaterialSetData::number_attributes, moab::WriteTemplate::MaterialSetData::number_elements, moab::WriteTemplate::NeumannSetData::number_elements, moab::WriteTemplate::DirichletSetData::number_nodes, moab::WriteTemplate::MaterialSetData::number_nodes_per_element, moab::Range::size(), moab::Interface::tag_delete(), 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 moab::ExoIIUtil::VerticesPerElement.
Referenced by write_file().
|
private |
Definition at line 596 of file WriteTemplate.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().
Referenced by gather_mesh_information().
|
private |
Definition at line 390 of file WriteTemplate.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::WriteTemplate::NeumannSetData::elements, moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::WriteTemplate::NeumannSetData::id, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, mEntityMark, moab::Interface::side_number(), moab::WriteTemplate::NeumannSetData::side_numbers, moab::Interface::tag_get_data(), and moab::TYPE_FROM_HANDLE().
Referenced by gather_mesh_information().
Definition at line 554 of file WriteTemplate.cpp.
References MB_SUCCESS, moab::WriteTemplate::MeshInfo::num_dim, and moab::WriteTemplate::MeshInfo::num_nodes.
Referenced by write_file().
|
protected |
number of dimensions in this file
open a file for writing
Definition at line 577 of file WriteTemplate.cpp.
References MB_SET_ERR, and MB_SUCCESS.
|
private |
|
virtual |
writes out a file
Implements moab::WriterIface.
Definition at line 89 of file WriteTemplate.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), fileName, gather_mesh_information(), moab::Interface::get_entities_by_type_and_tag(), initialize_file(), MB_FILE_WRITE_ERROR, MB_SUCCESS, MBENTITYSET, mbImpl, mDirichletSetTag, mMaterialSetTag, mNeumannSetTag, moab::WriteTemplate::MeshInfo::nodes, moab::WriteTemplate::MeshInfo::num_dim, moab::WriteTemplate::MeshInfo::num_nodes, reset_matset(), moab::Interface::tag_get_data(), write_matsets(), and write_nodes().
|
private |
Definition at line 514 of file WriteTemplate.cpp.
References moab::Range::begin(), moab::WriteTemplate::MaterialSetData::elements, moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), MB_SUCCESS, mbImpl, mGlobalIdTag, and moab::Interface::tag_get_data().
Referenced by write_file().
|
private |
Definition at line 447 of file WriteTemplate.cpp.
References ErrorCode, moab::WriteUtilIface::get_node_coords(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_DOUBLE, mbImpl, MESH_TRANSFORM_TAG_NAME, mGlobalIdTag, mWriteIface, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_file().
|
private |
|
private |
interface instance
Definition at line 134 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), get_neuset_elems(), get_valid_sides(), write_file(), write_matsets(), write_nodes(), and ~WriteTemplate().
|
private |
Definition at line 143 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteTemplate().
|
private |
Definition at line 147 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), get_valid_sides(), WriteTemplate(), and ~WriteTemplate().
|
private |
Definition at line 145 of file WriteTemplate.hpp.
Referenced by write_matsets(), write_nodes(), and WriteTemplate().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 142 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteTemplate().
|
private |
Definition at line 144 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteTemplate().
|
private |
Definition at line 135 of file WriteTemplate.hpp.
Referenced by gather_mesh_information(), write_nodes(), WriteTemplate(), and ~WriteTemplate().