Flow123d  release_3.0.0-922-g9fcbba1
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
 
void check_compatible_mesh (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)
 
std::vector< int > const & 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...
 

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 ( 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 ( )

Destructor.

Definition at line 39 of file msh_pvdreader.cc.

Member Function Documentation

void PvdMeshReader::check_compatible_mesh ( Mesh mesh)
overridevirtual

Check if nodes and elements of VTK mesh is compatible with mesh.

  • to all nodes of VTK mesh must exists one and only one nodes in second mesh
  • the same must occur for elements
  • method fill vector bulk_elements_id_
  • it is necessary to call this method before calling get_element_data

OBSOLETE method - will be replace with Mesh::check_compatible_mesh after merge fields!

Implements BaseMeshReader.

Definition at line 71 of file msh_pvdreader.cc.

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 109 of file msh_pvdreader.cc.

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 84 of file msh_pvdreader.cc.

Here is the caller graph for this function:

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 63 of file msh_pvdreader.cc.

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 58 of file msh_pvdreader.cc.

void PvdMeshReader::read_nodes ( Mesh mesh)
overrideprotectedvirtual

private method for reading of nodes

Implements BaseMeshReader.

Definition at line 52 of file msh_pvdreader.cc.

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

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

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

Definition at line 103 of file msh_pvdreader.hh.

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

Iterator to items of file_list_.

Definition at line 109 of file msh_pvdreader.hh.

std::string PvdMeshReader::pvd_path_dir_
protected

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

Definition at line 106 of file msh_pvdreader.hh.


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