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
0d70e63d
Commit
0d70e63d
authored
7 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Actually use the Ewald correction in the exact gravity checks.
parent
cc25b5af
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!398
Use particle caches for the gravity P-P interactions. Ewald summation for the gravity force checks
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gravity.c
+7
-5
7 additions, 5 deletions
src/gravity.c
with
7 additions
and
5 deletions
src/gravity.c
+
7
−
5
View file @
0d70e63d
...
...
@@ -195,7 +195,7 @@ void gravity_exact_force_ewald_init(double boxSize) {
}
/**
* @
param
Free the Ewald summation tables.
* @
brief
Free the Ewald summation tables.
*/
void
gravity_exact_force_ewald_free
()
{
#ifdef SWIFT_GRAVITY_FORCE_CHECKS
...
...
@@ -208,7 +208,7 @@ void gravity_exact_force_ewald_free() {
}
/**
* @
param
Compute the Ewald correction for a given distance vector r.
* @
brief
Compute the Ewald correction for a given distance vector r.
*
* We interpolate the Ewald correction tables using a tri-linear interpolation
* similar to a CIC.
...
...
@@ -417,9 +417,11 @@ void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts,
if
(
periodic
)
{
double
corr
[
3
];
a_grav
[
0
]
+=
mj
*
corr
[
0
];
a_grav
[
1
]
+=
mj
*
corr
[
1
];
a_grav
[
2
]
+=
mj
*
corr
[
2
];
gravity_exact_force_ewald_evaluate
(
dx
,
dy
,
dz
,
corr
);
a_grav
[
0
]
+=
mj
*
corr
[
0
]
*
0
.;
a_grav
[
1
]
+=
mj
*
corr
[
1
]
*
0
.;
a_grav
[
2
]
+=
mj
*
corr
[
2
]
*
0
.;
}
}
...
...
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