Save new Reactions_Type data after a simplified SDC burn #929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@jmsexton03 has reported that for Simplified SDC in the flame problem,
enuc
in the plotfiles is identically zero. This is not the case for Strang and the reason appears to be a bug.This PR will ensure new
Reactions_Type
data is saved after the burn properly so enuc will be saved into the plotfiles correctly, corresponding to the value at the last SDC iteration. It should not change the estimated timestep because we aren't currently usingReactions_Type
to do so.To elaborate:
Currently in Simplified SDC,
Castro::react_state()
sets the newReactions_Type
data (R_new
) inca_react_state_simplified_sdc
.There we update Unew using the results of the burn, however, right before returning from
react_state()
we overwrite the burn results inR_new
with the old values inReactions_Type
inR_old
in theMultiFab::Copy()
.This was done in 3460254 because at that time the burning timestep estimator required the
Reactions_Type
data to be defined. (Although even then it seemingly makes more sense to saveR_new
back intoR_old
after the burn instead of vice versa?).As of 37e048c the timestep checking logic no longer requires the
Reactions_Type
data in the deprecatedca_check_timestep
. We are just calling theactual_rhs
to get an instantaneous value ford(Enuc)/dt
. Although inCastro::estTimeStep()
we are passingR_new
intoca_estdt_burning
, it remains unused there.