43 if ( (*it).second.mesh_ ==
nullptr ) {
44 (*it).second.mesh_ = std::make_shared<Mesh>(
Input::Record() );
45 (*it).second.reader_->read_physical_names( (*it).second.mesh_.get() );
46 (*it).second.reader_->read_raw_mesh( (*it).second.mesh_.get() );
50 return (*it).second.mesh_;
58 reader_data.
reader_ = std::make_shared<GmshMeshReader>(file_path);
59 }
else if ( file_path.
extension() ==
".vtu" ) {
60 reader_data.
reader_ = std::make_shared<VtkMeshReader>(file_path);
61 }
else if ( file_path.
extension() ==
".pvd" ) {
62 reader_data.
reader_ = std::make_shared<PvdMeshReader>(file_path);
64 THROW(BaseMeshReader::ExcWrongExtension()
65 << BaseMeshReader::EI_FileExtension(file_path.
extension()) << BaseMeshReader::EI_MeshFile((
string)file_path) );
75 reader_ptr->set_element_ids(mesh);
82 Mesh *computational_mesh) {
83 ASSERT(
false).error(
"Not implemented yet." );
85 auto reader_data = (*it).second;
86 if ( reader_data.target_mesh_element_map_ ==
nullptr ) {
91 reader_data.reader_->has_compatible_mesh_ =
true;
92 reader_data.reader_->set_element_ids(*computational_mesh);
96 return (*it).second.target_mesh_element_map_;
101 Mesh *computational_mesh) {
103 ASSERT_PTR( (*it).second.mesh_ ).error(
"Mesh is not created. Did you call 'ReaderCache::get_mesh(file_path)'?\n");
104 if ( (*it).second.target_mesh_element_map_ ==
nullptr ) {
105 (*it).second.target_mesh_element_map_ = computational_mesh->
check_compatible_mesh( *((*it).second.mesh_.get()) );
107 return (*it).second.target_mesh_element_map_;