Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mesh_handle/competences/element_data_competences.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class element_data_mesh_competence_impl: public t8_crtp_basic<TUnderlying> {
sc_array_destroy (sc_array_wrapper);
}

protected:
/** Repartition the element data so it follows a newly partitioned forest.
* The element data currently belongs to \a forest_from; this moves it to the layout of \a forest_to, which must
* have been created by partitioning \a forest_from.
Expand Down Expand Up @@ -179,7 +180,6 @@ class element_data_mesh_competence_impl: public t8_crtp_basic<TUnderlying> {
set_element_data (std::move (partitioned_data));
}

protected:
std::vector<TElementDataType> m_element_data; /**< Vector storing the (local) element data. */
};

Expand Down
6 changes: 5 additions & 1 deletion mesh_handle/mesh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ class mesh: public TMeshCompetencePack::template apply<mesh<TElementCompetencePa
// If no data is set (e.g. if we partition the mesh before setting data), nothing has to be done for the data.
bool data_set = false;
if constexpr (has_element_data_handler_competence ()) {
data_set = !this->get_element_data ().empty ();
// We need to make sure that the variable is the same on all processes.
int local_data_set = !this->get_element_data ().empty ();
int global_data_set;
sc_MPI_Allreduce (&local_data_set, &global_data_set, 1, sc_MPI_INT, sc_MPI_LOR, t8_forest_get_mpicomm (m_forest));
data_set = global_data_set;
}
// True if the data is interpolated in this commit: Only if data is set and the elements change.
bool interpolate = false;
Expand Down
Loading