Flow123d
release_3.0.0-1193-g9220a69
|
#include <msh_gmshreader.h>
Public Member Functions | |
TYPEDEF_ERR_INFO (EI_GMSHFile, std::string) | |
TYPEDEF_ERR_INFO (EI_Section, std::string) | |
TYPEDEF_ERR_INFO (EI_ElementId, int) | |
TYPEDEF_ERR_INFO (EI_ElementType, int) | |
DECLARE_EXCEPTION (ExcMissingSection,<< "Missing section "<< EI_Section::qval<< " in the GMSH input file: "<< EI_GMSHFile::qval) | |
DECLARE_EXCEPTION (ExcUnsupportedType,<< "Element "<< EI_ElementId::val<< "in the GMSH input file "<< EI_GMSHFile::qval<< " is of the unsupported type "<< EI_ElementType::val) | |
GmshMeshReader (const FilePath &file_name) | |
virtual | ~GmshMeshReader () |
void | read_physical_names (Mesh *mesh) override |
void | check_compatible_mesh (Mesh &mesh) override |
MeshDataHeader & | find_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 Types | |
typedef std::map< std::string, std::vector< MeshDataHeader > > | HeaderTable |
Protected Types inherited from BaseMeshReader | |
typedef std::shared_ptr< ElementDataCacheBase > | ElementDataPtr |
typedef std::map< string, ElementDataPtr > | ElementDataFieldMap |
Protected Member Functions | |
void | read_nodes (Mesh *mesh) |
void | read_elements (Mesh *mesh) |
void | read_data_header (MeshDataHeader &head) |
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 | |
HeaderTable | header_table_ |
Table with data of ElementData headers. 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< ElementDataFieldMap > | element_data_values_ |
Cache with last read element data. More... | |
Tokenizer | tok_ |
Tokenizer used for reading ASCII file format. More... | |
vector< LongIdx > | bulk_elements_id_ |
vector< LongIdx > | boundary_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< BaseMeshReader > | reader_factory (const FilePath &file_name) |
static Mesh * | mesh_factory (const Input::Record &input_mesh_rec) |
Definition at line 35 of file msh_gmshreader.h.
|
protected |
Map of ElementData sections in GMSH file.
For each field_name contains vector of MeshDataHeader. Headers are sorted by time in ascending order.
Definition at line 87 of file msh_gmshreader.h.
GmshMeshReader::GmshMeshReader | ( | const FilePath & | file_name | ) |
Construct the GMSH format reader from given FilePath. This opens the file for reading.
Definition at line 38 of file msh_gmshreader.cc.
|
virtual |
Destructor close the file if opened.
Definition at line 49 of file msh_gmshreader.cc.
|
overridevirtual |
Empty method for GMSH reader now.
Implements BaseMeshReader::check_compatible_mesh
.
OBSOLETE method - will be replace with Mesh::check_compatible_mesh after merge fields!
Implements BaseMeshReader.
Definition at line 362 of file msh_gmshreader.cc.
GmshMeshReader::DECLARE_EXCEPTION | ( | ExcMissingSection | , |
<< "Missing section "<< EI_Section::qval<< " in the GMSH input file: "<< EI_GMSHFile::qval | |||
) |
GmshMeshReader::DECLARE_EXCEPTION | ( | ExcUnsupportedType | , |
<< "Element "<< EI_ElementId::val<< "in the GMSH input file "<< EI_GMSHFile::qval<< " is of the unsupported type "<< EI_ElementType::val | |||
) |
|
overridevirtual |
Finds GMSH data header for ElementData given by time and field_name and stores it as actual_header_
.
Implements BaseMeshReader.
Definition at line 324 of file msh_gmshreader.cc.
|
overrideprotectedvirtual |
Reads table of ElementData headers from the tokenizer file.
Implements BaseMeshReader.
Definition at line 297 of file msh_gmshreader.cc.
|
protected |
Reads the header from the tokenizer tok
and return it as the second parameter.
Definition at line 196 of file msh_gmshreader.cc.
|
overrideprotectedvirtual |
Implements BaseMeshReader::read_element_data
.
Implements BaseMeshReader.
Definition at line 253 of file msh_gmshreader.cc.
|
protectedvirtual |
Method for reading of elements. Input of the mesh allows changing regions within the input CON file. Read section '$PhysicalNames' of the GMSH file and save the physical sections to general data structure.
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 88 of file msh_gmshreader.cc.
|
protectedvirtual |
private method for reading of nodes
Implements BaseMeshReader.
Definition at line 54 of file msh_gmshreader.cc.
|
overridevirtual |
Read section '$PhysicalNames' of the GMSH 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 165 of file msh_gmshreader.cc.
GmshMeshReader::TYPEDEF_ERR_INFO | ( | EI_GMSHFile | , |
std::string | |||
) |
GmshMeshReader::TYPEDEF_ERR_INFO | ( | EI_Section | , |
std::string | |||
) |
GmshMeshReader::TYPEDEF_ERR_INFO | ( | EI_ElementId | , |
int | |||
) |
GmshMeshReader::TYPEDEF_ERR_INFO | ( | EI_ElementType | , |
int | |||
) |
|
protected |
Table with data of ElementData headers.
Definition at line 118 of file msh_gmshreader.h.