19 #ifndef MSH_BASE_READER_HH
20 #define MSH_BASE_READER_HH
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);
81 <<
"Wrong number of components of field " << EI_FieldName::qval
82 <<
" at time " << EI_Time::val
83 <<
" in the input file: " << EI_MeshFile::qval);
194 unsigned int expected_n_components,
unsigned int boundary_begin);
TYPEDEF_ERR_INFO(EI_Time, double)
vector< LongIdx > boundary_elements_id_
virtual void read_elements(Mesh *mesh)=0
vector< LongIdx > bulk_elements_id_
Tokenizer tok_
Tokenizer used for reading ASCII file format.
DECLARE_EXCEPTION(ExcWrongComponentsCount,<< "Wrong number of components of field "<< EI_FieldName::qval<< " at time "<< EI_Time::val<< " in the input file: "<< EI_MeshFile::qval)
void set_element_ids(const Mesh &mesh)
TYPEDEF_ERR_INFO(EI_FileExtension, std::string)
ElementDataCache< T >::CacheData get_element_data(MeshDataHeader header, unsigned int expected_n_entities, unsigned int expected_n_components, unsigned int boundary_begin)
virtual void read_nodes(Mesh *mesh)=0
BaseMeshReader(const FilePath &file_name)
Constructor.
DECLARE_EXCEPTION(ExcWrongFormat,<< "Wrong format of "<< EI_Type::val<< ", "<< EI_TokenizerMsg::val<< "\n"<< "in the input file: "<< EI_MeshFile::qval)
TYPEDEF_ERR_INFO(EI_TokenizerMsg, std::string)
std::string data_section_name_
Store name of field data section specify for type of mesh file.
virtual void read_physical_names(Mesh *mesh)=0
virtual void read_element_data(ElementDataCacheBase &data_cache, MeshDataHeader header)=0
virtual void make_header_table()=0
std::vector< int > const & get_element_ids(bool boundary_domain)
TYPEDEF_ERR_INFO(EI_MeshFile, std::string)
bool has_compatible_mesh_
std::map< string, ElementDataPtr > ElementDataFieldMap
static Mesh * mesh_factory(const Input::Record &input_mesh_rec)
std::shared_ptr< ElementDataCacheBase > ElementDataPtr
TYPEDEF_ERR_INFO(EI_Type, std::string)
void read_raw_mesh(Mesh *mesh)
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'.")
static std::shared_ptr< BaseMeshReader > reader_factory(const FilePath &file_name)
DECLARE_EXCEPTION(ExcWrongExtension,<< "Unsupported extension "<< EI_FileExtension::qval<< " of the input file: "<< EI_MeshFile::qval)
std::shared_ptr< ElementDataFieldMap > element_data_values_
Cache with last read element data.
TYPEDEF_ERR_INFO(EI_FieldName, std::string)
virtual MeshDataHeader & find_header(HeaderQuery &header_query)=0
std::shared_ptr< std::vector< T > > CacheData
Dedicated class for storing path to input and output files.
DataType
Types of VTK data (value 'undefined' for empty value)