Skip to content

Commit

Permalink
reduce volumetric elements
Browse files Browse the repository at this point in the history
  • Loading branch information
gtheler committed Sep 29, 2023
1 parent 60aedae commit 59d9c60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pdes/build.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ int feenox_problem_build(void) {
}
}

if (volumetric_elements == 0) {
int valid_local = (volumetric_elements > 0);
int valid_global = 0;
MPI_Allreduce(&valid_local, &valid_global, 1, MPIU_INT, MPIU_SUM, PETSC_COMM_WORLD);
if (valid_local == 0) {
feenox_push_error_message("no volumetric elements found in '%s'", feenox.pde.mesh->file->name);
return FEENOX_ERROR;
}
Expand Down Expand Up @@ -413,4 +416,4 @@ int feenox_problem_rhs_set(element_t *e, unsigned int q, double *value) {
#endif

return FEENOX_OK;
}
}

0 comments on commit 59d9c60

Please sign in to comment.