19 #ifndef MSH_BASE_READER_HH 20 #define MSH_BASE_READER_HH 23 #include <boost/exception/info.hpp> 46 int8,
uint8,
int16,
uint16,
int32,
uint32,
int64,
uint64,
float32,
float64,
undefined 67 <<
"No data for field: "<< EI_FieldName::qval
68 <<
" and time: "<< EI_Time::val
69 <<
" in the input file: "<< EI_MeshFile::qval);
71 <<
"Missing data type specification for field: "<< EI_FieldName::qval
72 <<
" and time: "<< EI_Time::val
73 <<
" in the input file: "<< EI_MeshFile::qval
74 <<
"\nPlease, add value of key 'input_discretization'.");
76 <<
"Wrong format of " << EI_Type::val <<
", " << EI_TokenizerMsg::val <<
"\n" 77 <<
"in the input file: " << EI_MeshFile::qval);
79 <<
"Unsupported extension " << EI_FileExtension::qval <<
" of the input file: " << EI_MeshFile::qval);
188 bool boundary_domain,
unsigned int component_idx);
211 double lower_bound = -std::numeric_limits<double>::max(),
double upper_bound = std::numeric_limits<double>::max());
240 bool boundary_domain)=0;
std::shared_ptr< std::vector< T > > ComponentDataPtr
std::map< string, ElementDataPtr > ElementDataFieldMap
TYPEDEF_ERR_INFO(EI_FieldName, std::string)
std::shared_ptr< ElementDataFieldMap > element_data_values_
Cache with last read element data.
BaseMeshReader(const FilePath &file_name)
Constructor.
std::shared_ptr< ElementDataCacheBase > ElementDataPtr
std::string data_section_name_
Store name of field data section specify for type of mesh file.
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())
virtual void read_nodes(Mesh *mesh)=0
static Mesh * mesh_factory(const Input::Record &input_mesh_rec)
void read_raw_mesh(Mesh *mesh)
virtual void read_elements(Mesh *mesh)=0
virtual void read_element_data(ElementDataCacheBase &data_cache, MeshDataHeader actual_header, unsigned int n_components, bool boundary_domain)=0
CheckResult
Return type of method that checked data stored in ElementDataCache (NaN values, limits) ...
virtual void check_compatible_mesh(Mesh &mesh)=0
Dedicated class for storing path to input and output files.
virtual void read_physical_names(Mesh *mesh)=0
MeshDataHeader actual_header_
Header of actual loaded data.
DECLARE_INPUT_EXCEPTION(ExcFieldNameNotFound,<< "No data for field: "<< EI_FieldName::qval<< " and time: "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval)
bool has_compatible_mesh_
DECLARE_EXCEPTION(ExcWrongFormat,<< "Wrong format of "<< EI_Type::val<< ", "<< EI_TokenizerMsg::val<< "\n"<< "in the input file: "<< EI_MeshFile::qval)
ElementDataCache< T >::ComponentDataPtr get_element_data(unsigned int n_entities, unsigned int n_components, bool boundary_domain, unsigned int component_idx)
DataType
Types of VTK data (value 'undefined' for empty value)
static std::shared_ptr< BaseMeshReader > reader_factory(const FilePath &file_name)
Tokenizer tok_
Tokenizer used for reading ASCII file format.
virtual void make_header_table()=0
std::vector< int > const & get_element_vector(bool boundary_domain)
vector< LongIdx > boundary_elements_id_
vector< LongIdx > bulk_elements_id_