Skip to content

Commit 779fa53

Browse files
committed
add param
1 parent 290d278 commit 779fa53

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

integration/VODE/vode_dvnlsd.H

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ 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-
{
119-
amrex::Real rho_current = state.rho_orig + vstate.tn * state.ydot_a[SRHO];
118+
if (integrator_rp::do_corrector_validation) {
120119
#ifdef SDC
121-
amrex::Real thresh = species_failure_tolerance * rho_current;
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;
122122
#else
123-
amrex::Real thresh = species_failure_tolerance;
123+
const amrex::Real thresh = species_failure_tolerance;
124124
#endif
125125
bool fail{};
126126
for (int i = 1; i <= NumSpec; ++i) {

integration/_parameters

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ retry_atol_enuc real -1
9393
# are in [0, 1]?
9494
do_species_clip bool 1
9595

96+
# in the corrector loop, do we check if the predicted state is
97+
# valid (X > 0) before calling the RHS?
98+
do_corrector_validation bool 0
99+
96100
# flag for turning on the use of number densities for all species
97101
use_number_densities bool 0
98102

0 commit comments

Comments
 (0)