@@ -115,29 +115,6 @@ amrex::Real dvnlsd (int& NFLAG, BurnT& state, DvodeT& vstate)
115115 // sometime VODE goes way off tangent. If these mass fractions
116116 // are really bad, then let's just bail now
117117
118- if (integrator_rp::do_corrector_validation) {
119- #ifdef SDC
120- const amrex::Real rho_current = state.rho_orig + vstate.tn * state.ydot_a [SRHO];
121- const amrex::Real thresh = species_failure_tolerance * rho_current;
122- #else
123- const amrex::Real thresh = species_failure_tolerance;
124- #endif
125- bool fail{};
126- for (int i = 1 ; i <= NumSpec; ++i) {
127- if (vstate.y (i) < -thresh) {
128- fail = true ;
129- break ;
130- }
131- }
132-
133- if (fail) {
134- NFLAG = -1 ;
135- vstate.ICF = 2 ;
136- vstate.IPUP = 1 ;
137- return ACNRM;
138- }
139- }
140-
141118#ifdef NEW_NETWORK_IMPLEMENTATION
142119 RHS::dgesl (vstate.jac , vstate.y );
143120#else
@@ -171,6 +148,29 @@ amrex::Real dvnlsd (int& NFLAG, BurnT& state, DvodeT& vstate)
171148 vstate.y (i) = vstate.yh (i,1 ) + vstate.acor (i);
172149 }
173150
151+ if (integrator_rp::do_corrector_validation) {
152+ #ifdef SDC
153+ const amrex::Real rho_current = state.rho_orig + vstate.tn * state.ydot_a [SRHO];
154+ const amrex::Real thresh = species_failure_tolerance * rho_current;
155+ #else
156+ const amrex::Real thresh = species_failure_tolerance;
157+ #endif
158+ bool fail{};
159+ for (int i = 1 ; i <= NumSpec; ++i) {
160+ if (vstate.y (i) < -thresh) {
161+ fail = true ;
162+ break ;
163+ }
164+ }
165+
166+ if (fail) {
167+ NFLAG = -1 ;
168+ vstate.ICF = 2 ;
169+ vstate.IPUP = 1 ;
170+ return ACNRM;
171+ }
172+ }
173+
174174 // Test for convergence. If M > 0, an estimate of the convergence
175175 // rate constant is stored in CRATE, and this is used in the test.
176176
0 commit comments