Skip to content
GitLab
Menu
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
c9545580
Commit
c9545580
authored
Mar 11, 2018
by
James Willis
Browse files
Check that an error is not created due to rounding with GCC 7.2.0.
parent
b5381515
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/runner_doiact.h
View file @
c9545580
...
...
@@ -1161,7 +1161,8 @@ void DOPAIR1_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
p
->
x
[
1
]
*
runner_shift
[
sid
][
1
]
+
p
->
x
[
2
]
*
runner_shift
[
sid
][
2
];
if
(
fabsf
(
d
-
sort_i
[
pid
].
d
)
-
ci
->
dx_max_sort
>
1.0e-4
*
max
(
fabsf
(
d
),
ci
->
dx_max_sort_old
))
1.0e-4
*
max
(
fabsf
(
d
),
ci
->
dx_max_sort_old
)
&&
fabsf
(
d
-
sort_i
[
pid
].
d
)
-
ci
->
dx_max_sort
>
ci
->
width
[
0
]
*
1.0e-10
)
error
(
"particle shift diff exceeds dx_max_sort in cell ci. ci->nodeID=%d "
"cj->nodeID=%d d=%e sort_i[pid].d=%e ci->dx_max_sort=%e "
...
...
@@ -1174,8 +1175,9 @@ void DOPAIR1_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
const
float
d
=
p
->
x
[
0
]
*
runner_shift
[
sid
][
0
]
+
p
->
x
[
1
]
*
runner_shift
[
sid
][
1
]
+
p
->
x
[
2
]
*
runner_shift
[
sid
][
2
];
if
(
fabsf
(
d
-
sort_j
[
pjd
].
d
)
-
cj
->
dx_max_sort
>
1.0e-4
*
max
(
fabsf
(
d
),
cj
->
dx_max_sort_old
))
if
((
fabsf
(
d
-
sort_j
[
pjd
].
d
)
-
cj
->
dx_max_sort
)
>
1.0e-4
*
max
(
fabsf
(
d
),
cj
->
dx_max_sort_old
)
&&
(
fabsf
(
d
-
sort_j
[
pjd
].
d
)
-
cj
->
dx_max_sort
)
>
cj
->
width
[
0
]
*
1.0e-10
)
error
(
"particle shift diff exceeds dx_max_sort in cell cj. cj->nodeID=%d "
"ci->nodeID=%d d=%e sort_j[pjd].d=%e cj->dx_max_sort=%e "
...
...
@@ -1672,7 +1674,8 @@ void DOPAIR2_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
p
->
x
[
1
]
*
runner_shift
[
sid
][
1
]
+
p
->
x
[
2
]
*
runner_shift
[
sid
][
2
];
if
(
fabsf
(
d
-
sort_i
[
pid
].
d
)
-
ci
->
dx_max_sort
>
1.0e-4
*
max
(
fabsf
(
d
),
ci
->
dx_max_sort_old
))
1.0e-4
*
max
(
fabsf
(
d
),
ci
->
dx_max_sort_old
)
&&
fabsf
(
d
-
sort_i
[
pid
].
d
)
-
ci
->
dx_max_sort
>
ci
->
width
[
0
]
*
1.0e-10
)
error
(
"particle shift diff exceeds dx_max_sort in cell ci. ci->nodeID=%d "
"cj->nodeID=%d d=%e sort_i[pid].d=%e ci->dx_max_sort=%e "
...
...
@@ -1686,7 +1689,8 @@ void DOPAIR2_BRANCH(struct runner *r, struct cell *ci, struct cell *cj) {
p
->
x
[
1
]
*
runner_shift
[
sid
][
1
]
+
p
->
x
[
2
]
*
runner_shift
[
sid
][
2
];
if
(
fabsf
(
d
-
sort_j
[
pjd
].
d
)
-
cj
->
dx_max_sort
>
1.0e-4
*
max
(
fabsf
(
d
),
cj
->
dx_max_sort_old
))
1.0e-4
*
max
(
fabsf
(
d
),
cj
->
dx_max_sort_old
)
&&
fabsf
(
d
-
sort_j
[
pjd
].
d
)
-
cj
->
dx_max_sort
>
cj
->
width
[
0
]
*
1.0e-10
)
error
(
"particle shift diff exceeds dx_max_sort in cell cj. cj->nodeID=%d "
"ci->nodeID=%d d=%e sort_j[pjd].d=%e cj->dx_max_sort=%e "
...
...
tests/tolerance_27_perturbed_h2.dat
View file @
c9545580
# 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 3e-6 1e-4 5e-4 1.5e-2 1.4e-5 3e-6 3e-6 1e-5
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1.5e-6 2.5e-2 1e-5 5.86e-3
4.96
e-
4
3e-3
4.
5e-3 3e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1.5e-6 2.5e-2 1e-5 5.86e-3
1.17
e-
3
3e-3
5.6
5e-3 3e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e0 1e-6 4e-6 4e-6 4e-6
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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