Flow123d
JS_before_hm-2198-g122e1f2e2
|
Go to the documentation of this file.
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");
94 MeshDataHeader &
find_header(HeaderQuery &header_query)
override;
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);
142 Tokenizer::Position pos);
146 Tokenizer::Position pos);
150 Tokenizer::Position pos);
162 bool boundary_domain)
override;
HeaderTable header_table_
Table with data of DataArray headers.
void create_node_element_caches()
DataFormat
Type of data formats - ascii, binary or compressed with zLib.
void make_header_table() override
Reads table of DataArray headers through pugixml interface.
virtual ~VtkMeshReader()
Destructor.
Dedicated class for storing path to input and output files.
DECLARE_EXCEPTION(ExcInvalidFormat,<< "Invalid format of DataArray "<< EI_FieldName::val<< ", expected "<< EI_ExpectedFormat::val<< "\n"<< "in the input file: "<< EI_VTKFile::qval)
Tokenizer::Position get_appended_position()
Get position of AppendedData tag in VTK file.
MeshDataHeader create_header(pugi::xml_node node, unsigned int n_entities, Tokenizer::Position pos, OutputTime::DiscreteSpace disc)
Helper method that create DataArray header of given xml node (used from make_header_table)
void parse_binary_data(ElementDataCacheBase &data_cache, unsigned int n_components, unsigned int n_entities, Tokenizer::Position pos)
Parse binary data to data cache.
std::multimap< std::string, MeshDataHeader > HeaderTable
void parse_compressed_data(ElementDataCacheBase &data_cache, unsigned int n_components, unsigned int n_entities, Tokenizer::Position pos)
Uncompress and parse binary compressed data to data cache.
DataSections
Possible data sections in UnstructuredGrid - Piece node.
unsigned int type_value_size(DataType data_type)
Return size of value of data_type.
MeshDataHeader & find_header(HeaderQuery &header_query) override
TYPEDEF_ERR_INFO(EI_VTKFile, std::string)
void read_element_data(ElementDataCacheBase &data_cache, MeshDataHeader actual_header, unsigned int n_components, bool boundary_domain) override
void read_nodes(Mesh *mesh)
DataFormat data_format_
variants of data format (ascii, appended, compressed appended)
static const double point_tolerance
Tolerance during comparison point data with GMSH nodes.
void parse_ascii_data(ElementDataCacheBase &data_cache, unsigned int n_components, unsigned int n_entities, Tokenizer::Position pos)
Parse ascii data to data cache.
VtkMeshReader(const FilePath &file_name)
void read_base_vtk_attributes(pugi::xml_node vtk_node, unsigned int &n_nodes, unsigned int &n_elements)
Set base attributes of VTK and get count of nodes and elements.
double time_step_
time of VTK file (getting only during initialization from PVD reader)
DataType header_type_
header type of VTK file (only for appended data)
DataType get_data_type(std::string type_str)
Get DataType by value of string.
void read_physical_names(Mesh *mesh) override
std::istream * data_stream_
input stream allow read appended data, used only if this tag exists
unsigned int n_read_
store count of read entities
DataType
Types of VTK data (value 'undefined' for empty value)
void read_elements(Mesh *mesh)