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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
e505ff5a
Commit
e505ff5a
authored
May 18, 2022
by
Josh Borrow
Committed by
Matthieu Schaller
May 18, 2022
Browse files
Options
Downloads
Patches
Plain Diff
Added fabsf to FPE check as kernel gradients are negative by construction
parent
595c7fc1
No related branches found
No related tags found
2 merge requests
!1558
Sync mhd canvas before is too late
,
!1557
Added fabsf to FPE check as kernel gradients are negative by construction
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hydro/Gasoline/hydro.h
+4
-2
4 additions, 2 deletions
src/hydro/Gasoline/hydro.h
with
4 additions
and
2 deletions
src/hydro/Gasoline/hydro.h
+
4
−
2
View file @
e505ff5a
...
@@ -542,9 +542,11 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
...
@@ -542,9 +542,11 @@ __attribute__((always_inline)) INLINE static void hydro_end_density(
p
->
smooth_pressure_gradient
[
1
]
*=
hydro_gamma_minus_one
*
h_inv_dim_plus_one
;
p
->
smooth_pressure_gradient
[
1
]
*=
hydro_gamma_minus_one
*
h_inv_dim_plus_one
;
p
->
smooth_pressure_gradient
[
2
]
*=
hydro_gamma_minus_one
*
h_inv_dim_plus_one
;
p
->
smooth_pressure_gradient
[
2
]
*=
hydro_gamma_minus_one
*
h_inv_dim_plus_one
;
/* Finish calculation of the velocity gradient tensor */
/* Finish calculation of the velocity gradient tensor, and
* guard against FPEs here. */
const
float
velocity_gradient_norm
=
const
float
velocity_gradient_norm
=
p
->
weighted_wcount
>
0
.
f
?
3
.
f
*
cosmo
->
a2_inv
/
p
->
weighted_wcount
:
0
.
f
;
p
->
weighted_wcount
==
0
.
f
?
0
.
f
:
3
.
f
*
cosmo
->
a2_inv
/
p
->
weighted_wcount
;
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
for
(
int
j
=
0
;
j
<
3
;
j
++
)
{
...
...
...
...
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
sign in
to comment