Skip to content

Commit df57315

Browse files
committed
don't do this for number densities
also add some comments
1 parent bace8d2 commit df57315

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

integration/VODE/vode_dvnlsd.H

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ amrex::Real dvnlsd (int& NFLAG, BurnT& state, DvodeT& vstate)
148148
// sometime VODE goes way off tangent. If these mass fractions
149149
// are really bad, then let's just bail now
150150

151-
if (integrator_rp::do_corrector_validation) {
151+
if (integrator_rp::do_corrector_validation && !integrator_rp::use_number_densities) {
152152
#ifdef SDC
153153
const amrex::Real rho_current = state.rho_orig + vstate.tn * state.ydot_a[SRHO];
154154
const amrex::Real thresh = species_failure_tolerance * rho_current;
@@ -163,6 +163,10 @@ amrex::Real dvnlsd (int& NFLAG, BurnT& state, DvodeT& vstate)
163163
}
164164
}
165165

166+
// this resets the flags in the same fashion as is done above
167+
// for a singular matrix. ICF = 2 means "unrecoverable error",
168+
// IPUP = 1 forces a Jacobian reevaluation. The return value,
169+
// ACNRM is ignored in this case (since NFLAG != 0)
166170
if (fail) {
167171
NFLAG = -1;
168172
vstate.ICF = 2;

0 commit comments

Comments
 (0)