COPASI API
4.40.278
|
#include <CMathReaction.h>
Public Types | |
typedef CVector< std::pair< C_FLOAT64 *, C_FLOAT64 > > | Balance |
typedef std::set< std::pair< const CMathObject *, C_FLOAT64 > > | ObjectBalance |
typedef std::pair< C_FLOAT64 *, C_FLOAT64 > | SpeciesBalance |
Public Member Functions | |
CMathReaction () | |
CMathReaction (const CMathReaction &src) | |
void | copy (const CMathReaction &src, CMathContainer &container) |
void | fire () |
void | fireMultiple (const C_FLOAT64 &count) |
const CObjectInterface::ObjectSet & | getChangedObjects () const |
const CMathObject * | getFluxObject () const |
const CReaction * | getModelReaction () const |
const Balance & | getNumberBalance () const |
const ObjectBalance & | getObjectBalance () const |
const CMathObject * | getParticleFluxObject () const |
const CMathObject * | getPropensityObject () const |
void | initialize (const CReaction *pReaction, CMathContainer &container) |
bool | isFast () const |
void | relocate (const CMathContainer *pContainer, const std::vector< CMath::sRelocate > &relocations) |
~CMathReaction () | |
Private Attributes | |
CObjectInterface::ObjectSet | mChangedSpecies |
Balance | mNumberBalance |
ObjectBalance | mObjectBalance |
CMathObject * | mpFlux |
CMathObject * | mpParticleFlux |
CMathObject * | mpPropensity |
const CReaction * | mpReaction |
typedef CVector< std::pair< C_FLOAT64 *, C_FLOAT64 > > CMathReaction::Balance |
typedef std::set< std::pair < const CMathObject *, C_FLOAT64 > > CMathReaction::ObjectBalance |
typedef std::pair< C_FLOAT64 *, C_FLOAT64 > CMathReaction::SpeciesBalance |
CMathReaction::CMathReaction | ( | ) |
Constructor
CMathReaction::CMathReaction | ( | const CMathReaction & | src | ) |
Copy constructor
CMathReaction::~CMathReaction | ( | ) |
Destructor
void CMathReaction::copy | ( | const CMathReaction & | src, |
CMathContainer & | container | ||
) |
Copy an existing object
const | CMathReaction & src |
CMathContainer | & container |
void CMathReaction::fire | ( | ) |
Fire the reaction count times. Note count must not necessarily be an integer
References CVectorCore< CType >::array(), mNumberBalance, and CVectorCore< CType >::size().
Referenced by CHybridMethodODE45::fireReaction().
void CMathReaction::fireMultiple | ( | const C_FLOAT64 & | count | ) |
Fire the reaction count times. Note count must not necessarily be an integer
const | C_FLOAT64 & count |
References CVectorCore< CType >::array(), mNumberBalance, and CVectorCore< CType >::size().
Referenced by CTauLeapMethod::updateSystem().
const CObjectInterface::ObjectSet & CMathReaction::getChangedObjects | ( | ) | const |
Retrieve the set of particle number objects changed when the reaction fires.
References mChangedSpecies.
Referenced by CStochDirectMethod::start(), CStochMethod::start(), and CTrajAdaptiveSA::start().
const CMathObject * CMathReaction::getFluxObject | ( | ) | const |
Retrieve a pointer to the mathematical object for the flux.
References mpFlux.
const CReaction * CMathReaction::getModelReaction | ( | ) | const |
Retrieve a pointer to the model reaction
References mpReaction.
const CMathReaction::Balance & CMathReaction::getNumberBalance | ( | ) | const |
Retrieve the set of modified species
References mNumberBalance.
Referenced by CLNAMethod::calculateCovarianceMatrixReduced(), CHybridMethod::calculateDerivative(), CTauLeapMethod::doSingleStep(), CTrajAdaptiveSA::doSingleTauLeapStep(), CTrajectoryMethodDsaLsodar::CPartition::intialize(), CSteadyStateMethod::isEquilibrium(), and CTrajectoryMethodDsaLsodar::start().
const CMathReaction::ObjectBalance & CMathReaction::getObjectBalance | ( | ) | const |
Retrieve the set of modified species objects
References mObjectBalance.
Referenced by CMathContainer::getLargestReactionCompartment(), and CHybridMethod::setupDependencyGraph().
const CMathObject * CMathReaction::getParticleFluxObject | ( | ) | const |
Retrieve a pointer to the mathematical object for the particle flux.
References mpParticleFlux.
Referenced by CHybridMethod::calculateDerivative(), and CSteadyStateMethod::isEquilibrium().
const CMathObject * CMathReaction::getPropensityObject | ( | ) | const |
Retrieve a pointer to the mathematical object for the propensity.
References mpPropensity.
Referenced by CHybridMethodODE45::partitionSystem(), and CHybridMethod::updatePriorityQueue().
void CMathReaction::initialize | ( | const CReaction * | pReaction, |
CMathContainer & | container | ||
) |
Initialize the reaction from the model reaction in the given container context
const | CReaction * pReaction |
CMathContainer | & container |
References CVectorCore< CType >::array(), CDataVector< CType >::begin(), C_FLOAT64, CMath::Dependent, CDataVector< CType >::end(), CChemEq::getBalances(), CReaction::getChemEq(), CReaction::getFluxReference(), CMathContainer::getMathObject(), CReaction::getParticleFluxReference(), CReaction::getPropensityReference(), CMathObject::getSimulationType(), CMathObject::getValuePointer(), CModelEntity::getValueReference(), CMath::Independent, mChangedSpecies, mNumberBalance, mObjectBalance, mpFlux, mpParticleFlux, mpPropensity, mpReaction, CVector< CType >::resize(), and CDataVector< CType >::size().
Referenced by CMathContainer::compile().
bool CMathReaction::isFast | ( | ) | const |
Check whether the reaction is fast
References CReaction::isFast(), and mpReaction.
void CMathReaction::relocate | ( | const CMathContainer * | pContainer, |
const std::vector< CMath::sRelocate > & | relocations | ||
) |
The objects and values are relocated
const | CMathContainer * pContainer |
const | std::vector< CMath::sRelocate > & relocations |
References CVectorCore< CType >::array(), mChangedSpecies, mNumberBalance, mObjectBalance, mpFlux, mpParticleFlux, mpPropensity, CMathContainer::relocateObject(), CMathContainer::relocateObjectSet(), CMathContainer::relocateValue(), and CVectorCore< CType >::size().
|
private |
The set of changed species
Referenced by getChangedObjects(), initialize(), and relocate().
|
private |
Information for updating the species particle numbers when the reaction fires.
Referenced by fire(), fireMultiple(), getNumberBalance(), initialize(), and relocate().
|
private |
The set of modified species and their change per reaction event
Referenced by getObjectBalance(), initialize(), and relocate().
|
private |
A pointer to the mathematical flux.
Referenced by getFluxObject(), initialize(), and relocate().
|
private |
A pointer to the mathematical particle flux.
Referenced by getParticleFluxObject(), initialize(), and relocate().
|
private |
A pointer to the mathematical propensity.
Referenced by getPropensityObject(), initialize(), and relocate().
|
private |
A pointer to model reaction.
Referenced by getModelReaction(), initialize(), and isFast().