#include <WriteSLAC.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 | |
WriteSLAC (Interface *impl) | |
Constructor. More... | |
virtual | ~WriteSLAC () |
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, WriteSLAC::NeumannSetData &sideset_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 | gather_interior_exterior (MeshInfo &mesh_info, std::vector< MaterialSetData > &matset_data, std::vector< NeumannSetData > &neuset_data) |
Private Attributes | |
Interface * | mbImpl |
interface instance More... | |
WriteUtilIface * | mWriteIface |
std::string | fileName |
file name More... | |
int | ncFile |
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 | mMatSetIdTag |
Tag | mEntityMark |
Definition at line 50 of file WriteSLAC.hpp.
moab::WriteSLAC::WriteSLAC | ( | Interface * | impl | ) |
Constructor.
get and cache predefined tag handles
Definition at line 73 of file WriteSLAC.cpp.
References DIRICHLET_SET_TAG_NAME, moab::Interface::globalId_tag(), MATERIAL_SET_TAG_NAME, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_BIT, MB_TYPE_INTEGER, mDirichletSetTag, mEntityMark, mGlobalIdTag, mMaterialSetTag, mMatSetIdTag, mNeumannSetTag, mWriteIface, NEUMANN_SET_TAG_NAME, moab::Interface::query_interface(), and moab::Interface::tag_get_handle().
Referenced by factory().
|
virtual |
Destructor.
Definition at line 99 of file WriteSLAC.cpp.
References mbImpl, mEntityMark, mWriteIface, moab::Interface::release_interface(), and moab::Interface::tag_delete().
|
static |
Definition at line 68 of file WriteSLAC.cpp.
References iface, and WriteSLAC().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Definition at line 562 of file WriteSLAC.cpp.
References moab::WriteSLAC::MeshInfo::bdy_hexes, moab::WriteSLAC::MeshInfo::bdy_tets, moab::Range::begin(), moab::dum, moab::WriteSLAC::MaterialSetData::elements, moab::WriteSLAC::NeumannSetData::elements, moab::Range::end(), moab::CN::EntityTypeName(), ErrorCode, moab::WriteSLAC::MaterialSetData::id, moab::Range::insert(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, MBHEX, mbImpl, MBTET, mMatSetIdTag, moab::WriteSLAC::MaterialSetData::moab_type, moab::WriteSLAC::MeshInfo::num_int_hexes, moab::WriteSLAC::MeshInfo::num_int_tets, moab::Range::size(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::TYPE_FROM_HANDLE().
Referenced by gather_mesh_information().
|
private |
Definition at line 210 of file WriteSLAC.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::WriteSLAC::MaterialSetData::element_type, moab::WriteSLAC::MaterialSetData::elements, moab::WriteSLAC::NeumannSetData::elements, moab::Range::end(), ErrorCode, moab::EXOII_MAX_ELEM_TYPE, gather_interior_exterior(), 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::WriteSLAC::MaterialSetData::id, moab::WriteSLAC::DirichletSetData::id, moab::WriteSLAC::NeumannSetData::id, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TYPE_BIT, MBEDGE, mbImpl, MBMAXTYPE, MBQUAD, MBTRI, MBVERTEX, mDirichletSetTag, mEntityMark, moab::WriteSLAC::NeumannSetData::mesh_set_handle, mMaterialSetTag, mNeumannSetTag, moab::WriteSLAC::MaterialSetData::moab_type, mWriteIface, moab::WriteSLAC::DirichletSetData::nodes, moab::WriteSLAC::MeshInfo::nodes, moab::WriteSLAC::MeshInfo::num_dim, moab::WriteSLAC::MeshInfo::num_elements, moab::WriteSLAC::MeshInfo::num_matsets, moab::WriteSLAC::MeshInfo::num_nodes, moab::WriteSLAC::MaterialSetData::number_attributes, moab::WriteSLAC::MaterialSetData::number_elements, moab::WriteSLAC::NeumannSetData::number_elements, moab::WriteSLAC::DirichletSetData::number_nodes, moab::WriteSLAC::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 954 of file WriteSLAC.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 428 of file WriteSLAC.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::WriteSLAC::NeumannSetData::elements, moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::WriteSLAC::NeumannSetData::id, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, mEntityMark, moab::Interface::side_number(), moab::WriteSLAC::NeumannSetData::side_numbers, moab::Interface::tag_get_data(), and moab::TYPE_FROM_HANDLE().
Referenced by gather_mesh_information().
Definition at line 825 of file WriteSLAC.cpp.
References moab::WriteSLAC::MeshInfo::bdy_hexes, moab::WriteSLAC::MeshInfo::bdy_tets, MB_SET_ERR, MB_SUCCESS, ncFile, moab::WriteSLAC::MeshInfo::num_dim, moab::WriteSLAC::MeshInfo::num_int_hexes, moab::WriteSLAC::MeshInfo::num_int_tets, moab::WriteSLAC::MeshInfo::num_nodes, and moab::Range::size().
Referenced by write_file().
|
protected |
number of dimensions in this file
open a file for writing
Definition at line 936 of file WriteSLAC.cpp.
References moab::fail(), MB_SET_ERR, MB_SUCCESS, and ncFile.
|
private |
|
virtual |
writes out a file
Implements moab::WriterIface.
Definition at line 113 of file WriteSLAC.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), entities, moab::fail(), 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, ncFile, moab::WriteSLAC::MeshInfo::nodes, moab::WriteSLAC::MeshInfo::num_dim, moab::WriteSLAC::MeshInfo::num_nodes, reset_matset(), moab::Interface::tag_get_data(), write_matsets(), and write_nodes().
|
private |
Definition at line 621 of file WriteSLAC.cpp.
References moab::WriteSLAC::MeshInfo::bdy_hexes, moab::WriteSLAC::MeshInfo::bdy_tets, moab::Range::begin(), moab::WriteSLAC::MaterialSetData::elements, moab::Range::end(), ErrorCode, moab::fail(), moab::Range::find(), moab::Interface::get_connectivity(), GET_VAR, moab::WriteSLAC::MaterialSetData::id, MB_SUCCESS, MBHEX, mbImpl, MBTET, mGlobalIdTag, mMatSetIdTag, moab::WriteSLAC::MaterialSetData::moab_type, ncFile, moab::WriteSLAC::MeshInfo::num_int_hexes, moab::WriteSLAC::MeshInfo::num_int_tets, moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by write_file().
|
private |
Definition at line 485 of file WriteSLAC.cpp.
References ErrorCode, moab::fail(), moab::WriteUtilIface::get_node_coords(), GET_VAR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_DOUBLE, mbImpl, MESH_TRANSFORM_TAG_NAME, mGlobalIdTag, mWriteIface, ncFile, moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by write_file().
|
private |
|
private |
interface instance
Definition at line 135 of file WriteSLAC.hpp.
Referenced by gather_interior_exterior(), gather_mesh_information(), get_neuset_elems(), get_valid_sides(), write_file(), write_matsets(), write_nodes(), and ~WriteSLAC().
|
private |
Definition at line 145 of file WriteSLAC.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteSLAC().
|
private |
Definition at line 150 of file WriteSLAC.hpp.
Referenced by gather_mesh_information(), get_valid_sides(), WriteSLAC(), and ~WriteSLAC().
|
private |
Definition at line 147 of file WriteSLAC.hpp.
Referenced by write_matsets(), write_nodes(), and WriteSLAC().
|
private |
Cached tags for reading. Note that all these tags are defined when the core is initialized.
Definition at line 144 of file WriteSLAC.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteSLAC().
|
private |
Definition at line 148 of file WriteSLAC.hpp.
Referenced by gather_interior_exterior(), write_matsets(), and WriteSLAC().
|
private |
Definition at line 146 of file WriteSLAC.hpp.
Referenced by gather_mesh_information(), write_file(), and WriteSLAC().
|
private |
Definition at line 136 of file WriteSLAC.hpp.
Referenced by gather_mesh_information(), write_nodes(), WriteSLAC(), and ~WriteSLAC().
|
private |
Definition at line 140 of file WriteSLAC.hpp.
Referenced by initialize_file(), open_file(), write_file(), write_matsets(), and write_nodes().