diff --git a/src/partition.c b/src/partition.c index 3fe704c37b2f6b75a0393ca378a3ef82905583a8..8d17bedf0aaeadc64044b12ffe1bb8887b02d83e 100644 --- a/src/partition.c +++ b/src/partition.c @@ -274,7 +274,7 @@ static void accumulate_counts(struct space *s, int *counts) { */ static void split_metis(struct space *s, int nregions, int *celllist) { - for (int i = 0; i < s->nr_cells; i++) s->cells[i].nodeID = celllist[i]; + for (int i = 0; i < s->nr_cells; i++) s->cells_top[i].nodeID = celllist[i]; } #endif @@ -419,7 +419,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID, /* Create weight arrays using task ticks for vertices and edges (edges * assume the same graph structure as used in the part_ calls). */ int nr_cells = s->nr_cells; - struct cell *cells = s->cells; + struct cell *cells = s->cells_top; float wscale = 1e-3, vscale = 1e-3, wscale_buff = 0.0; int wtot = 0; int wmax = 1e9 / nr_nodes; diff --git a/src/space.c b/src/space.c index 4f034f4c5437fbc77c1003a576bb141e8cf7528d..b308420f4b8a63e1a5d08e73441b121b2d416e1e 100644 --- a/src/space.c +++ b/src/space.c @@ -390,7 +390,7 @@ void space_regrid(struct space *s, double cell_max, int verbose) { s->cells_top[k].ghost = NULL; s->cells_top[k].kick = NULL; s->cells_top[k].super = &s->cells_top[k]; - s->cells_top[k].gsuper = &s->cells[k]; + s->cells_top[k].gsuper = &s->cells_top[k]; } s->maxdepth = 0; }