Commit 6aaa4365 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix the caller to engine_exchange_strays.

parent 5c083708
......@@ -370,9 +370,13 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
/* Exchange the strays, note that this potentially re-allocates
the parts arrays. */
s->nr_parts =
nr_parts + engine_exchange_strays(s->e, nr_parts, &ind[nr_parts],
s->nr_parts - nr_parts);
/* 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 = 0;
engine_exchange_strays(s->e, nr_parts, &ind[nr_parts],
&nr_parts_exchanged, 0, NULL, &nr_gparts_exchanged);
s->nr_parts = nr_parts + nr_parts_exchanged;
/* Re-allocate the index array if needed.. */
if (s->nr_parts > ind_size) {
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