Commit 7a64ff98 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Add check that particles are corrected ordered in the arrys before sending strays.

Commented out, note gparts test is unchecked.
parent a507a518
......@@ -459,6 +459,18 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
}
}
/* Check that all parts are in the correct pl
/* for (size_t k = 0; k < nr_parts; k++) {
if (cells[ind[k]].nodeID != local_nodeID) {
error("Failed to move all non-local parts to send list");
}
}
for (size_t k = nr_parts; k < s->nr_parts; k++) {
if (cells[ind[k]].nodeID == local_nodeID) {
error("Failed to remove local parts from send list");
}
}*/
/* Move non-local gparts to the end of the list. */
for (int k = 0; k < nr_gparts;) {
if (cells[gind[k]].nodeID != local_nodeID) {
......@@ -483,6 +495,20 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
}
}
/* Check that all gparts are in the correct place (untested). */
/*
for (size_t k = 0; k < nr_gparts; k++) {
if (cells[gind[k]].nodeID != local_nodeID) {
error("Failed to move all non-local gparts to send list");
}
}
for (size_t k = nr_gparts; k < s->nr_gparts; k++) {
if (cells[gind[k]].nodeID == local_nodeID) {
error("Failed to remove local gparts from send list");
}
}*/
/* Exchange the strays, note that this potentially re-allocates
the parts arrays. */
size_t nr_parts_exchanged = s->nr_parts - nr_parts;
......
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