Skip to content

Commit a468840

Browse files
committed
Check element maps too to decide if geometry needs an update
1 parent 9e57490 commit a468840

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/core/io/src/4C_io_discretization_visualization_writer_mesh.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ namespace Core::IO
136136
std::make_shared<Core::LinAlg::Map>(*discretization_->node_row_map());
137137
nodecolmap_last_geometry_set_ =
138138
std::make_shared<Core::LinAlg::Map>(*discretization_->node_col_map());
139+
elemrowmap_last_geometry_set_ =
140+
std::make_shared<Core::LinAlg::Map>(*discretization_->element_row_map());
141+
elemcolmap_last_geometry_set_ =
142+
std::make_shared<Core::LinAlg::Map>(*discretization_->element_col_map());
139143
}
140144

141145
/*-----------------------------------------------------------------------------------------------*
@@ -145,7 +149,9 @@ namespace Core::IO
145149
// check if parallel distribution of discretization changed
146150
int map_changed =
147151
((not noderowmap_last_geometry_set_->same_as(*discretization_->node_row_map())) or
148-
(not nodecolmap_last_geometry_set_->same_as(*discretization_->node_col_map())));
152+
(not nodecolmap_last_geometry_set_->same_as(*discretization_->node_col_map())) or
153+
(not elemrowmap_last_geometry_set_->same_as(*discretization_->element_row_map())) or
154+
(not elemcolmap_last_geometry_set_->same_as(*discretization_->element_col_map())));
149155
int map_changed_allproc(0);
150156
map_changed_allproc = Core::Communication::max_all(map_changed, discretization_->get_comm());
151157

src/core/io/src/4C_io_discretization_visualization_writer_mesh.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ namespace Core::IO
236236
//! Node row and col maps the geometry of visualization writer is based on
237237
std::shared_ptr<Core::LinAlg::Map> noderowmap_last_geometry_set_;
238238
std::shared_ptr<Core::LinAlg::Map> nodecolmap_last_geometry_set_;
239+
std::shared_ptr<Core::LinAlg::Map> elemrowmap_last_geometry_set_;
240+
std::shared_ptr<Core::LinAlg::Map> elemcolmap_last_geometry_set_;
239241
};
240242

241243
/**

0 commit comments

Comments
 (0)