diff --git a/src/kinetics/GasKinetics.cpp b/src/kinetics/GasKinetics.cpp index f81faf9ee3..787c693cf8 100644 --- a/src/kinetics/GasKinetics.cpp +++ b/src/kinetics/GasKinetics.cpp @@ -52,20 +52,15 @@ void GasKinetics::update_rates_T() m_ROP_ok = false; } - if (T != m_temp || P != m_pres) { - - // loop over MultiBulkRates evaluators - // @todo ... address/reassess logic as this update can fail - // (see tests/kinetics/KineticsFromScratch.cpp: - // KineticsAddSpecies - add_species_sequential) - // a work-around is to call GasKinetics::invalidateCache() - for (auto& rates : m_bulk_rates) { - bool changed = rates->update(thermo(), *this); - if (changed) { - rates->getRateConstants(m_rfn.data()); - } + // loop over MultiBulkRate evaluators for each reaction type + for (auto& rates : m_bulk_rates) { + bool changed = rates->update(thermo(), *this); + if (changed) { + rates->getRateConstants(m_rfn.data()); + m_ROP_ok = false; } - + } + if (T != m_temp || P != m_pres) { // P-log reactions (legacy) if (m_plog_rates.nReactions()) { m_plog_rates.update(T, logT, m_rfn.data()); diff --git a/test/kinetics/kineticsFromScratch.cpp b/test/kinetics/kineticsFromScratch.cpp index e2c9d2a016..7870809b52 100644 --- a/test/kinetics/kineticsFromScratch.cpp +++ b/test/kinetics/kineticsFromScratch.cpp @@ -427,9 +427,6 @@ class KineticsAddSpecies : public testing::Test p.setState_TPX(1200, 5*OneAtm, X); p_ref.setState_TPX(1200, 5*OneAtm, X); - // need to invalidate cache to force update - kin_ref->invalidateCache(); - vector_fp k(kin.nReactions()), k_ref(kin_ref->nReactions()); vector_fp w(kin.nTotalSpecies()), w_ref(kin_ref->nTotalSpecies());