#include <ReadVtk.hpp>
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const SubsetList *subset_list=0, const Tag *file_id_tag=0) |
load a file More... | |
ErrorCode | read_tag_values (const char *file_name, const char *tag_name, const FileOptions &opts, std::vector< int > &tag_values_out, const SubsetList *subset_list=0) |
Read tag values from a file. More... | |
ReadVtk (Interface *impl=NULL) | |
Constructor. More... | |
virtual | ~ReadVtk () |
Destructor. More... | |
Public Member Functions inherited from moab::ReaderIface | |
virtual | ~ReaderIface () |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Protected Member Functions | |
ErrorCode | allocate_vertices (long num_vtx, EntityHandle &start_handle_out, double *&x_coord_array_out, double *&y_coord_array_out, double *&z_coord_array_out) |
ErrorCode | read_vertices (FileTokenizer &tokens, long num_verts, EntityHandle &start_handle_out) |
ErrorCode | allocate_elements (long num_elements, int vert_per_element, EntityType type, EntityHandle &start_handle_out, EntityHandle *&conn_array_out, std::vector< Range > &append_to_this) |
ErrorCode | vtk_read_dataset (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &element_list) |
ErrorCode | vtk_read_structured_points (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_structured_grid (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_rectilinear_grid (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_polydata (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_polygons (FileTokenizer &tokens, EntityHandle first_vtx, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_unstructured_grid (FileTokenizer &tokens, Range &vertex_list, std::vector< Range > &elem_list) |
ErrorCode | vtk_create_structured_elems (const long *dims, EntityHandle first_vtx, std::vector< Range > &elem_list) |
ErrorCode | vtk_read_field (FileTokenizer &tokens) |
ErrorCode | vtk_read_attrib_data (FileTokenizer &tokens, std::vector< Range > &entities) |
ErrorCode | vtk_read_tag_data (FileTokenizer &tokens, int type, size_t per_elem, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_scalar_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_color_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_vector_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_texture_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_tensor_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | vtk_read_field_attrib (FileTokenizer &tokens, std::vector< Range > &entities, const char *name) |
ErrorCode | store_file_ids (Tag tag, const Range &vertices, const std::vector< Range > &elements) |
Private Attributes | |
ReadUtilIface * | readMeshIface |
Interface * | mdbImpl |
interface instance More... | |
std::string | mPartitionTagName |
A field which, if present and having a single integer for storage, should be used to partition the mesh by range. Defaults to MATERIAL_SET_TAG_NAME. More... | |
Definition at line 30 of file ReadVtk.hpp.
ReadVtk::ReadVtk | ( | Interface * | impl = NULL | ) |
Constructor.
Definition at line 161 of file ReadVtk.cpp.
References mdbImpl, moab::Interface::query_interface(), and readMeshIface.
Referenced by factory().
|
virtual |
Destructor.
Definition at line 166 of file ReadVtk.cpp.
References mdbImpl, readMeshIface, and moab::Interface::release_interface().
|
protected |
Definition at line 359 of file ReadVtk.cpp.
References ErrorCode, moab::ReadUtilIface::get_element_connect(), MB_START_ID, MB_SUCCESS, and readMeshIface.
Referenced by vtk_create_structured_elems(), and vtk_read_unstructured_grid().
|
protected |
Definition at line 320 of file ReadVtk.cpp.
References ErrorCode, moab::ReadUtilIface::get_node_coords(), MB_START_ID, MB_SUCCESS, and readMeshIface.
Referenced by read_vertices(), vtk_read_rectilinear_grid(), and vtk_read_structured_points().
|
static |
Definition at line 156 of file ReadVtk.cpp.
References iface, and ReadVtk().
Referenced by moab::ReaderWriterSet::ReaderWriterSet().
|
virtual |
load a file
Implements moab::ReaderIface.
Definition at line 188 of file ReadVtk.cpp.
References moab::FileTokenizer::eof(), ErrorCode, moab::FileTokenizer::get_long_ints(), moab::FileOptions::get_option(), moab::FileTokenizer::line_number(), moab::major, moab::FileTokenizer::match_token(), MB_FILE_DOES_NOT_EXIST, MB_SET_ERR, MB_SUCCESS, MB_UNSUPPORTED_OPERATION, moab::minor, mPartitionTagName, readMeshIface, moab::Range::size(), store_file_ids(), moab::FileTokenizer::unget_token(), vtk_read_attrib_data(), and vtk_read_dataset().
|
virtual |
Read tag values from a file.
Read the list if all integer tag values from the file for a tag that is a single integer value per entity.
file_name | The file to read. |
tag_name | The tag for which to read values |
tag_values_out | Output: The list of tag values. |
subset_list | An array of tag name and value sets specifying the subset of the file to read. If multiple tags are specified, the sets that match all tags (intersection) should be read. |
subset_list_length | The length of the 'subset_list' array. |
Implements moab::ReaderIface.
Definition at line 179 of file ReadVtk.cpp.
References MB_NOT_IMPLEMENTED.
|
protected |
Definition at line 341 of file ReadVtk.cpp.
References allocate_vertices(), ErrorCode, moab::FileTokenizer::get_doubles(), and MB_SUCCESS.
Referenced by vtk_read_polydata(), vtk_read_structured_grid(), and vtk_read_unstructured_grid().
|
protected |
Definition at line 1221 of file ReadVtk.cpp.
References moab::ReadUtilIface::assign_ids(), ErrorCode, MB_SUCCESS, and readMeshIface.
Referenced by load_file().
|
protected |
Definition at line 864 of file ReadVtk.cpp.
References allocate_elements(), ErrorCode, MB_SET_ERR, MB_SUCCESS, MBEDGE, MBHEX, MBQUAD, readMeshIface, and moab::ReadUtilIface::update_adjacencies().
Referenced by vtk_read_rectilinear_grid(), vtk_read_structured_grid(), and vtk_read_structured_points().
|
protected |
Definition at line 972 of file ReadVtk.cpp.
References entities, moab::FileTokenizer::get_string(), moab::FileTokenizer::match_token(), vtk_read_color_attrib(), vtk_read_field_attrib(), vtk_read_scalar_attrib(), vtk_read_tensor_attrib(), vtk_read_texture_attrib(), and vtk_read_vector_attrib().
Referenced by load_file().
|
protected |
Definition at line 1154 of file ReadVtk.cpp.
References entities, moab::FileTokenizer::get_long_ints(), size, and vtk_read_tag_data().
Referenced by vtk_read_attrib_data().
|
protected |
Definition at line 378 of file ReadVtk.cpp.
References moab::FileTokenizer::match_token(), vtk_read_field(), vtk_read_polydata(), vtk_read_rectilinear_grid(), vtk_read_structured_grid(), vtk_read_structured_points(), and vtk_read_unstructured_grid().
Referenced by load_file().
|
protected |
Definition at line 934 of file ReadVtk.cpp.
References moab::FileTokenizer::get_doubles(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_string(), moab::FileTokenizer::match_token(), MB_SUCCESS, and moab::vtk_type_names.
Referenced by vtk_read_dataset(), and vtk_read_unstructured_grid().
|
protected |
Definition at line 1191 of file ReadVtk.cpp.
References entities, ErrorCode, moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_string(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_CHK_SET_ERR, MB_SUCCESS, vtk_read_tag_data(), and moab::vtk_type_names.
Referenced by vtk_read_attrib_data().
|
protected |
Definition at line 540 of file ReadVtk.cpp.
References ErrorCode, moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::Range::insert(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, MB_SUCCESS, read_vertices(), vtk_read_polygons(), and moab::vtk_type_names.
Referenced by vtk_read_dataset().
|
protected |
Definition at line 586 of file ReadVtk.cpp.
References moab::Interface::create_element(), ErrorCode, moab::GeomUtil::first(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), MB_SUCCESS, MBPOLYGON, mdbImpl, and size.
Referenced by vtk_read_polydata().
|
protected |
Definition at line 482 of file ReadVtk.cpp.
References allocate_vertices(), ErrorCode, moab::FileTokenizer::get_doubles(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::Range::insert(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, MB_SUCCESS, vtk_create_structured_elems(), and moab::vtk_type_names.
Referenced by vtk_read_dataset().
|
protected |
Definition at line 1126 of file ReadVtk.cpp.
References entities, moab::FileTokenizer::get_string(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, size, moab::FileTokenizer::unget_token(), vtk_read_tag_data(), and moab::vtk_type_names.
Referenced by vtk_read_attrib_data().
|
protected |
Definition at line 449 of file ReadVtk.cpp.
References ErrorCode, moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::Range::insert(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, MB_SUCCESS, read_vertices(), vtk_create_structured_elems(), and moab::vtk_type_names.
Referenced by vtk_read_dataset().
|
protected |
Definition at line 402 of file ReadVtk.cpp.
References allocate_vertices(), ErrorCode, moab::FileTokenizer::get_doubles(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::Range::insert(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, MB_SUCCESS, and vtk_create_structured_elems().
Referenced by vtk_read_dataset().
|
protected |
Definition at line 1004 of file ReadVtk.cpp.
References entities, ErrorCode, moab::FileTokenizer::get_booleans(), moab::FileTokenizer::get_doubles(), moab::FileTokenizer::get_integers(), moab::FileTokenizer::line_number(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, mdbImpl, mPartitionTagName, size, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by vtk_read_color_attrib(), vtk_read_field_attrib(), vtk_read_scalar_attrib(), vtk_read_tensor_attrib(), vtk_read_texture_attrib(), and vtk_read_vector_attrib().
|
protected |
Definition at line 1183 of file ReadVtk.cpp.
References entities, moab::FileTokenizer::match_token(), vtk_read_tag_data(), and moab::vtk_type_names.
Referenced by vtk_read_attrib_data().
|
protected |
Definition at line 1170 of file ReadVtk.cpp.
References dim, entities, moab::FileTokenizer::get_integers(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_SET_ERR, vtk_read_tag_data(), and moab::vtk_type_names.
Referenced by vtk_read_attrib_data().
|
protected |
Definition at line 635 of file ReadVtk.cpp.
References allocate_elements(), moab::Interface::create_element(), ErrorCode, moab::Interface::get_adjacencies(), moab::FileTokenizer::get_long_ints(), moab::FileTokenizer::get_newline(), moab::Range::insert(), moab::FileTokenizer::line_number(), moab::FileTokenizer::match_token(), MB_CHK_ERR, MB_SET_ERR, MB_SUCCESS, moab::VtkElemType::mb_type, MBMAXTYPE, MBPOLYGON, MBPOLYHEDRON, MBQUAD, MBTRI, MBVERTEX, mdbImpl, moab::VtkElemType::node_order, moab::VtkUtil::numVtkElemType, read_vertices(), readMeshIface, moab::Range::size(), moab::ReadUtilIface::update_adjacencies(), vtk_read_field(), moab::vtk_type_names, and moab::VtkUtil::vtkElemTypes.
Referenced by vtk_read_dataset().
|
protected |
Definition at line 1162 of file ReadVtk.cpp.
References entities, moab::FileTokenizer::match_token(), vtk_read_tag_data(), and moab::vtk_type_names.
Referenced by vtk_read_attrib_data().
|
private |
interface instance
Definition at line 117 of file ReadVtk.hpp.
Referenced by ReadVtk(), vtk_read_polygons(), vtk_read_tag_data(), vtk_read_unstructured_grid(), and ~ReadVtk().
|
private |
A field which, if present and having a single integer for storage, should be used to partition the mesh by range. Defaults to MATERIAL_SET_TAG_NAME.
Definition at line 121 of file ReadVtk.hpp.
Referenced by load_file(), and vtk_read_tag_data().
|
private |
Definition at line 112 of file ReadVtk.hpp.
Referenced by allocate_elements(), allocate_vertices(), load_file(), ReadVtk(), store_file_ids(), vtk_create_structured_elems(), vtk_read_unstructured_grid(), and ~ReadVtk().