Skip to content

Commit

Permalink
AsterX: Set to atmo if press is less then p_atm in con2prim
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Jul 12, 2023
1 parent 12c961d commit 50b5485
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion AsterX/src/con2prim.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void AsterX_Con2Prim_typeEoS(CCTK_ARGUMENTS, EOSIDType &eos_cold,
CCTK_INT c2p_succeeded_Pal = 0; // false for now
c2p_Noble.solve(eos_th, pv, pv_seeds, cv, glo, c2p_succeeded_Noble);

if (!c2p_succeeded_Noble || pv.press < 0.0) {
if (!c2p_succeeded_Noble) {
c2p_Pal.solve(eos_th, pv, pv_seeds, cv, glo, c2p_succeeded_Pal);
}

Expand Down Expand Up @@ -170,6 +170,16 @@ void AsterX_Con2Prim_typeEoS(CCTK_ARGUMENTS, EOSIDType &eos_cold,
}
}
*/

if(pv.press < p_atm) {
// set to atmo
cv.dBvec(0) = dBx(p.I);
cv.dBvec(1) = dBy(p.I);
cv.dBvec(2) = dBz(p.I);
pv.Bvec = cv.dBvec / sqrt_detg;
atmo.set(pv, cv, glo);
}

// dummy vars
CCTK_REAL Ex, Ey, Ez;

Expand Down

0 comments on commit 50b5485

Please sign in to comment.