8#ifndef CT_REACTIONRATE_H
9#define CT_REACTIONRATE_H
87 "Not implemented by '{}' object.",
type());
91 virtual const string type()
const = 0;
111 out[
"type"] =
type();
133 if (rate_units.
size() > 1) {
141 virtual void check(
const string& equation) {}
148 "To be removed after Cantera 3.0; superseded by single-parameter version.");
160 "To be removed after Cantera 3.0; superseded by two-parameter version.");
199 double eval(
double T,
double extra) {
214 double eval(
double T,
const vector<double>& extra) {
243 "Not implemented by '{}' object.",
type());
272 unique_ptr<MultiRateBase> m_evaluator;
Header for unit conversion utilities, which are used to translate user input from input files (See In...
A map of string keys to values whose type can vary at runtime.
Public interface for kinetics managers.
An abstract base class for evaluating all reactions of a particular type.
virtual double evalSingle(ReactionRate &rate)=0
Get the rate for a single reaction.
virtual void update(double T)=0
Update common reaction rate data based on temperature.
An error indicating that an unimplemented function has been called.
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
void setCompositionDependence(bool comp_dep)
Set rate compositional dependence.
virtual void setParameters(const AnyMap &node, const UnitStack &units)
Set parameters.
bool compositionDependent()
Boolean indicating whether rate has compositional dependence.
double eval(double T)
Evaluate reaction rate based on temperature.
Units m_conversion_units
Units of the leading term in the reaction rate expression.
virtual void setContext(const Reaction &rxn, const Kinetics &kin)
Set context of reaction rate evaluation.
const Units & conversionUnits() const
Get the units for converting the leading term in the reaction rate expression.
bool valid() const
Get flag indicating whether reaction rate is set up correctly.
double eval(double T, const vector< double > &extra)
Evaluate reaction rate based on temperature and an extra vector parameter.
virtual void setRateUnits(const UnitStack &rate_units)
Set the units of the reaction rate expression.
double eval(double T, double extra)
Evaluate reaction rate based on temperature and an extra parameter.
size_t rateIndex() const
Reaction rate index within kinetics evaluator.
AnyMap parameters() const
Return the parameters such that an identical Reaction could be reconstructed using the newReaction() ...
void setRateIndex(size_t idx)
Set reaction rate index within kinetics evaluator.
bool m_valid
Flag indicating whether reaction rate is set up correctly.
virtual unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
virtual const string subType() const
String identifying sub-type of reaction rate specialization.
void check(const string &equation, const AnyMap &node)
Check basic syntax and settings of reaction rate expression.
virtual void validate(const string &equation, const Kinetics &kin)
Validate the reaction rate expression.
virtual void check(const string &equation)
Check basic syntax and settings of reaction rate expression.
virtual const string type() const =0
String identifying reaction rate specialization.
bool m_composition_dependent_rate
Flag indicating composition dependent rate.
AnyMap m_input
Input data used for specific models.
virtual void getParameters(AnyMap &node) const
Get parameters.
MultiRateBase & _evaluator()
Return an object that be used to evaluate the rate by converting general input such as temperature an...
size_t m_rate_index
Index of reaction rate within kinetics evaluator.
virtual void validate(const string &equation)
Validate the reaction rate expression (legacy call)
Abstract base class which stores data about a reaction and its rate parameterization so that it can b...
A representation of the units associated with a dimensional quantity.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Namespace for the Cantera kernel.
const size_t npos
index returned by functions to indicate "no position"
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Unit aggregation utility.
size_t size() const
Size of UnitStack.
Units standardUnits() const
Get standard unit used by UnitStack.
Units product() const
Calculate product of units-exponent stack.