/** * Update the rates of progress of the reactions in the reaciton * mechanism. This routine operates on internal data. */ void InterfaceKinetics::getRevRateConstants(doublereal* krev, bool doIrreversible) { getFwdRateConstants(krev); if (doIrreversible) { doublereal *tmpKc = DATA_PTR(m_kdata->m_ropnet); getEquilibriumConstants(tmpKc); for (int i = 0; i < m_ii; i++) { krev[i] /= tmpKc[i]; } } else { const vector_fp& rkc = m_kdata->m_rkcn; multiply_each(krev, krev + nReactions(), rkc.begin()); } }
void BulkKinetics::getRevRateConstants(doublereal* krev, bool doIrreversible) { /* * go get the forward rate constants. -> note, we don't * really care about speed or redundancy in these * informational routines. */ getFwdRateConstants(krev); if (doIrreversible) { getEquilibriumConstants(&m_ropnet[0]); for (size_t i = 0; i < nReactions(); i++) { krev[i] /= m_ropnet[i]; } } else { // m_rkcn[] is zero for irreversible reactions for (size_t i = 0; i < nReactions(); i++) { krev[i] *= m_rkcn[i]; } } }