Skip to content

Commit

Permalink
[Kinetics] Buffer rate index for MultiRate objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Sep 22, 2021
1 parent bbc27b4 commit dda597f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kinetics/BulkKinetics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ bool BulkKinetics::addReaction(shared_ptr<Reaction> r, bool resize)
m_bulk_rates.back()->resize(m_kk, nReactions());
}

// Set index of rate to number of reaction within kinetics
rate->setRateIndex(nReactions() - 1);

// Add reaction rate to evaluator
size_t index = m_bulk_types[rate->type()];
m_bulk_rates[index]->add(nReactions() - 1, *rate);
Expand Down

0 comments on commit dda597f

Please sign in to comment.