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
7e8d5d0b
Commit
7e8d5d0b
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Do not recurse in the gravity pairs if the active cell is foreign.
parent
1ef92d72
No related branches found
No related tags found
1 merge request
!433
Correct wrapping of multipoles in FFT task
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_grav.h
+6
-3
6 additions, 3 deletions
src/runner_doiact_grav.h
with
6 additions
and
3 deletions
src/runner_doiact_grav.h
+
6
−
3
View file @
7e8d5d0b
...
@@ -935,6 +935,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -935,6 +935,7 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
/* Some constants */
/* Some constants */
const
struct
engine
*
e
=
r
->
e
;
const
struct
engine
*
e
=
r
->
e
;
const
struct
space
*
s
=
e
->
s
;
const
struct
space
*
s
=
e
->
s
;
const
int
nodeID
=
e
->
nodeID
;
const
int
periodic
=
s
->
periodic
;
const
int
periodic
=
s
->
periodic
;
const
double
cell_width
=
s
->
width
[
0
];
const
double
cell_width
=
s
->
width
[
0
];
const
double
dim
[
3
]
=
{
s
->
dim
[
0
],
s
->
dim
[
1
],
s
->
dim
[
2
]};
const
double
dim
[
3
]
=
{
s
->
dim
[
0
],
s
->
dim
[
1
],
s
->
dim
[
2
]};
...
@@ -943,6 +944,11 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -943,6 +944,11 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
const
double
max_distance
=
props
->
a_smooth
*
props
->
r_cut_max
*
cell_width
;
const
double
max_distance
=
props
->
a_smooth
*
props
->
r_cut_max
*
cell_width
;
const
double
max_distance2
=
max_distance
*
max_distance
;
const
double
max_distance2
=
max_distance
*
max_distance
;
/* Anything to do here? */
if
(
!
((
cell_is_active
(
ci
,
e
)
&&
ci
->
nodeID
==
nodeID
)
||
(
cell_is_active
(
cj
,
e
)
&&
cj
->
nodeID
==
nodeID
)))
return
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
const
int
gcount_i
=
ci
->
gcount
;
const
int
gcount_i
=
ci
->
gcount
;
...
@@ -963,9 +969,6 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
...
@@ -963,9 +969,6 @@ void runner_dopair_grav(struct runner *r, struct cell *ci, struct cell *cj,
TIMER_TIC
;
TIMER_TIC
;
/* Anything to do here? */
if
(
!
cell_is_active
(
ci
,
e
)
&&
!
cell_is_active
(
cj
,
e
))
return
;
/* Recover the multipole information */
/* Recover the multipole information */
struct
gravity_tensors
*
const
multi_i
=
ci
->
multipole
;
struct
gravity_tensors
*
const
multi_i
=
ci
->
multipole
;
struct
gravity_tensors
*
const
multi_j
=
cj
->
multipole
;
struct
gravity_tensors
*
const
multi_j
=
cj
->
multipole
;
...
...
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