#include <msh_basereader.hh>
|
| 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) |
|
virtual void | read_physical_names (Mesh *mesh)=0 |
|
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) |
|
virtual MeshDataHeader & | find_header (HeaderQuery &header_query)=0 |
|
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()) |
|
Abstract parent of mesh readers.
Supported are:
Definition at line 58 of file msh_basereader.hh.
BaseMeshReader::BaseMeshReader |
( |
const FilePath & |
file_name | ) |
|
BaseMeshReader::DECLARE_EXCEPTION |
( |
ExcWrongFormat |
, |
|
|
<< "Wrong format of "<< EI_Type::val<< " |
, |
|
|
"<< EI_TokenizerMsg::val<< "\n"<< "in the input file:"<< EI_MeshFile::qval |
|
|
) |
| |
BaseMeshReader::DECLARE_EXCEPTION |
( |
ExcWrongExtension |
, |
|
|
<< "Unsupported extension "<< EI_FileExtension::qval<< " of the input file: "<< EI_MeshFile::qval |
|
|
) |
| |
BaseMeshReader::DECLARE_INPUT_EXCEPTION |
( |
ExcFieldNameNotFound |
, |
|
|
<< "No data for field: "<< EI_FieldName::qval<< " and time: "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval |
|
|
) |
| |
BaseMeshReader::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'." |
|
|
) |
| |
template<typename T >
ElementDataCache< T >::ComponentDataPtr BaseMeshReader::get_element_data |
( |
unsigned int |
n_entities, |
|
|
unsigned int |
n_components, |
|
|
bool |
boundary_domain, |
|
|
unsigned int |
component_idx |
|
) |
| |
Reads ElementData sections of opened mesh file. Method must be call after set_data_header
method. If such section has not been yet read, we read the data section into raw buffer data
. The buffer must have size at least n_components
* n_entities
. Indexes in the map must be smaller then n_entities
.
Possible optimizations: If the map ID lookup seem slow, we may assume that IDs are in increasing order, use simple array of IDs instead of map and just check that they comes in in correct order.
- Parameters
-
n_entities | count of entities (elements) |
n_components | count of components (size of returned data is given by n_entities*n_components) |
boundary_domain | flag determines that data is read for boundary or bulk elements |
component_idx | component index of MultiField |
Definition at line 87 of file msh_basereader.cc.
std::vector< int > const & BaseMeshReader::get_element_vector |
( |
bool |
boundary_domain | ) |
|
Returns vector of boundary or bulk element ids by parameter boundary_domain
Definition at line 80 of file msh_basereader.cc.
virtual void BaseMeshReader::make_header_table |
( |
| ) |
|
|
protectedpure virtual |
This static method gets accessor to record with function input, dispatch to correct constructor and initialize appropriate function object from the input. Returns pointer to Mesh.
Definition at line 52 of file msh_basereader.cc.
virtual void BaseMeshReader::read_elements |
( |
Mesh * |
mesh | ) |
|
|
protectedpure virtual |
virtual void BaseMeshReader::read_nodes |
( |
Mesh * |
mesh | ) |
|
|
protectedpure virtual |
virtual void BaseMeshReader::read_physical_names |
( |
Mesh * |
mesh | ) |
|
|
pure virtual |
void BaseMeshReader::read_raw_mesh |
( |
Mesh * |
mesh | ) |
|
Reads raw
data of mesh (only nodes and elements) from the GMSH or VTKfile. Input of the mesh allows changing regions within the input file.
Definition at line 72 of file msh_basereader.cc.
This static method gets file path object of reader, dispatch to correct constructor and initialize appropriate function object from the input. Returns shared pointer to BaseMeshReader.
Definition at line 38 of file msh_basereader.cc.
CheckResult BaseMeshReader::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() |
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_FieldName |
, |
|
|
std::string |
|
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_Time |
, |
|
|
double |
|
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_MeshFile |
, |
|
|
std::string |
|
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_Type |
, |
|
|
std::string |
|
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_TokenizerMsg |
, |
|
|
std::string |
|
|
) |
| |
BaseMeshReader::TYPEDEF_ERR_INFO |
( |
EI_FileExtension |
, |
|
|
std::string |
|
|
) |
| |
Vector of both bulk and boundary IDs. Bulk elements come first, then boundary elements, but only the portion that appears in input mesh file and has ID assigned.
Definition at line 253 of file msh_basereader.hh.
std::string BaseMeshReader::data_section_name_ |
|
protected |
Store name of field data section specify for type of mesh file.
Definition at line 243 of file msh_basereader.hh.
bool BaseMeshReader::has_compatible_mesh_ |
|
protected |
Flag stores that check of compatible mesh was performed.
This flag has effect only for VTK reader.
Definition at line 240 of file msh_basereader.hh.
Tokenizer BaseMeshReader::tok_ |
|
protected |
The documentation for this class was generated from the following files: