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
78243006
Commit
78243006
authored
May 30, 2017
by
Matthieu Schaller
Browse files
Updated tolerances for the test 27 when running with a perturbed smoothing length.
parent
34f4318d
Changes
6
Hide whitespace changes
Inline
Side-by-side
tests/Makefile.am
View file @
78243006
...
...
@@ -94,6 +94,6 @@ EXTRA_DIST = testReading.sh makeInput.py testPair.sh testPairPerturbed.sh \
test27cells.sh test27cellsPerturbed.sh testParser.sh
\
test125cells.sh test125cellsPerturbed.sh testParserInput.yaml difffloat.py
\
tolerance_125_normal.dat tolerance_125_perturbed.dat
\
tolerance_27_normal.dat tolerance_27_perturbed.dat
\
tolerance_27_normal.dat tolerance_27_perturbed.dat
tolerance_27_perturbed_h.dat
\
tolerance_pair_normal.dat tolerance_pair_perturbed.dat
\
fft_params.yml
tests/test27cells.c
View file @
78243006
...
...
@@ -125,7 +125,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
part
->
h
=
size
*
h
*
random_uniform
(
1
.
f
,
1
.
1
f
)
/
(
float
)
n
;
else
part
->
h
=
size
*
h
/
(
float
)
n
;
h_max
=
fmax
(
h_max
,
part
->
h
);
h_max
=
fmax
f
(
h_max
,
part
->
h
);
part
->
id
=
++
(
*
partId
);
#if defined(GIZMO_SPH) || defined(SHADOWFAX_SPH)
...
...
tests/test27cells.sh.in
View file @
78243006
...
...
@@ -40,7 +40,7 @@ do
if
[
-e
brute_force_27_standard.dat
]
then
if
python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_
normal
.dat 6
if
python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_
perturbed_h
.dat 6
then
echo
"Accuracy test passed"
else
...
...
tests/test27cellsPerturbed.sh.in
View file @
78243006
...
...
@@ -40,7 +40,7 @@ do
if
[
-e
brute_force_27_perturbed.dat
]
then
if
python @srcdir@/difffloat.py brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat @srcdir@/tolerance_27_perturbed.dat 6 1
if
python @srcdir@/difffloat.py brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat @srcdir@/tolerance_27_perturbed
_h
.dat 6 1
then
echo
"Accuracy test passed"
else
...
...
tests/tolerance_27_perturbed.dat
View file @
78243006
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6
1.
2e-6 1e-4
5
e-
5
2
e-3
4
e-
6
3e-6 3e-6
3
e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-3 1e-5 1e-4
4
e-5 2e-3 2e-3 2e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6
1e-4
2
e-
4
3
e-3
1
e-
5
3e-6 3e-6
7
e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-3 1e-5 1e-4
6
e-5 2e-3 2e-3 2e-3
tests/tolerance_27_perturbed_h.dat
0 → 100644
View file @
78243006
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 2e-6 1e-4 2e-4 3e-3 1e-5 3e-6 3e-6 7e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1.4e-2 1e-5 1e-4 2.5e-4 3e-3 3e-3 3e-3
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