Utils.hpp
40 //=================================================================================================
42 //=================================================================================================
52 auto computeSpeciesAmount(ChemicalSystem const& system, Index ispecies, real value, Chars unit) -> real;
54 //=================================================================================================
56 //=================================================================================================
83 auto resolveReactionIndex(ReactionList const& reactionlist, StringOrIndex const& reaction) -> Index;
94 //=================================================================================================
96 //=================================================================================================
101 auto resolveElementIndexOrRaiseError(ElementList const& elementlist, StringOrIndex const& element, String const& errormsg = "") -> Index;
106 auto resolveElementIndexOrRaiseError(ChemicalSystem const& system, StringOrIndex const& element, String const& errormsg = "") -> Index;
111 auto resolveElementIndexOrRaiseError(Phase const& phase, StringOrIndex const& element, String const& errormsg = "") -> Index;
116 auto resolveSpeciesIndexOrRaiseError(SpeciesList const& specieslist, StringOrIndex const& species, String const& errormsg = "") -> Index;
121 auto resolveSpeciesIndexOrRaiseError(ChemicalSystem const& system, StringOrIndex const& species, String const& errormsg = "") -> Index;
126 auto resolveSpeciesIndexOrRaiseError(Phase const& phase, StringOrIndex const& species, String const& errormsg = "") -> Index;
131 auto resolvePhaseIndexOrRaiseError(PhaseList const& phaselist, StringOrIndex const& phase, String const& errormsg = "") -> Index;
136 auto resolvePhaseIndexOrRaiseError(ChemicalSystem const& system, StringOrIndex const& phase, String const& errormsg = "") -> Index;
141 auto resolveReactionIndexOrRaiseError(ReactionList const& reactionlist, StringOrIndex const& reaction, String const& errormsg = "") -> Index;
146 auto resolveReactionIndexOrRaiseError(ChemicalSystem const& system, StringOrIndex const& reaction, String const& errormsg = "") -> Index;
151 auto resolveSurfaceIndexOrRaiseError(SurfaceList const& surfacelist, StringOrIndex const& surface, String const& errormsg = "") -> Index;
156 auto resolveSurfaceIndexOrRaiseError(ChemicalSystem const& system, StringOrIndex const& surface, String const& errormsg = "") -> Index;
158 //=================================================================================================
160 //=================================================================================================
163 auto assembleFormulaVector(ChemicalFormula const& susbtance, ElementList const& elements) -> VectorXd;
166 auto assembleFormulaMatrix(SpeciesList const& species, ElementList const& elements) -> MatrixXd;
169 auto assembleStoichiometricMatrix(ReactionList const& reactions, SpeciesList const& species) -> MatrixXd;
171 //=================================================================================================
173 //=================================================================================================
184 //=================================================================================================
186 //=================================================================================================
193 auto determineReactingPhaseInterfacesInReaction(Reaction const& reaction, PhaseList const& phases) -> Pairs<Index, Index>;
196 auto determineReactingPhaseInterfacesInReactions(Vec<Reaction> const& reactions, PhaseList const& phases) -> Pairs<Index, Index>;
199 auto createSurfacesForReactingPhaseInterfacesInReactions(Vec<Reaction> const& reactions, PhaseList const& phases) -> Vec<Surface>;
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
auto unit(Index rows, Index i) -> decltype(VectorXd::Unit(rows, i))
Return an expression of a unit vector.
Definition: Matrix.hpp:546
autodiff::real real
The number type used throughout the library.
Definition: Real.hpp:26
std::vector< std::string > Strings
Convenient alias for std::vector<String>.
Definition: Types.hpp:55
std::variant< Index, int, std::string > StringOrIndex
The type used to accept either a name or an index.
Definition: Types.hpp:58