Castro
Castro copied to clipboard
implement reference counting system for eos state
We should use a reference count-like system to keep track of the EOS state. Anytime an operation does something that we believe breaks thermodynamic consistency, we increment the counter. If the counter > 0, then we know not to trust the state, and instead need to call clean_state
.
This will let us be more consistent with the EOS calls.
This would address #392. Also, I suppose it doesn't need to be a counter, it can just be a bool (either consistent or inconsistent).
one way to do this is to attach meta data to the MFs, using SetTag
in MFInfo
https://github.com/AMReX-Codes/amrex/blob/development/Src/Base/AMReX_FabArray.H#L116-L140