51#ifndef OPENSWMM_ENGINE_TRANSPORT_REACTION_EXPRESSION_HPP
52#define OPENSWMM_ENGINE_TRANSPORT_REACTION_EXPRESSION_HPP
61using openswmm::RxToken;
62using openswmm::RxExprSpan;
69 const std::vector<std::string>*
species =
nullptr;
70 const std::vector<std::string>*
coefs =
nullptr;
71 const std::vector<std::string>*
terms =
nullptr;
97 std::vector<RxToken>& pool,
POD reaction-VM instruction + span types (phase R2, D-L3 flat pool). Data-layer header: no dependenci...
Definition ExplicitFvSolver.hpp:52
int reactionHydVarCount()
Number of built-in hydraulic variables.
Definition ReactionExpression.cpp:521
bool reactionFunctionInfo(int idx, const char **name, int *arity)
Name + arity of function idx; false when out of range.
Definition ReactionExpression.cpp:514
bool reactionHydVarInfo(int idx, const char **name, const char **description)
Name + one-line description of hydraulic variable idx.
Definition ReactionExpression.cpp:525
double evalReactionExpression(const std::vector< RxToken > &pool, const RxExprSpan &span, const RxEvalEnv &env) noexcept
Tier-1 evaluation: one pass, fixed-depth stack, allocation-free.
Definition ReactionExpression.cpp:456
int reactionFunctionCount()
Number of built-in functions.
Definition ReactionExpression.cpp:510
std::string compileReactionExpression(const std::string &src, const RxSymbols &symbols, std::vector< RxToken > &pool, RxExprSpan &out, int &error_col)
Compile src into the shared pool.
Definition ReactionExpression.cpp:191
constexpr int kRxMaxStackDepth
Definition ReactionTokens.hpp:84
RxHydVar
Definition ReactionTokens.hpp:41
Compiled expression = span into the shared pool. len 0 ⇒ no expression.
Definition ReactionTokens.hpp:77
Evaluation environment: pre-gathered pointers, no lookups.
Definition ReactionExpression.hpp:81
const double * pollutants
element pollutant conc (R4, read-only)
Definition ReactionExpression.hpp:86
const double * coefs
coefficient values
Definition ReactionExpression.hpp:83
const double * species
local species concentrations
Definition ReactionExpression.hpp:82
const double * terms
term values (evaluated in-order)
Definition ReactionExpression.hpp:84
const double * hydvar
RxHydVar::COUNT_ entries.
Definition ReactionExpression.hpp:85
Definition ReactionExpression.hpp:68
const std::vector< std::string > * coefs
Definition ReactionExpression.hpp:70
const std::vector< std::string > * pollutants
Definition ReactionExpression.hpp:76
const std::vector< std::string > * terms
Definition ReactionExpression.hpp:71
const std::vector< std::string > * species
local slots
Definition ReactionExpression.hpp:69
int max_term
forward-only rule: terms below this index only
Definition ReactionExpression.hpp:77