Cantera 2.6.0
Public Member Functions | Private Attributes | List of all members
C_AnyN Class Reference

Handles any number of species in a reaction, including fractional stoichiometric coefficients, and arbitrary reaction orders. More...

#include <StoichManager.h>

Public Member Functions

 C_AnyN (size_t rxn, const std::vector< size_t > &ic, const vector_fp &order_, const vector_fp &stoich_)
 
void multiply (const doublereal *input, doublereal *output) const
 
void incrementSpecies (const doublereal *input, doublereal *output) const
 
void decrementSpecies (const doublereal *input, doublereal *output) const
 
void incrementReaction (const doublereal *input, doublereal *output) const
 
void decrementReaction (const doublereal *input, doublereal *output) const
 
void resizeCoeffs (const std::map< std::pair< size_t, size_t >, size_t > &indices)
 
void derivatives (const double *S, const double *R, vector_fp &jac) const
 
void scale (const double *R, double *out, double factor) const
 

Private Attributes

size_t m_n
 Length of the m_ic vector. More...
 
size_t m_rxn
 ID of the reaction corresponding to this stoichiometric manager. More...
 
std::vector< size_t > m_ic
 Vector of species which are involved with this stoichiometric manager calculations. More...
 
vector_fp m_order
 Reaction orders for the reaction. More...
 
vector_fp m_stoich
 Stoichiometric coefficients for the reaction, reactant or product side. More...
 
std::vector< size_t > m_jc
 Indices in derivative triplet vector. More...
 
double m_sum_order
 Sum of reaction order vector. More...
 

Detailed Description

Handles any number of species in a reaction, including fractional stoichiometric coefficients, and arbitrary reaction orders.

See Stoichiometry

Definition at line 331 of file StoichManager.h.

Constructor & Destructor Documentation

◆ C_AnyN() [1/2]

C_AnyN ( )
inline

Definition at line 334 of file StoichManager.h.

◆ C_AnyN() [2/2]

C_AnyN ( size_t  rxn,
const std::vector< size_t > &  ic,
const vector_fp order_,
const vector_fp stoich_ 
)
inline

Definition at line 339 of file StoichManager.h.

Member Function Documentation

◆ multiply()

void multiply ( const doublereal *  input,
doublereal *  output 
) const
inline

Definition at line 354 of file StoichManager.h.

◆ incrementSpecies()

void incrementSpecies ( const doublereal *  input,
doublereal *  output 
) const
inline

Definition at line 368 of file StoichManager.h.

◆ decrementSpecies()

void decrementSpecies ( const doublereal *  input,
doublereal *  output 
) const
inline

Definition at line 376 of file StoichManager.h.

◆ incrementReaction()

void incrementReaction ( const doublereal *  input,
doublereal *  output 
) const
inline

Definition at line 384 of file StoichManager.h.

◆ decrementReaction()

void decrementReaction ( const doublereal *  input,
doublereal *  output 
) const
inline

Definition at line 391 of file StoichManager.h.

◆ resizeCoeffs()

void resizeCoeffs ( const std::map< std::pair< size_t, size_t >, size_t > &  indices)
inline

Definition at line 398 of file StoichManager.h.

◆ derivatives()

void derivatives ( const double *  S,
const double *  R,
vector_fp jac 
) const
inline

Definition at line 410 of file StoichManager.h.

◆ scale()

void scale ( const double *  R,
double *  out,
double  factor 
) const
inline

Definition at line 435 of file StoichManager.h.

Member Data Documentation

◆ m_n

size_t m_n
private

Length of the m_ic vector.

This is the number of species which participate in the reaction order and stoichiometric coefficient vectors for the reactant or product description of the reaction.

Definition at line 447 of file StoichManager.h.

◆ m_rxn

size_t m_rxn
private

ID of the reaction corresponding to this stoichiometric manager.

This is used within the interface to select the array position to read and write to Normally this is associated with the reaction number in an array of quantities indexed by the reaction number, for example, ROP[irxn].

Definition at line 455 of file StoichManager.h.

◆ m_ic

std::vector<size_t> m_ic
private

Vector of species which are involved with this stoichiometric manager calculations.

This is an integer list of species which participate in either the reaction order matrix or the stoichiometric order matrix for this reaction, m_rxn.

Definition at line 464 of file StoichManager.h.

◆ m_order

vector_fp m_order
private

Reaction orders for the reaction.

This is either for the reactants or products. Length = m_n. Species number, m_ic[n], has a reaction order of m_order[n].

Definition at line 471 of file StoichManager.h.

◆ m_stoich

vector_fp m_stoich
private

Stoichiometric coefficients for the reaction, reactant or product side.

This is either for the reactants or products. Length = m_n. Species number m_ic[m], has a stoichiometric coefficient of m_stoich[n].

Definition at line 478 of file StoichManager.h.

◆ m_jc

std::vector<size_t> m_jc
private

Indices in derivative triplet vector.

Definition at line 480 of file StoichManager.h.

◆ m_sum_order

double m_sum_order
private

Sum of reaction order vector.

Definition at line 482 of file StoichManager.h.


The documentation for this class was generated from the following file: