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
0962c4b1
Commit
0962c4b1
authored
Mar 10, 2016
by
Matthieu Schaller
Browse files
engine_exchange_strays() does not exist for gparts
parent
6fc2baf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/space.c
View file @
0962c4b1
...
...
@@ -440,8 +440,6 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
// clocks_from_ticks(getticks() - tic), clocks_getunit());
#ifdef WITH_MPI
/* TODO: Here we should exchange the gparts as well! */
if
(
gcount
>
0
)
error
(
"gpart exchange not yet implemented"
);
/* Move non-local gparts to the end of the list. */
for
(
int
k
=
0
;
k
<
nr_gparts
;
k
++
)
...
...
@@ -458,9 +456,12 @@ 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_gparts
=
nr_gparts
+
engine_exchange_strays
(
s
->
e
,
nr_gparts
,
&
ind
[
nr_gparts
],
s
->
nr_gparts
-
nr_gparts
);
//s->nr_gparts =
// nr_gparts + engine_exchange_strays(s->e, nr_gparts, &ind[nr_gparts],
// s->nr_gparts - nr_gparts);
if
(
nr_gparts
>
0
)
error
(
"Need to implement the exchange of strays for the gparts"
);
/* Re-allocate the index array if needed.. */
if
(
s
->
nr_gparts
>
gind_size
)
{
...
...
@@ -473,7 +474,7 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
}
/* Assign each particle to its cell. */
for
(
int
k
=
nr_gparts
;
k
<
s
->
g
nr_parts
;
k
++
)
{
for
(
int
k
=
nr_gparts
;
k
<
s
->
nr_
g
parts
;
k
++
)
{
struct
gpart
*
p
=
&
s
->
gparts
[
k
];
gind
[
k
]
=
cell_getid
(
cdim
,
p
->
x
[
0
]
*
ih
[
0
],
p
->
x
[
1
]
*
ih
[
1
],
p
->
x
[
2
]
*
ih
[
2
]);
...
...
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