COPASI API  4.40.278
CMathReaction Class Reference

#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_FLOAT64SpeciesBalance
 

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::ObjectSetgetChangedObjects () const
 
const CMathObjectgetFluxObject () const
 
const CReactiongetModelReaction () const
 
const BalancegetNumberBalance () const
 
const ObjectBalancegetObjectBalance () const
 
const CMathObjectgetParticleFluxObject () const
 
const CMathObjectgetPropensityObject () 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
 
CMathObjectmpFlux
 
CMathObjectmpParticleFlux
 
CMathObjectmpPropensity
 
const CReactionmpReaction
 

Member Typedef Documentation

◆ Balance

typedef CVector< std::pair< C_FLOAT64 *, C_FLOAT64 > > CMathReaction::Balance

◆ ObjectBalance

typedef std::set< std::pair < const CMathObject *, C_FLOAT64 > > CMathReaction::ObjectBalance

◆ SpeciesBalance

Constructor & Destructor Documentation

◆ CMathReaction() [1/2]

CMathReaction::CMathReaction ( )

Constructor

◆ CMathReaction() [2/2]

CMathReaction::CMathReaction ( const CMathReaction src)

Copy constructor

◆ ~CMathReaction()

CMathReaction::~CMathReaction ( )

Destructor

Member Function Documentation

◆ copy()

void CMathReaction::copy ( const CMathReaction src,
CMathContainer container 
)

Copy an existing object

Parameters
constCMathReaction & src
CMathContainer& container

◆ fire()

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().

◆ fireMultiple()

void CMathReaction::fireMultiple ( const C_FLOAT64 count)

Fire the reaction count times. Note count must not necessarily be an integer

Parameters
constC_FLOAT64 & count

References CVectorCore< CType >::array(), mNumberBalance, and CVectorCore< CType >::size().

Referenced by CTauLeapMethod::updateSystem().

◆ getChangedObjects()

const CObjectInterface::ObjectSet & CMathReaction::getChangedObjects ( ) const

Retrieve the set of particle number objects changed when the reaction fires.

Returns
const CObjectInterface::ObjectSet & changedObjects

References mChangedSpecies.

Referenced by CStochDirectMethod::start(), CStochMethod::start(), and CTrajAdaptiveSA::start().

◆ getFluxObject()

const CMathObject * CMathReaction::getFluxObject ( ) const

Retrieve a pointer to the mathematical object for the flux.

Returns
const CMathObject * pFluxObject

References mpFlux.

◆ getModelReaction()

const CReaction * CMathReaction::getModelReaction ( ) const

Retrieve a pointer to the model reaction

Returns
const CReaction * pModelReaction

References mpReaction.

◆ getNumberBalance()

◆ getObjectBalance()

const CMathReaction::ObjectBalance & CMathReaction::getObjectBalance ( ) const

Retrieve the set of modified species objects

Returns
CMathReaction::ObjectBalance & objectBalance

References mObjectBalance.

Referenced by CMathContainer::getLargestReactionCompartment(), and CHybridMethod::setupDependencyGraph().

◆ getParticleFluxObject()

const CMathObject * CMathReaction::getParticleFluxObject ( ) const

Retrieve a pointer to the mathematical object for the particle flux.

Returns
const CMathObject * pParticleFluxObject

References mpParticleFlux.

Referenced by CHybridMethod::calculateDerivative(), and CSteadyStateMethod::isEquilibrium().

◆ getPropensityObject()

const CMathObject * CMathReaction::getPropensityObject ( ) const

Retrieve a pointer to the mathematical object for the propensity.

Returns
const CMathObject * pPropensityObject

References mpPropensity.

Referenced by CHybridMethodODE45::partitionSystem(), and CHybridMethod::updatePriorityQueue().

◆ initialize()

◆ isFast()

bool CMathReaction::isFast ( ) const

Check whether the reaction is fast

Returns
bool isFast

References CReaction::isFast(), and mpReaction.

◆ relocate()

void CMathReaction::relocate ( const CMathContainer pContainer,
const std::vector< CMath::sRelocate > &  relocations 
)

Member Data Documentation

◆ mChangedSpecies

CObjectInterface::ObjectSet CMathReaction::mChangedSpecies
private

The set of changed species

Referenced by getChangedObjects(), initialize(), and relocate().

◆ mNumberBalance

Balance CMathReaction::mNumberBalance
private

Information for updating the species particle numbers when the reaction fires.

Referenced by fire(), fireMultiple(), getNumberBalance(), initialize(), and relocate().

◆ mObjectBalance

ObjectBalance CMathReaction::mObjectBalance
private

The set of modified species and their change per reaction event

Referenced by getObjectBalance(), initialize(), and relocate().

◆ mpFlux

CMathObject* CMathReaction::mpFlux
private

A pointer to the mathematical flux.

Referenced by getFluxObject(), initialize(), and relocate().

◆ mpParticleFlux

CMathObject* CMathReaction::mpParticleFlux
private

A pointer to the mathematical particle flux.

Referenced by getParticleFluxObject(), initialize(), and relocate().

◆ mpPropensity

CMathObject* CMathReaction::mpPropensity
private

A pointer to the mathematical propensity.

Referenced by getPropensityObject(), initialize(), and relocate().

◆ mpReaction

const CReaction* CMathReaction::mpReaction
private

A pointer to model reaction.

Referenced by getModelReaction(), initialize(), and isFast().


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