#include <GssaVoxelPools.h>
Public Member Functions | |
GssaVoxelPools () | |
virtual | ~GssaVoxelPools () |
void | advance (const ProcInfo *p) |
void | updateDependentMathExpn (const GssaSystem *g, unsigned int rindex) |
void | updateDependentRates (const vector< unsigned int > &deps, const Stoich *stoich) |
unsigned int | pickReac () const |
void | setNumReac (unsigned int n) |
void | advance (const ProcInfo *p, const GssaSystem *g) |
bool | refreshAtot (const GssaSystem *g) |
void | reinit (const GssaSystem *g) |
void | updateAllRateTerms (const vector< RateTerm * > &rates, unsigned int numCoreRates) |
void | updateRateTerms (const vector< RateTerm * > &rates, unsigned int numCoreRates, unsigned int index) |
double | getReacVelocity (unsigned int r, const double *s) const |
void | updateReacVelocities (const GssaSystem *g, const double *s, vector< double > &v) const |
void | setVolumeAndDependencies (double vol) |
void | xferIn (XferInfo &xf, unsigned int voxelIndex, const GssaSystem *g) |
void | xferInOnlyProxies (const vector< unsigned int > &poolIndex, const vector< double > &values, unsigned int numProxyPools, unsigned int voxelIndex) |
void | setStoich (const Stoich *stoichPtr) |
GssaVoxelPools::GssaVoxelPools | ( | ) |
GssaVoxelPools::~GssaVoxelPools | ( | ) | [virtual] |
References VoxelPoolsBase::rates_.
void GssaVoxelPools::advance | ( | const ProcInfo * | p, | |
const GssaSystem * | g | |||
) |
References ProcInfo::currTime, GssaSystem::dependency, KinSparseMatrix::fireReac(), Stoich::getNumRates(), mtrand(), pickReac(), refreshAtot(), GssaSystem::stoich, VoxelPoolsBase::Svec(), GssaSystem::transposeN, updateDependentMathExpn(), updateDependentRates(), Stoich::updateFuncs(), and VoxelPoolsBase::varS().
void GssaVoxelPools::advance | ( | const ProcInfo * | p | ) |
double GssaVoxelPools::getReacVelocity | ( | unsigned int | r, | |
const double * | s | |||
) | const |
References VoxelPoolsBase::rates_.
unsigned int GssaVoxelPools::pickReac | ( | ) | const |
bool GssaVoxelPools::refreshAtot | ( | const GssaSystem * | g | ) |
Cleans out all reac rates and recalculates atot. Needed whenever a mol conc changes, or if there is a roundoff error. Returns true if OK, returns false if it is in a stuck state and atot<=0
References VoxelPoolsBase::S(), SAFETY_FACTOR, and updateReacVelocities().
Referenced by advance(), reinit(), and xferIn().
void GssaVoxelPools::reinit | ( | const GssaSystem * | g | ) |
Builds the gssa system as needed.
References Stoich::getNumVarPools(), mtrand(), refreshAtot(), VoxelPoolsBase::reinit(), GssaSystem::stoich, Stoich::updateFuncs(), GssaSystem::useRandInit, and VoxelPoolsBase::varS().
void GssaVoxelPools::setNumReac | ( | unsigned int | n | ) |
void GssaVoxelPools::setStoich | ( | const Stoich * | stoichPtr | ) |
References VoxelPoolsBase::stoichPtr_.
void GssaVoxelPools::setVolumeAndDependencies | ( | double | vol | ) | [virtual] |
Assign the volume, and handle the cascading effects by scaling all the dependent values of nInit and rates if applicable.
Reimplemented from VoxelPoolsBase.
References Stoich::getNumCoreRates(), Stoich::getRateTerms(), Stoich::setupCrossSolverReacVols(), VoxelPoolsBase::stoichPtr_, and updateAllRateTerms().
void GssaVoxelPools::updateAllRateTerms | ( | const vector< RateTerm * > & | rates, | |
unsigned int | numCoreRates | |||
) | [virtual] |
void GssaVoxelPools::updateDependentMathExpn | ( | const GssaSystem * | g, | |
unsigned int | rindex | |||
) |
References GssaSystem::dependentMathExpn, FuncTerm::evalPool(), Stoich::funcs(), GssaSystem::stoich, and VoxelPoolsBase::varS().
Referenced by advance().
void GssaVoxelPools::updateDependentRates | ( | const vector< unsigned int > & | deps, | |
const Stoich * | stoich | |||
) |
Referenced by advance().
void GssaVoxelPools::updateRateTerms | ( | const vector< RateTerm * > & | rates, | |
unsigned int | numCoreRates, | |||
unsigned int | index | |||
) | [virtual] |
Update specified index on rate terms. The entire rates vector is passed in for the source values, the index specifies which entry on the local rate vector is to be updated.
Implements VoxelPoolsBase.
void GssaVoxelPools::updateReacVelocities | ( | const GssaSystem * | g, | |
const double * | s, | |||
vector< double > & | v | |||
) | const |
Referenced by refreshAtot().
void GssaVoxelPools::xferIn | ( | XferInfo & | xf, | |
unsigned int | voxelIndex, | |||
const GssaSystem * | g | |||
) |
Digests incoming data values for cross-compt reactions. Sums the changes in the values onto the specified pools.
References XferInfo::lastValues, refreshAtot(), XferInfo::subzero, XferInfo::values, VoxelPoolsBase::varS(), and XferInfo::xferPoolIdx.
void GssaVoxelPools::xferInOnlyProxies | ( | const vector< unsigned int > & | poolIndex, | |
const vector< double > & | values, | |||
unsigned int | numProxyPools, | |||
unsigned int | voxelIndex | |||
) |
Used during initialization: Takes only the proxy pool values from the incoming transfer data, and assigns it to the proxy pools on current solver
Reimplemented from VoxelPoolsBase.