Skip to content
Snippets Groups Projects
Commit ab2d2425 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'mpi-regrid' into 'master'

Use the number of MPI ranks, not some guess when checking if the regridding is complete.

Closes #707

See merge request !1169
parents a4965516 dd4dee1f
Branches
Tags
1 merge request!1169Use the number of MPI ranks, not some guess when checking if the regridding is complete.
...@@ -2490,7 +2490,6 @@ int partition_space_to_space(double *oldh, double *oldcdim, int *oldnodeIDs, ...@@ -2490,7 +2490,6 @@ int partition_space_to_space(double *oldh, double *oldcdim, int *oldnodeIDs,
struct space *s) { struct space *s) {
/* Loop over all the new cells. */ /* Loop over all the new cells. */
int nr_nodes = 0;
for (int i = 0; i < s->cdim[0]; i++) { for (int i = 0; i < s->cdim[0]; i++) {
for (int j = 0; j < s->cdim[1]; j++) { for (int j = 0; j < s->cdim[1]; j++) {
for (int k = 0; k < s->cdim[2]; k++) { for (int k = 0; k < s->cdim[2]; k++) {
...@@ -2503,14 +2502,12 @@ int partition_space_to_space(double *oldh, double *oldcdim, int *oldnodeIDs, ...@@ -2503,14 +2502,12 @@ int partition_space_to_space(double *oldh, double *oldcdim, int *oldnodeIDs,
const int cid = cell_getid(s->cdim, i, j, k); const int cid = cell_getid(s->cdim, i, j, k);
const int oldcid = cell_getid(oldcdim, ii, jj, kk); const int oldcid = cell_getid(oldcdim, ii, jj, kk);
s->cells_top[cid].nodeID = oldnodeIDs[oldcid]; s->cells_top[cid].nodeID = oldnodeIDs[oldcid];
if (oldnodeIDs[oldcid] > nr_nodes) nr_nodes = oldnodeIDs[oldcid];
} }
} }
} }
/* Check we have all nodeIDs present in the resample. */ /* Check we have all nodeIDs present in the resample. */
return check_complete(s, 1, nr_nodes + 1); return check_complete(s, 1, s->e->nr_nodes);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment