MCPcopy Create free account
hub / github.com/Cantera/cantera / modifyReaction

Method modifyReaction

src/kinetics/InterfaceKinetics.cpp:447–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447void 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
474void InterfaceKinetics::setMultiplier(size_t i, double f)
475{

Callers

nothing calls this directly

Calls 7

CanteraErrorClass · 0.85
rateMethod · 0.80
setRateIndexMethod · 0.80
replaceMethod · 0.80
setContextMethod · 0.45
subTypeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected