File tree Expand file tree Collapse file tree 2 files changed +8
-16
lines changed
Expand file tree Collapse file tree 2 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -52,20 +52,15 @@ void GasKinetics::update_rates_T()
5252 m_ROP_ok = false ;
5353 }
5454
55- if (T != m_temp || P != m_pres) {
56-
57- // loop over MultiBulkRates evaluators
58- // @todo ... address/reassess logic as this update can fail
59- // (see tests/kinetics/KineticsFromScratch.cpp:
60- // KineticsAddSpecies - add_species_sequential)
61- // a work-around is to call GasKinetics::invalidateCache()
62- for (auto & rates : m_bulk_rates) {
63- bool changed = rates->update (thermo (), *this );
64- if (changed) {
65- rates->getRateConstants (m_rfn.data ());
66- }
55+ // loop over MultiBulkRate evaluators for each reaction type
56+ for (auto & rates : m_bulk_rates) {
57+ bool changed = rates->update (thermo (), *this );
58+ if (changed) {
59+ rates->getRateConstants (m_rfn.data ());
60+ m_ROP_ok = false ;
6761 }
68-
62+ }
63+ if (T != m_temp || P != m_pres) {
6964 // P-log reactions (legacy)
7065 if (m_plog_rates.nReactions ()) {
7166 m_plog_rates.update (T, logT, m_rfn.data ());
Original file line number Diff line number Diff line change @@ -427,9 +427,6 @@ class KineticsAddSpecies : public testing::Test
427427 p.setState_TPX (1200 , 5 *OneAtm, X);
428428 p_ref.setState_TPX (1200 , 5 *OneAtm, X);
429429
430- // need to invalidate cache to force update
431- kin_ref->invalidateCache ();
432-
433430 vector_fp k (kin.nReactions ()), k_ref (kin_ref->nReactions ());
434431 vector_fp w (kin.nTotalSpecies ()), w_ref (kin_ref->nTotalSpecies ());
435432
You can’t perform that action at this time.
0 commit comments