Closed zingale closed 4 months ago
There is an additional complication though -- we need to remove the source terms, which we don't directly have at the new time (since we time-center the sources).
So it might just be simpler to compute the shock flag at the start of a timestep and keep it fixed for both halves of the burn -- this is certainly more in line with the way that Strang splitting works. Also since we are typically using small CFL numbers, it won't matter much.
there is an additional complication -- if we are to compute this before the first burn, we need the sources, so that means we need to compute gravity before the burn, which should be fine, since the burn doesn't change Phi
this has been completed
Right now, we use the shock flag (stored in the conserved state if
USE_SHOCK_VAR=TRUE
) in two different ways:At the moment, it is computed only once per timestep -- at the start of the advection (in the same place that we compute the flattening coefficients).
But it appears that we are always zeroing it out in
initialize_do_advance()
, so the shock flag will always be zero in the first half of Strang reactions.We should switch to computing it directly in when we call the burner, so it will be updated twice per step. For the first half Strang burn, this is easy, since
Sborder
has ghostcells. But for the second half of the Strang burn,S_new
does not have ghost cells, so we would need to do a fill into a temporary Fab or MultiFab (we could just overwriteSborder
at this point, I think).