Flow123d  build_with_4.0.3-01443f6
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)
 
 DECLARE_EXCEPTION (ExcWrongComponentsCount,<< "Wrong number of components of field "<< EI_FieldName::qval<< " at time "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval)
 
 BaseMeshReader (const FilePath &file_name)
 Constructor. More...
 
void read_raw_mesh (Mesh *mesh)
 
template<typename T >
ElementDataCache< T >::CacheData get_element_data (MeshDataHeader header, unsigned int expected_n_entities, unsigned int expected_n_components, unsigned int boundary_begin)
 
void set_element_ids (const Mesh &mesh)
 
std::vector< int > const & get_element_ids (bool boundary_domain)
 

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 header) 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_
 

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 94 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 69 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  header 
)
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 90 of file msh_pvdreader.hh.

◆ list_it_

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

Iterator to items of file_list_.

Definition at line 96 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 93 of file msh_pvdreader.hh.


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