diff --git a/src/engine.c b/src/engine.c index f022f95a2a51930a24ffa9835c5d8e46aa0088cd..7b5aae1542053ece42b033a10aae5683458aa2f6 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1042,7 +1042,7 @@ void engine_exchange_strays(struct engine *e, size_t offset_parts, count_gparts += p->nr_gparts_in; } } - + /* Wait for all the sends to have finished too. */ if (nr_out > 0) if (MPI_Waitall(3 * e->nr_proxies, reqs_out, MPI_STATUSES_IGNORE) != @@ -1953,7 +1953,7 @@ void engine_init_particles(struct engine *e) { TIMER_TOC(timer_runners); /* Apply some conversions (e.g. internal energy -> entropy) */ - space_map_cells_pre(s, 1, cell_convert_hydro, NULL); + space_map_cells_pre(s, 0, cell_convert_hydro, NULL); /* Ready to go */ e->step = -1; diff --git a/src/space.c b/src/space.c index 6d4c256d502e121448238cadbe179d0000f00e88..4a01b3b7a7ed80efa52ede5e7d20e5d595e49fa5 100644 --- a/src/space.c +++ b/src/space.c @@ -475,15 +475,11 @@ void space_rebuild(struct space *s, double cell_max, int verbose) { /* Exchange the strays, note that this potentially re-allocates the parts arrays. */ - /* TODO: This function also exchanges gparts, but this is shorted-out - until they are fully implemented. */ size_t nr_parts_exchanged = s->nr_parts - nr_parts; size_t nr_gparts_exchanged = s->nr_gparts - nr_gparts; engine_exchange_strays(s->e, nr_parts, &ind[nr_parts], &nr_parts_exchanged, nr_gparts, &gind[nr_gparts], &nr_gparts_exchanged); - /* Add post-processing, i.e. re-linking/creating of gparts here. */ - /* Set the new particle counts. */ s->nr_parts = nr_parts + nr_parts_exchanged; s->nr_gparts = nr_gparts + nr_gparts_exchanged;