Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
0962c4b1
Commit
0962c4b1
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
engine_exchange_strays() does not exist for gparts
parent
6fc2baf4
No related branches found
No related tags found
2 merge requests
!136
Master
,
!116
Basic implementation of gparts
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/space.c
+7
-6
7 additions, 6 deletions
src/space.c
with
7 additions
and
6 deletions
src/space.c
+
7
−
6
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
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment