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

Merge branch 'cherry-pick-b3f2463f' into 'master'

missing factors in hllc riemann solver (see Toro: (10.38), (10.39))

See merge request !1694
parents 2166a45f 2b843e3f
No related branches found
No related tags found
2 merge requests!1715Update planetary strength after planetary plus's master rebase,!1694missing factors in hllc riemann solver (see Toro: (10.38), (10.39))
...@@ -109,11 +109,11 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux( ...@@ -109,11 +109,11 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
if (SL < 0.0f) { if (SL < 0.0f) {
const float starfac = SLmuL / (SL - Sstar) - 1.0f; const float starfac = SLmuL / (SL - Sstar);
const float rhoLSL = WL[0] * SL; const float rhoLSL = WL[0] * SL;
const float SstarmuL = Sstar - uL; const float SstarmuL = Sstar - uL;
const float rhoLSLstarfac = rhoLSL * starfac; const float rhoLSLstarfac = rhoLSL * (starfac - 1.0f);
const float rhoLSLSstarmuL = rhoLSL * SstarmuL; const float rhoLSLSstarmuL = rhoLSL * SstarmuL * starfac;
totflux[0] += rhoLSLstarfac; totflux[0] += rhoLSLstarfac;
totflux[1] += rhoLSLstarfac * WL[1] + rhoLSLSstarmuL * n[0]; totflux[1] += rhoLSLstarfac * WL[1] + rhoLSLSstarmuL * n[0];
...@@ -138,11 +138,11 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux( ...@@ -138,11 +138,11 @@ __attribute__((always_inline)) INLINE static void riemann_solve_for_flux(
if (SR > 0.0f) { if (SR > 0.0f) {
const float starfac = SRmuR / (SR - Sstar) - 1.0f; const float starfac = SRmuR / (SR - Sstar);
const float rhoRSR = WR[0] * SR; const float rhoRSR = WR[0] * SR;
const float SstarmuR = Sstar - uR; const float SstarmuR = Sstar - uR;
const float rhoRSRstarfac = rhoRSR * starfac; const float rhoRSRstarfac = rhoRSR * (starfac - 1.f);
const float rhoRSRSstarmuR = rhoRSR * SstarmuR; const float rhoRSRSstarmuR = rhoRSR * SstarmuR * starfac;
totflux[0] += rhoRSRstarfac; totflux[0] += rhoRSRstarfac;
totflux[1] += rhoRSRstarfac * WR[1] + rhoRSRSstarmuR * n[0]; totflux[1] += rhoRSRstarfac * WR[1] + rhoRSRSstarmuR * n[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment