#include <WriteVtk.hpp>
Public Member Functions | |
WriteVtk (Interface *impl) | |
Constructor. More... | |
virtual | ~WriteVtk () |
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 *) |
Private Member Functions | |
ErrorCode | gather_mesh (const EntityHandle *set_list, int num_sets, Range &nodes, Range &elems) |
Get entities to write, given set list passed to write_file. More... | |
ErrorCode | write_header (std::ostream &stream) |
Write 4-line VTK file header. More... | |
ErrorCode | write_nodes (std::ostream &stream, const Range &nodes) |
Write node coordinates. More... | |
ErrorCode | write_elems (std::ostream &stream, const Range &nodes, const Range &elems) |
Write element connectivity. More... | |
ErrorCode | write_tags (std::ostream &stream, bool nodes, const Range &entities, const Tag *tag_list, int num_tags) |
Write all tags on either the list of nodes or the list of elements. More... | |
ErrorCode | write_tag (std::ostream &stream, Tag tag, const Range &entities, const Range &tagged_entities) |
Write the tad description for the passed tag and call the template write_tag function to write the tag data. More... | |
template<typename T > | |
ErrorCode | write_tag (std::ostream &stream, Tag tag, const Range &entities, const Range &tagged_entities, const int) |
Write tag data. More... | |
ErrorCode | write_bit_tag (std::ostream &stream, Tag tag, const Range &entities, const Range &tagged_entities) |
template<typename T > | |
void | write_data (std::ostream &stream, const std::vector< T > &data, unsigned vals_per_tag) |
Write a list of values. More... | |
Private Attributes | |
Interface * | mbImpl |
WriteUtilIface * | writeTool |
bool | mStrict |
int | freeNodes |
bool | createOneNodeCells |
Definition at line 30 of file WriteVtk.hpp.
moab::WriteVtk::WriteVtk | ( | Interface * | impl | ) |
Constructor.
Definition at line 56 of file WriteVtk.cpp.
References moab::Interface::query_interface(), and writeTool.
Referenced by factory().
|
virtual |
Destructor.
Definition at line 63 of file WriteVtk.cpp.
References mbImpl, moab::Interface::release_interface(), and writeTool.
|
static |
Definition at line 51 of file WriteVtk.cpp.
References iface, and WriteVtk().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
private |
Get entities to write, given set list passed to write_file.
Definition at line 127 of file WriteVtk.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::CREATE_HANDLE(), moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Interface::get_child_meshsets(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), moab::VtkUtil::get_vtk_type(), moab::Range::insert(), moab::Range::lower_bound(), MB_ENTITY_NOT_FOUND, MB_SET_ERR, MB_SUCCESS, MBEDGE, MBENTITYSET, mbImpl, MBVERTEX, moab::Range::merge(), and moab::CN::VerticesPerEntity().
Referenced by write_file().
|
private |
Definition at line 550 of file WriteVtk.cpp.
References moab::Range::begin(), moab::Range::end(), entities, ErrorCode, MB_SET_ERR, MB_SUCCESS, mbImpl, moab::Interface::tag_get_data(), moab::Interface::tag_get_length(), moab::Interface::tag_get_name(), and write_data().
Referenced by write_tag().
|
private |
Write a list of values.
Definition at line 471 of file WriteVtk.cpp.
Referenced by write_bit_tag(), and write_tag().
|
private |
Write element connectivity.
Definition at line 232 of file WriteVtk.cpp.
References moab::Range::begin(), createOneNodeCells, moab::Range::end(), moab::CN::EntityTypeName(), ErrorCode, freeNodes, moab::Interface::get_connectivity(), moab::VtkUtil::get_vtk_type(), moab::Range::index(), MB_CHK_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MBPOLYHEDRON, MBVERTEX, moab::Range::merge(), moab::VtkElemType::node_order, moab::Range::size(), moab::Range::subset_by_type(), moab::subtract(), moab::Interface::type_from_handle(), moab::TYPE_FROM_HANDLE(), moab::CN::VerticesPerEntity(), and moab::VtkElemType::vtk_type.
Referenced by write_file().
|
virtual |
writes out a file
Implements moab::WriterIface.
Definition at line 68 of file WriteVtk.cpp.
References moab::WriteUtilIface::check_doesnt_exist(), createOneNodeCells, moab::DEFAULT_PRECISION, moab::DEFAULT_STRICT, ErrorCode, gather_mesh(), moab::FileOptions::get_int_option(), moab::FileOptions::get_null_option(), MB_FILE_WRITE_ERROR, MB_SET_ERR, MB_SUCCESS, mStrict, write_elems(), write_header(), write_nodes(), write_tags(), and writeTool.
Referenced by moab::Core::write_file().
|
private |
Write 4-line VTK file header.
Definition at line 205 of file WriteVtk.cpp.
References MB_SUCCESS, and MOAB_VERSION_STRING.
Referenced by write_file().
Write node coordinates.
Definition at line 214 of file WriteVtk.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Interface::get_coords(), MB_SUCCESS, mbImpl, and moab::Range::size().
Referenced by write_file().
|
private |
Write the tad description for the passed tag and call the template write_tag function to write the tag data.
Definition at line 600 of file WriteVtk.cpp.
References entities, MB_SUCCESS, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mbImpl, moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), moab::Interface::tag_get_name(), moab::VtkUtil::vtkTypeNames, and write_bit_tag().
Referenced by write_tags().
|
private |
Write tag data.
Definition at line 505 of file WriteVtk.cpp.
References moab::Range::begin(), moab::Range::end(), entities, ErrorCode, freeNodes, MB_SUCCESS, mbImpl, MBVERTEX, moab::SysUtil::setmem(), moab::Interface::tag_get_data(), moab::Interface::tag_get_default_value(), moab::Interface::tag_get_length(), moab::Interface::tag_get_name(), moab::TYPE_FROM_HANDLE(), and write_data().
|
private |
Write all tags on either the list of nodes or the list of elements.
Definition at line 382 of file WriteVtk.cpp.
References moab::Range::empty(), entities, ErrorCode, freeNodes, moab::Interface::get_entities_by_type_and_tag(), moab::WriteUtilIface::get_tag_list(), moab::intersect(), MB_SUCCESS, MB_TYPE_HANDLE, MBEDGE, MBENTITYSET, mbImpl, MBVERTEX, moab::Range::merge(), mStrict, moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), write_tag(), and writeTool.
Referenced by write_file().
|
private |
Definition at line 91 of file WriteVtk.hpp.
Referenced by write_elems(), and write_file().
|
private |
Definition at line 90 of file WriteVtk.hpp.
Referenced by write_elems(), write_tag(), and write_tags().
|
private |
Definition at line 86 of file WriteVtk.hpp.
Referenced by gather_mesh(), write_bit_tag(), write_elems(), write_nodes(), write_tag(), write_tags(), and ~WriteVtk().
|
private |
Definition at line 89 of file WriteVtk.hpp.
Referenced by write_file(), and write_tags().
|
private |
Definition at line 87 of file WriteVtk.hpp.
Referenced by write_file(), write_tags(), WriteVtk(), and ~WriteVtk().