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
571ab90e
Commit
571ab90e
authored
2 months ago
by
Orestis Karapiperis
Browse files
Options
Downloads
Patches
Plain Diff
Small fix not yet adressed from when moving the Balsara computation to where the switch is needed
parent
bd3491d1
No related branches found
No related tags found
2 merge requests
!2142
Anti-symmetric div(B) cleaning and Hopkins2016 artificial resistivity
,
!2124
Karapiperis/antisymmetric and faster dedner
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hydro/SPHENIX/hydro.h
+4
-11
4 additions, 11 deletions
src/hydro/SPHENIX/hydro.h
with
4 additions
and
11 deletions
src/hydro/SPHENIX/hydro.h
+
4
−
11
View file @
571ab90e
...
...
@@ -838,9 +838,9 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
const
float
pressure
=
hydro_get_comoving_pressure
(
p
);
const
float
pressure_including_floor
=
pressure_floor_get_comoving_pressure
(
p
,
pressure_floor
,
pressure
,
cosmo
);
const
float
soundspeed
_physical
=
gas_soundspeed_from_pressure
(
p
->
rho
,
pressure_including_floor
)
*
cosmo
->
a_factor_sound_speed
;
const
float
soundspeed
=
gas_soundspeed_from_pressure
(
p
->
rho
,
pressure_including_floor
)
;
const
float
soundspeed_physical
=
soundspeed
*
cosmo
->
a_factor_sound_speed
;
const
float
fac_B
=
cosmo
->
a_factor_Balsara_eps
;
const
float
sound_crossing_time_inverse
=
...
...
@@ -853,14 +853,7 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force(
/* Compute the norm of div v */
const
float
abs_div_v
=
fabsf
(
p
->
viscosity
.
div_v
);
/* Compute the sound speed */
const
float
pressure
=
hydro_get_comoving_pressure
(
p
);
const
float
pressure_including_floor
=
pressure_floor_get_comoving_pressure
(
p
,
pressure_floor
,
pressure
,
cosmo
);
const
float
soundspeed
=
gas_soundspeed_from_pressure
(
p
->
rho
,
pressure_including_floor
);
/* Get the squares of the quantities necessary for the Balsara-like switch */
const
float
fac_B_2
=
fac_B
*
fac_B
;
const
float
curl_v_2
=
curl_v
*
curl_v
;
...
...
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