AMReX-Astro / Castro

Castro (Compressible Astrophysics): An adaptive mesh, astrophysical compressible (radiation-, magneto-) hydrodynamics simulation code for massively parallel CPU and GPU architectures.
http://amrex-astro.github.io/Castro
Other
297 stars 99 forks source link

Compute the shock flag once -- at the start of the timestep #2728

Closed zingale closed 4 months ago

zingale commented 7 months ago

PR summary

This changes the way the shock flag is computed for disabling burning in shocks. Now we compute it at the top of the timestep, before the first Strang burn, using the time-level n state and sources. There is some redundancy here (we need to compute the old sources before the burn now), and there is a FillPatch needed. But this should be minimal and only in effect if we compile with SHOCK_VAR.

Note: this does not change how we compute the shock flag for hydro at the moment when doing the hybrid Riemann solve (although we can easily change that in a future PR).

PR motivation

PR checklist

zingale commented 7 months ago

depends on #2726 fixes #2724

zingale commented 4 months ago

this is ready for review now