Flow123d  JS_before_hm-2109-g2815a84fd
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PvdMeshReader Class Reference

#include <msh_pvdreader.hh>

Inheritance diagram for PvdMeshReader:
Inheritance graph
[legend]
Collaboration diagram for PvdMeshReader:
Collaboration graph
[legend]

Classes

struct  VtkFileData
 Represents data of one VTK file defined in PVD file. More...
 

Public Member Functions

 PvdMeshReader (const FilePath &file_name)
 
 ~PvdMeshReader ()
 Destructor. More...
 
void read_physical_names (Mesh *mesh) override
 
MeshDataHeaderfind_header (HeaderQuery &header_query) override
 
- Public Member Functions inherited from BaseMeshReader
 TYPEDEF_ERR_INFO (EI_FieldName, std::string)
 
 TYPEDEF_ERR_INFO (EI_Time, double)
 
 TYPEDEF_ERR_INFO (EI_MeshFile, std::string)
 
 TYPEDEF_ERR_INFO (EI_Type, std::string)
 
 TYPEDEF_ERR_INFO (EI_TokenizerMsg, std::string)
 
 TYPEDEF_ERR_INFO (EI_FileExtension, std::string)
 
 DECLARE_INPUT_EXCEPTION (ExcFieldNameNotFound,<< "No data for field: "<< EI_FieldName::qval<< " and time: "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval)
 
 DECLARE_INPUT_EXCEPTION (ExcMissingFieldDiscretization,<< "Missing data type specification for field: "<< EI_FieldName::qval<< " and time: "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval<< "\nPlease, add value of key 'input_discretization'.")
 
 DECLARE_EXCEPTION (ExcWrongFormat,<< "Wrong format of "<< EI_Type::val<< ", "<< EI_TokenizerMsg::val<< "\n"<< "in the input file: "<< EI_MeshFile::qval)
 
 DECLARE_EXCEPTION (ExcWrongExtension,<< "Unsupported extension "<< EI_FileExtension::qval<< " of the input file: "<< EI_MeshFile::qval)
 
 BaseMeshReader (const FilePath &file_name)
 Constructor. More...
 
void read_raw_mesh (Mesh *mesh)
 
template<typename T >
ElementDataCache< T >::ComponentDataPtr get_element_data (unsigned int n_entities, unsigned int n_components, bool boundary_domain, unsigned int component_idx)
 
const std::vector< int > & get_element_vector (bool boundary_domain)
 
CheckResult scale_and_check_limits (string field_name, double coef, double default_val, double lower_bound=-std::numeric_limits< double >::max(), double upper_bound=std::numeric_limits< double >::max())
 

Protected Member Functions

void read_nodes (Mesh *mesh) override
 
void read_elements (Mesh *mesh) override
 
void make_header_table () override
 
void read_element_data (ElementDataCacheBase &data_cache, MeshDataHeader actual_header, unsigned int n_components, bool boundary_domain) override
 
- Protected Member Functions inherited from BaseMeshReader
 BaseMeshReader (const FilePath &file_name, std::shared_ptr< ElementDataFieldMap > element_data_values)
 Constructor. More...
 

Protected Attributes

std::vector< VtkFileDatafile_list_
 Store list of VTK files and time steps declared in PVD file. More...
 
std::string pvd_path_dir_
 Path to PVD file allows construct FilePath objects of VTK files. More...
 
std::vector< VtkFileData >::iterator list_it_
 Iterator to items of file_list_. More...
 
- Protected Attributes inherited from BaseMeshReader
bool has_compatible_mesh_
 
std::string data_section_name_
 Store name of field data section specify for type of mesh file. More...
 
std::shared_ptr< ElementDataFieldMapelement_data_values_
 Cache with last read element data. More...
 
Tokenizer tok_
 Tokenizer used for reading ASCII file format. More...
 
vector< LongIdxbulk_elements_id_
 
vector< LongIdxboundary_elements_id_
 
MeshDataHeader actual_header_
 Header of actual loaded data. More...
 
bool can_have_components_
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseMeshReader
static std::shared_ptr< BaseMeshReaderreader_factory (const FilePath &file_name)
 
static Meshmesh_factory (const Input::Record &input_mesh_rec)
 
- Protected Types inherited from BaseMeshReader
typedef std::shared_ptr< ElementDataCacheBaseElementDataPtr
 
typedef std::map< string, ElementDataPtrElementDataFieldMap
 

Detailed Description

Definition at line 32 of file msh_pvdreader.hh.

Constructor & Destructor Documentation

◆ PvdMeshReader()

PvdMeshReader::PvdMeshReader ( const FilePath file_name)

Construct the PVD reader from given FilePath. This opens the file for reading.

Definition at line 29 of file msh_pvdreader.cc.

◆ ~PvdMeshReader()

PvdMeshReader::~PvdMeshReader ( )

Destructor.

Definition at line 39 of file msh_pvdreader.cc.

Member Function Documentation

◆ find_header()

BaseMeshReader::MeshDataHeader & PvdMeshReader::find_header ( BaseMeshReader::HeaderQuery header_query)
overridevirtual

Find header of DataArray section of VTK file given by field_name.

Implements BaseMeshReader.

Definition at line 97 of file msh_pvdreader.cc.

◆ make_header_table()

void PvdMeshReader::make_header_table ( )
overrideprotectedvirtual

This method is specified for PVD reader. Table of mesh data headers (same as for GMSH or VTK) is not created, but list of times and appropriate VTK files is filled.

Implements BaseMeshReader.

Definition at line 72 of file msh_pvdreader.cc.

Here is the caller graph for this function:

◆ read_element_data()

void PvdMeshReader::read_element_data ( ElementDataCacheBase data_cache,
MeshDataHeader  actual_header,
unsigned int  n_components,
bool  boundary_domain 
)
overrideprotectedvirtual

Implements BaseMeshReader::read_element_data.

Implements BaseMeshReader.

Definition at line 64 of file msh_pvdreader.cc.

◆ read_elements()

void PvdMeshReader::read_elements ( Mesh mesh)
overrideprotectedvirtual

Method for reading of elements. Input of the mesh allows changing regions within the input file.

Implements BaseMeshReader.

Definition at line 59 of file msh_pvdreader.cc.

◆ read_nodes()

void PvdMeshReader::read_nodes ( Mesh mesh)
overrideprotectedvirtual

private method for reading of nodes

Implements BaseMeshReader.

Definition at line 53 of file msh_pvdreader.cc.

◆ read_physical_names()

void PvdMeshReader::read_physical_names ( Mesh mesh)
overridevirtual

Read regions from the VTK file and save the physical sections as regions in the RegionDB.

Region Labels starting with '!' are treated as boundary regions. Elements of these regions are used just to assign regions to the boundary and are not used in actual FEM computations.

Implements BaseMeshReader.

Definition at line 47 of file msh_pvdreader.cc.

Member Data Documentation

◆ file_list_

std::vector<VtkFileData> PvdMeshReader::file_list_
protected

Store list of VTK files and time steps declared in PVD file.

Definition at line 91 of file msh_pvdreader.hh.

◆ list_it_

std::vector<VtkFileData>::iterator PvdMeshReader::list_it_
protected

Iterator to items of file_list_.

Definition at line 97 of file msh_pvdreader.hh.

◆ pvd_path_dir_

std::string PvdMeshReader::pvd_path_dir_
protected

Path to PVD file allows construct FilePath objects of VTK files.

Definition at line 94 of file msh_pvdreader.hh.


The documentation for this class was generated from the following files: