| 445 | } |
| 446 | |
| 447 | void InterfaceKinetics::modifyReaction(size_t i, shared_ptr<Reaction> r_base) |
| 448 | { |
| 449 | Kinetics::modifyReaction(i, r_base); |
| 450 | |
| 451 | shared_ptr<ReactionRate> rate = r_base->rate(); |
| 452 | rate->setRateIndex(i); |
| 453 | rate->setContext(*r_base, *this); |
| 454 | |
| 455 | string rtype = rate->subType(); |
| 456 | if (rtype == "") { |
| 457 | rtype = rate->type(); |
| 458 | } |
| 459 | |
| 460 | // Ensure that interface MultiRate evaluator is available |
| 461 | if (!m_rateTypes.count(rtype)) { |
| 462 | throw CanteraError("InterfaceKinetics::modifyReaction", |
| 463 | "Interface evaluator not available for type '{}'.", rtype); |
| 464 | } |
| 465 | // Replace reaction rate evaluator |
| 466 | size_t index = m_rateTypes[rate->type()]; |
| 467 | m_rateHandlers[index]->replace(i, *rate); |
| 468 | |
| 469 | // Invalidate cached data |
| 470 | m_redo_rates = true; |
| 471 | m_temp += 0.1; |
| 472 | } |
| 473 | |
| 474 | void InterfaceKinetics::setMultiplier(size_t i, double f) |
| 475 | { |
nothing calls this directly
no test coverage detected