Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
c5c2b512
Commit
c5c2b512
authored
Sep 12, 2017
by
Matthieu Schaller
Browse files
Adjust gravity derivative tolerances
parent
8e4b0d26
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/testGravityDerivatives.c
View file @
c5c2b512
...
...
@@ -931,7 +931,7 @@ int main() {
clocks_set_cpufreq
(
cpufreq
);
/* Relative tolerance */
const
double
tol
=
1e-4
;
double
tol
=
1e-4
;
/* Get some randomness going */
const
int
seed
=
time
(
NULL
);
...
...
@@ -981,6 +981,8 @@ int main() {
#endif
#if SELF_GRAVITY_MULTIPOLE_ORDER > 2
tol
*=
2
.;
/* 3rd order terms */
test
(
pot
.
D_300
,
D_300
(
dx
,
dy
,
dz
,
r_inv
),
tol
,
min
,
"D_300"
);
test
(
pot
.
D_030
,
D_030
(
dx
,
dy
,
dz
,
r_inv
),
tol
,
min
,
"D_030"
);
...
...
@@ -1015,6 +1017,8 @@ int main() {
#if SELF_GRAVITY_MULTIPOLE_ORDER > 4
tol
*=
2
.;
/* 5th order terms */
test
(
pot
.
D_500
,
D_500
(
dx
,
dy
,
dz
,
r_inv
),
tol
,
min
,
"D_500"
);
test
(
pot
.
D_050
,
D_050
(
dx
,
dy
,
dz
,
r_inv
),
tol
,
min
,
"D_050"
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment