Reactions.hpp
153 reaction_generators.push_back([=](ReactionGeneratorArgs args) -> Vec<Reaction> { return { item }; }); // item is a Reaction object
157 reaction_generators.push_back([=](ReactionGeneratorArgs args) -> Vec<Reaction> { return { item(args) }; }); // item is a GeneralReaction object; use operator()(ReactionGeneratorArgs) to convert to Reaction
162 errorif(!reaction_generators.back(), "Expecting an object in Reactions::add call that produces an initialized ReactionGenerator function object.");
The class used to store and retrieve data of chemical species.
Definition: Database.hpp:32
auto setName(String const &name) -> GeneralReaction &
Set the unique name of the reaction.
auto setRateModel(ReactionRateModelGenerator const &model_generator) -> GeneralReaction &
Set the reaction rate model generator of the reaction.
auto set(ReactionRateModelGenerator const &model_generator) -> GeneralReaction &
Set the reaction rate model generator of the reaction (equivalent to GeneralReaction::setRateModel).
GeneralReaction()
Construct a default GeneralReaction object.
auto rateModelGenerator() const -> ReactionRateModelGenerator const &
Return the reaction rate model generator of the reaction.
auto setRateModel(ReactionRateModel const &model) -> GeneralReaction &
Set the reaction rate model of the reaction.
GeneralReaction(String const &equation)
Construct a GeneralReaction object with given reaction equation as a formatted string.
auto setEquation(String const &equation) -> GeneralReaction &
Set the equation of the reaction as a formatted string.
auto rateModel() const -> ReactionRateModel const &
Return the reaction rate model of the reaction.
auto equation() const -> String const &
Return the reaction equation of the reaction.
Used to represent a collection of reactions controlled kinetically.
Definition: Reactions.hpp:128
Reactions(ReactionConvertible const &... reactions)
Construct a Reactions object with given Reaction, GeneralReaction, or ReactionGenerator objects.
Definition: Reactions.hpp:136
auto add(T const &item) -> void
Add a reaction generator into the Reactions container.
Definition: Reactions.hpp:144
auto convert(ReactionGeneratorArgs args) const -> Vec< Reaction >
Convert this Reactions object into a vector of Reaction objects.
#define errorif(condition,...)
Define a macro to raise a runtime exception if condition is true.
Definition: Exception.hpp:140
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
Fn< Vec< Reaction >(ReactionGeneratorArgs args)> ReactionGenerator
The function type for the generation of reactions with given species in the chemical system.
Definition: Reactions.hpp:53
Fn< ReactionRateModel(ReactionRateModelGeneratorArgs args)> ReactionRateModelGenerator
The function signature for functions that generates a ReactionRateModel for a reaction.
Definition: ReactionRateModel.hpp:67
std::function< F > Fn
Convenient alias for std::function<R(Args...)>.
Definition: Types.hpp:110
The data provided to a ReactionGenerator to construct a Reaction object.
Definition: Reactions.hpp:37
PhaseList const & phases
The phases in the chemical system where the reaction belongs to.
Definition: Reactions.hpp:45
SurfaceList const & surfaces
The surfaces in the chemical system where the reaction belongs to.
Definition: Reactions.hpp:48
SpeciesList const & species
The species in the chemical system where the reaction belongs to.
Definition: Reactions.hpp:42
Database const & database
The thermodynamic database used to construct the chemical system where the reaction belongs to.
Definition: Reactions.hpp:39