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
c08fce03
"README.md" did not exist on "2107b82af6d6ef475c4c00de2ad8d25dff368de6"
Commit
c08fce03
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Also use quadrupole P-M interactions when running the truncated pair_pp a the lead level
parent
797090ce
No related branches found
No related tags found
1 merge request
!420
Gravity speedup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/runner_doiact_grav.h
+14
-14
14 additions, 14 deletions
src/runner_doiact_grav.h
with
14 additions
and
14 deletions
src/runner_doiact_grav.h
+
14
−
14
View file @
c08fce03
...
@@ -494,8 +494,8 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
...
@@ -494,8 +494,8 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
/* Recover the multipole info and shift the CoM locations */
/* Recover the multipole info and shift the CoM locations */
const
float
rmax_i
=
ci
->
multipole
->
r_max
;
const
float
rmax_i
=
ci
->
multipole
->
r_max
;
const
float
rmax_j
=
cj
->
multipole
->
r_max
;
const
float
rmax_j
=
cj
->
multipole
->
r_max
;
const
floa
t
multi
_mass
_i
=
ci
->
multipole
->
m_pole
.
M_000
;
const
struc
t
multi
pole
*
multi
_i
=
&
ci
->
multipole
->
m_pole
;
const
floa
t
multi
_mass
_j
=
cj
->
multipole
->
m_pole
.
M_000
;
const
struc
t
multi
pole
*
multi
_j
=
&
cj
->
multipole
->
m_pole
;
const
float
CoM_i
[
3
]
=
{
ci
->
multipole
->
CoM
[
0
]
-
loc_mean
[
0
],
const
float
CoM_i
[
3
]
=
{
ci
->
multipole
->
CoM
[
0
]
-
loc_mean
[
0
],
ci
->
multipole
->
CoM
[
1
]
-
loc_mean
[
1
],
ci
->
multipole
->
CoM
[
1
]
-
loc_mean
[
1
],
ci
->
multipole
->
CoM
[
2
]
-
loc_mean
[
2
]};
ci
->
multipole
->
CoM
[
2
]
-
loc_mean
[
2
]};
...
@@ -533,14 +533,14 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
...
@@ -533,14 +533,14 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
if
(
gravity_multipole_accept
(
0
.,
rmax_j
,
theta_crit2
,
r2
))
{
if
(
gravity_multipole_accept
(
0
.,
rmax_j
,
theta_crit2
,
r2
))
{
/* Interact! */
/* Interact! */
float
f_
ij
;
float
f_
x
,
f_y
,
f_z
;
runner_iact_grav_p
p_truncated
(
r2
,
h2_i
,
h_inv
_i
,
h_inv
3
_i
,
multi_
mass_j
,
runner_iact_grav_p
m
(
dx
,
dy
,
dz
,
r2
,
h
_i
,
h_inv_i
,
multi_
j
,
&
f_x
,
&
f_y
,
rlr_inv
,
&
f_
ij
);
&
f_
z
);
/* Store it back */
/* Store it back */
ci_cache
->
a_x
[
pid
]
=
-
f_
ij
*
d
x
;
ci_cache
->
a_x
[
pid
]
=
f_x
;
ci_cache
->
a_y
[
pid
]
=
-
f_
ij
*
d
y
;
ci_cache
->
a_y
[
pid
]
=
f_y
;
ci_cache
->
a_z
[
pid
]
=
-
f_
ij
*
d
z
;
ci_cache
->
a_z
[
pid
]
=
f_z
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
/* Update the interaction counter */
/* Update the interaction counter */
...
@@ -639,14 +639,14 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
...
@@ -639,14 +639,14 @@ void runner_dopair_grav_pp_truncated(struct runner *r, struct cell *ci,
if
(
gravity_multipole_accept
(
0
.,
rmax_i
,
theta_crit2
,
r2
))
{
if
(
gravity_multipole_accept
(
0
.,
rmax_i
,
theta_crit2
,
r2
))
{
/* Interact! */
/* Interact! */
float
f_
ji
;
float
f_
x
,
f_y
,
f_z
;
runner_iact_grav_p
p_truncated
(
r2
,
h2_j
,
h_inv
_j
,
h_inv
3
_j
,
multi_
mass_i
,
runner_iact_grav_p
m
(
dx
,
dy
,
dz
,
r2
,
h
_j
,
h_inv_j
,
multi_
i
,
&
f_x
,
&
f_y
,
rlr_inv
,
&
f_
ji
);
&
f_
z
);
/* Store it back */
/* Store it back */
cj_cache
->
a_x
[
pjd
]
=
-
f_
ji
*
d
x
;
cj_cache
->
a_x
[
pjd
]
=
f_x
;
cj_cache
->
a_y
[
pjd
]
=
-
f_
ji
*
d
y
;
cj_cache
->
a_y
[
pjd
]
=
f_y
;
cj_cache
->
a_z
[
pjd
]
=
-
f_
ji
*
d
z
;
cj_cache
->
a_z
[
pjd
]
=
f_z
;
#ifdef SWIFT_DEBUG_CHECKS
#ifdef SWIFT_DEBUG_CHECKS
/* Update the interaction counter */
/* Update the interaction counter */
...
...
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