19 #ifndef MSH_VTK_READER_HH 20 #define MSH_VTK_READER_HH 35 namespace pugi {
class xml_node; }
51 <<
"Invalid format of DataArray " << EI_FieldName::val <<
", expected " << EI_ExpectedFormat::val <<
"\n" 52 <<
"in the input file: " << EI_VTKFile::qval);
54 <<
"Unsupported or missing format of DataArray " << EI_FieldName::val <<
"\n" <<
"in the input file: " << EI_VTKFile::qval);
56 << EI_ErrMessage::val <<
" data type of " << EI_SectionTypeName::val <<
"\n" <<
"in the input file: " << EI_VTKFile::qval);
58 <<
"Incompatible meshes, " << EI_ErrMessage::val <<
"\n" <<
"for VTK input file: " << EI_VTKFile::qval);
60 <<
"Missing " << EI_TagType::val <<
" " << EI_TagName::val <<
"\n" <<
" in the input file: " << EI_VTKFile::qval);
62 <<
"Invalid DOF handler hash for field: " << EI_FieldName::qval <<
" in the input file: " << EI_VTKFile::qval <<
".\n");
71 ascii, binary_uncompressed, binary_zlib
102 typedef typename std::multimap< std::string, MeshDataHeader >
HeaderTable;
110 VtkMeshReader(
const FilePath &file_name, std::shared_ptr<ElementDataFieldMap> element_data_values,
double time_step);
126 void create_node_element_caches();
135 DataType get_data_type(std::string type_str);
138 unsigned int type_value_size(
DataType data_type);
141 void parse_ascii_data(
ElementDataCacheBase &data_cache,
unsigned int n_components,
unsigned int n_entities,
142 Tokenizer::Position pos);
145 void parse_binary_data(
ElementDataCacheBase &data_cache,
unsigned int n_components,
unsigned int n_entities,
146 Tokenizer::Position pos);
149 void parse_compressed_data(
ElementDataCacheBase &data_cache,
unsigned int n_components,
unsigned int n_entities,
150 Tokenizer::Position pos);
153 void read_base_vtk_attributes(pugi::xml_node vtk_node,
unsigned int &n_nodes,
unsigned int &n_elements);
156 Tokenizer::Position get_appended_position();
162 bool boundary_domain)
override;
void read_elements(Mesh *mesh) override
double time_step_
time of VTK file (getting only during initialization from PVD reader)
DataSections
Possible data sections in UnstructuredGrid - Piece node.
HeaderTable header_table_
Table with data of DataArray headers.
std::multimap< std::string, MeshDataHeader > HeaderTable
static const double point_tolerance
Tolerance during comparison point data with GMSH nodes.
DataFormat data_format_
variants of data format (ascii, appended, compressed appended)
#define DECLARE_EXCEPTION(ExcName, Format)
Macro for simple definition of exceptions.
void make_header_table() override
std::istream * data_stream_
input stream allow read appended data, used only if this tag exists
DataType header_type_
header type of VTK file (only for appended data)
#define TYPEDEF_ERR_INFO(EI_Type, Type)
Macro to simplify declaration of error_info types.
void read_physical_names(Mesh *mesh) override
unsigned int n_read_
store count of read entities
Dedicated class for storing path to input and output files.
DataFormat
Type of data formats - ascii, binary or compressed with zLib.
void read_element_data(ElementDataCacheBase &data_cache, MeshDataHeader actual_header, unsigned int n_components, bool boundary_domain) override
DataType
Types of VTK data (value 'undefined' for empty value)
MeshDataHeader & find_header(HeaderQuery &header_query) override
void read_nodes(Mesh *mesh) override