44 if ( (*it).second.mesh_ ==
nullptr ) {
45 (*it).second.mesh_ = std::make_shared<Mesh>(
Input::Record() );
46 (*it).second.reader_->read_physical_names( (*it).second.mesh_.get() );
47 (*it).second.reader_->read_raw_mesh( (*it).second.mesh_.get() );
51 return (*it).second.mesh_;
59 reader_data.
reader_ = std::make_shared<GmshMeshReader>(file_path);
60 }
else if ( file_path.
extension() ==
".vtu" ) {
61 reader_data.
reader_ = std::make_shared<VtkMeshReader>(file_path);
62 }
else if ( file_path.
extension() ==
".pvd" ) {
63 reader_data.
reader_ = std::make_shared<PvdMeshReader>(file_path);
65 THROW(BaseMeshReader::ExcWrongExtension()
66 << BaseMeshReader::EI_FileExtension(file_path.
extension()) << BaseMeshReader::EI_MeshFile((
string)file_path) );
76 reader_ptr->set_element_ids(mesh);
95 Mesh *computational_mesh) {
98 auto &reader_data = (*it).second;
99 if ( reader_data.target_mesh_element_map_ ==
nullptr ) {
104 reader_data.reader_->has_compatible_mesh_ =
true;
105 reader_data.reader_->set_element_ids(*computational_mesh);
107 std::shared_ptr<EquivalentMeshMap> map_ptr =
108 std::make_shared<EquivalentMeshMap>(computational_mesh->
n_elements(),
110 _set_identic_mesh_map(map_ptr->bulk, reader_data.reader_->get_element_ids(
false), computational_mesh);
113 reader_data.target_mesh_element_map_ = map_ptr;
115 return reader_data.target_mesh_element_map_;
120 Mesh *computational_mesh) {
123 auto &reader_data = (*it).second;
125 if ( reader_data.target_mesh_element_map_ ==
nullptr ) {
126 reader_data.reader_->set_element_ids(*source_mesh);
127 reader_data.target_mesh_element_map_ = computational_mesh->
check_compatible_mesh( *((*it).second.mesh_.get()) );
129 return reader_data.target_mesh_element_map_;