Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
7a64ff98
Commit
7a64ff98
authored
May 02, 2016
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
7a64ff98
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment