Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions integration/BackwardEuler/be_integrator.H
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@ int single_step (BurnT& state, BeT& be, const amrex::Real dt)

// work with the current guess

if (integrator_rp::do_corrector_validation) {
#ifdef SDC
const amrex::Real rho_current = state.rho_orig + be.t * state.ydot_a[SRHO];
const amrex::Real thresh = species_failure_tolerance * rho_current;
#else
const amrex::Real thresh = species_failure_tolerance;
#endif
bool fail{};
for (int i = 1; i <= NumSpec; ++i) {
if (be.y(i) < -thresh) {
fail = true;
break;
}
}

if (fail) {
ierr = IERR_BAD_STATE_IN_CORRECTOR;
break;
}
}

// get the ydots for our current guess of y

rhs(be.t, state, be, ydot);
Expand Down
1 change: 1 addition & 0 deletions integration/integrator_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum integrator_errors : std::int8_t {
IERR_TOO_MUCH_ACCURACY_REQUESTED = -5,
IERR_CORRECTOR_CONVERGENCE = -6,
IERR_LU_DECOMPOSITION_ERROR = -7,
IERR_BAD_STATE_IN_CORRECTOR = -8,
IERR_ENTERED_NSE = -100
};

Expand Down
Loading