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
913232cb
Commit
913232cb
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Avoid empty cells in the long-range gravity tasks.
parent
6021d143
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/engine.c
+4
-0
4 additions, 0 deletions
src/engine.c
src/runner_doiact_grav.h
+3
-0
3 additions, 0 deletions
src/runner_doiact_grav.h
with
7 additions
and
0 deletions
src/engine.c
+
4
−
0
View file @
913232cb
...
...
@@ -2321,6 +2321,10 @@ void engine_make_self_gravity_tasks(struct engine *e) {
if
(
periodic
)
for
(
int
i
=
0
;
i
<
s
->
nr_cells
;
++
i
)
{
const
struct
cell
*
c
=
&
s
->
cells_top
[
i
];
/* Skip empty cells */
if
(
c
->
gcount
==
0
)
continue
;
/* Did we correctly attach the FFT task ghosts? */
if
(
c
->
nodeID
==
engine_rank
&&
(
c
->
grav_ghost_in
==
NULL
||
c
->
grav_ghost_out
==
NULL
))
error
(
"Invalid gravity_ghost for local cell"
);
...
...
This diff is collapsed.
Click to expand it.
src/runner_doiact_grav.h
+
3
−
0
View file @
913232cb
...
...
@@ -1179,6 +1179,9 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) {
/* Avoid self contributions */
if
(
ci
==
cj
)
continue
;
/* Skip empty cells */
if
(
cj
->
gcount
==
0
)
continue
;
/* Get the distance between the CoMs at the last rebuild*/
double
dx_r
=
CoM_rebuild_i
[
0
]
-
multi_j
->
CoM_rebuild
[
0
];
double
dy_r
=
CoM_rebuild_i
[
1
]
-
multi_j
->
CoM_rebuild
[
1
];
...
...
This diff is collapsed.
Click to expand it.
Matthieu Schaller
@matthieu
mentioned in issue
#383 (closed)
·
7 years ago
mentioned in issue
#383 (closed)
mentioned in issue #383
Toggle commit list
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