Commit 205c8340 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

only collect h_max from local cells.

parent 8ae6261a
......@@ -168,7 +168,9 @@ void space_regrid(struct space *s, double cell_max, int verbose) {
if (nr_parts > 0) {
if (s->cells != NULL) {
for (int k = 0; k < s->nr_cells; k++) {
if (s->cells[k].h_max > h_max) h_max = s->cells[k].h_max;
if (s->cells[k].nodeID == engine_rank && s->cells[k].h_max > h_max) {
h_max = s->cells[k].h_max;
}
}
} else {
for (size_t k = 0; k < nr_parts; k++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment