From 12f99bd4257def4ff40710da921e491cb139123f Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 25 Sep 2023 20:06:35 -0400 Subject: [PATCH] add some breaks in the valid step logic no need to keep checking if we already failed --- integration/VODE/vode_dvstep.H | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/integration/VODE/vode_dvstep.H b/integration/VODE/vode_dvstep.H index 5b850225eb..1b93c971c3 100644 --- a/integration/VODE/vode_dvstep.H +++ b/integration/VODE/vode_dvstep.H @@ -259,6 +259,7 @@ int dvstep (BurnT& state, DvodeT& vstate) // or greater than one (within a tolerance). if (vstate.y(i) < -species_failure_tolerance) { valid_update = false; + break; } // Don't enforce the condition below if @@ -266,6 +267,7 @@ int dvstep (BurnT& state, DvodeT& vstate) if (!use_number_densities) { if (vstate.y(i) > 1.0_rt + species_failure_tolerance) { valid_update = false; + break; } } @@ -295,10 +297,12 @@ int dvstep (BurnT& state, DvodeT& vstate) if (vstate.y(SFS+i) < -species_failure_tolerance * rho_current) { valid_update = false; + break; } if (vstate.y(SFS+i) > (1.0_rt + species_failure_tolerance) * rho_current) { valid_update = false; + break; } #endif