Skip to content
Snippets Groups Projects
Commit 50678501 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent c46d0c91
No related branches found
No related tags found
1 merge request!524Improvements to GIZMO implementation
......@@ -41,9 +41,9 @@
#endif
#define gizmo_check_physical_quantity(name, quantity) \
if (quantity < 0.f) { \
if (quantity < 0.f) { \
gizmo_unphysical_message(name, quantity); \
quantity = 0.f; \
quantity = 0.f; \
}
#else // defined(GIZMO_UNPHYSICAL_ERROR) || defined(GIZMO_UNPHYSICAL_RESCUE)
......
......@@ -73,17 +73,20 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
float qL = 1.f;
if (pstar > WL[4]) {
qL = sqrtf(1.f +
0.5f * hydro_gamma_plus_one * hydro_one_over_gamma * (pstar / WL[4] - 1.f));
0.5f * hydro_gamma_plus_one * hydro_one_over_gamma *
(pstar / WL[4] - 1.f));
}
float qR = 1.f;
if (pstar > WR[4]) {
qR = sqrtf(1.f +
0.5f * hydro_gamma_plus_one * hydro_one_over_gamma * (pstar / WR[4] - 1.f));
0.5f * hydro_gamma_plus_one * hydro_one_over_gamma *
(pstar / WR[4] - 1.f));
}
const float SL = uL - aL * qL;
const float SR = uR + aR * qR;
const float Sstar = (WR[4] - WL[4] + WL[0] * uL * (SL - uL) - WR[0] * uR * (SR - uR)) /
(WL[0] * (SL - uL) - WR[0] * (SR - uR));
const float Sstar =
(WR[4] - WL[4] + WL[0] * uL * (SL - uL) - WR[0] * uR * (SR - uR)) /
(WL[0] * (SL - uL) - WR[0] * (SR - uR));
/* STEP 3: HLLC flux in a frame moving with the interface velocity */
if (Sstar >= 0.f) {
......@@ -157,7 +160,7 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
}
}
/* deboost to lab frame we add the flux contribution due to the
/* deboost to lab frame we add the flux contribution due to the
movement of the interface the density flux is unchanged
we add the extra velocity flux due to the absolute motion of the fluid
similarly, we need to add the energy fluxes due to the absolute motion */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment