#include <VoxelPoolsBase.h>
Public Member Functions | |
VoxelPoolsBase () | |
virtual | ~VoxelPoolsBase () |
void | resizeArrays (unsigned int totNumPools) |
unsigned int | size () const |
const double * | S () const |
vector< double > & | Svec () |
Returns a handle to the mol # vector. | |
double * | varS () |
const double * | Sinit () const |
double * | varSinit () |
void | reinit () |
void | setVolume (double vol) |
Just assigns the volume without any cascading to other values. | |
double | getVolume () const |
Return the volume of the voxel. | |
virtual void | setVolumeAndDependencies (double vol) |
void | setN (unsigned int i, double v) |
double | getN (unsigned int) const |
void | setNinit (unsigned int, double v) |
double | getNinit (unsigned int) const |
void | setDiffConst (unsigned int, double v) |
double | getDiffConst (unsigned int) const |
virtual void | updateAllRateTerms (const vector< RateTerm * > &rates, unsigned int numCoreRates)=0 |
virtual void | updateRateTerms (const vector< RateTerm * > &rates, unsigned int numCoreRates, unsigned int index)=0 |
void | filterCrossRateTerms (const vector< Id > &offSolverReacs, const vector< pair< Id, Id > > &offSolverReacCompts) |
void | xferIn (const vector< unsigned int > &poolIndex, const vector< double > &values, const vector< double > &lastValues, unsigned int voxelIndex) |
void | xferInOnlyProxies (const vector< unsigned int > &poolIndex, const vector< double > &values, unsigned int numProxyPools, unsigned int voxelIndex) |
void | xferOut (unsigned int voxelIndex, vector< double > &values, const vector< unsigned int > &poolIndex) |
Assembles data values for sending out for x-compt reacs. | |
void | addProxyVoxy (unsigned int comptIndex, Id comptId, unsigned int voxel) |
Adds the index of a voxel to which proxy data should go. | |
void | addProxyTransferIndex (unsigned int comptIndex, unsigned int transferIndex) |
bool | hasXfer (unsigned int comptIndex) const |
True when this voxel has data to be transferred. | |
bool | isVoxelJunctionPresent (Id i1, Id i2) const |
void | resetXreacScale (unsigned int size) |
void | forwardReacVolumeFactor (unsigned int i, double volume) |
void | backwardReacVolumeFactor (unsigned int i, double volume) |
double | getXreacScaleSubstrates (unsigned int i) const |
double | getXreacScaleProducts (unsigned int i) const |
void | scaleVolsBufsRates (double ratio, const Stoich *stoichPtr) |
void | print () const |
Debugging utility. | |
Protected Attributes | |
const Stoich * | stoichPtr_ |
vector< RateTerm * > | rates_ |
VoxelPoolsBase::VoxelPoolsBase | ( | ) |
VoxelPoolsBase::~VoxelPoolsBase | ( | ) | [virtual] |
void VoxelPoolsBase::addProxyTransferIndex | ( | unsigned int | comptIndex, | |
unsigned int | transferIndex | |||
) |
void VoxelPoolsBase::addProxyVoxy | ( | unsigned int | comptIndex, | |
Id | comptId, | |||
unsigned int | voxel | |||
) |
Adds the index of a voxel to which proxy data should go.
void VoxelPoolsBase::backwardReacVolumeFactor | ( | unsigned int | i, | |
double | volume | |||
) |
Multiply in scale factor for different cross-reac volumes, to be applied to specified RateTerm in the rates_ vector. Applies to backward reaction terms
References getVolume().
void VoxelPoolsBase::filterCrossRateTerms | ( | const vector< Id > & | offSolverReacs, | |
const vector< pair< Id, Id > > & | offSolverReacCompts | |||
) |
Changes cross rate terms to zero if there is no junction
void VoxelPoolsBase::forwardReacVolumeFactor | ( | unsigned int | i, | |
double | volume | |||
) |
Multiply in scale factor for different cross-reac volumes, to be applied to specified RateTerm in the rates_ vector. Applies to forward reaction terms
References getVolume().
double VoxelPoolsBase::getDiffConst | ( | unsigned int | i | ) | const |
double VoxelPoolsBase::getN | ( | unsigned int | i | ) | const |
double VoxelPoolsBase::getNinit | ( | unsigned int | i | ) | const |
double VoxelPoolsBase::getVolume | ( | ) | const |
Return the volume of the voxel.
Referenced by backwardReacVolumeFactor(), forwardReacVolumeFactor(), and scaleVolsBufsRates().
double VoxelPoolsBase::getXreacScaleProducts | ( | unsigned int | i | ) | const |
Return scale factor for specified entry on rate terms. Index is # of cross-compartment rate term.
Referenced by scaleVolsBufsRates().
double VoxelPoolsBase::getXreacScaleSubstrates | ( | unsigned int | i | ) | const |
Return scale factor for specified entry on rate terms. Index is # of cross-compartment rate term.
Referenced by scaleVolsBufsRates().
bool VoxelPoolsBase::hasXfer | ( | unsigned int | comptIndex | ) | const |
True when this voxel has data to be transferred.
Assigns the Id and volume of the specified x-reac coupled compartment void setComptVolume( unsigned int comptIndex, Id id, double vol );
References size().
Referenced by ZombiePoolInterface::assignXferVoxels().
True when there is a junction. i1 must match, and if i2 is non-zero then it too must match.
void VoxelPoolsBase::print | ( | ) | const |
Debugging utility.
Reimplemented in VoxelPools.
void VoxelPoolsBase::reinit | ( | ) |
Assigns S = Sinit and sets up initial dt.
Referenced by VoxelPools::reinit(), GssaVoxelPools::reinit(), and VoxelPools::setStoich().
void VoxelPoolsBase::resetXreacScale | ( | unsigned int | size | ) |
Initialize/reset the vector xReacScaling_ for scale factors for each cross reaction in this voxel.
void VoxelPoolsBase::resizeArrays | ( | unsigned int | totNumPools | ) |
Allocate # of pools
Using the computed array sizes, now allocate space for them.
const double * VoxelPoolsBase::S | ( | ) | const |
Returns the array of doubles of current mol s at the specified mesh index
Referenced by GssaVoxelPools::refreshAtot().
void VoxelPoolsBase::scaleVolsBufsRates | ( | double | ratio, | |
const Stoich * | stoichPtr | |||
) |
References Stoich::getNumCoreRates(), Stoich::getRateTerms(), getVolume(), getXreacScaleProducts(), getXreacScaleSubstrates(), and rates_.
Referenced by Stoich::scaleBufsAndRates().
void VoxelPoolsBase::setDiffConst | ( | unsigned int | i, | |
double | v | |||
) |
void VoxelPoolsBase::setN | ( | unsigned int | i, | |
double | v | |||
) |
void VoxelPoolsBase::setNinit | ( | unsigned int | i, | |
double | v | |||
) |
void VoxelPoolsBase::setVolume | ( | double | vol | ) |
Just assigns the volume without any cascading to other values.
Referenced by ZombiePoolInterface::setCompartment(), and SteadyState::setStoich().
void VoxelPoolsBase::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 in GssaVoxelPools, and VoxelPools.
const double * VoxelPoolsBase::Sinit | ( | ) | const |
Returns the array of doubles of initial mol s at the specified mesh index
unsigned int VoxelPoolsBase::size | ( | ) | const |
Returns # of pools
Referenced by hasXfer().
vector< double > & VoxelPoolsBase::Svec | ( | ) |
Returns a handle to the mol # vector.
Referenced by GssaVoxelPools::advance().
virtual void VoxelPoolsBase::updateAllRateTerms | ( | const vector< RateTerm * > & | rates, | |
unsigned int | numCoreRates | |||
) | [pure virtual] |
Reassign entire rate vector.
Implemented in GssaVoxelPools, and VoxelPools.
virtual void VoxelPoolsBase::updateRateTerms | ( | const vector< RateTerm * > & | rates, | |
unsigned int | numCoreRates, | |||
unsigned int | index | |||
) | [pure 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.
Implemented in GssaVoxelPools, and VoxelPools.
double * VoxelPoolsBase::varS | ( | ) |
Returns the array of doubles of current mol s at the specified mesh index. Dangerous, allows one to modify the values.
Referenced by VoxelPools::advance(), GssaVoxelPools::advance(), GssaVoxelPools::reinit(), GssaVoxelPools::updateDependentMathExpn(), and GssaVoxelPools::xferIn().
double * VoxelPoolsBase::varSinit | ( | ) |
Returns the array of doubles of initial mol s at the specified mesh index, as a writable array.
void VoxelPoolsBase::xferIn | ( | const vector< unsigned int > & | poolIndex, | |
const vector< double > & | values, | |||
const vector< double > & | lastValues, | |||
unsigned int | voxelIndex | |||
) |
Digests incoming data values for cross-compt reactions. Sums the changes in the values onto the specified pools.
void VoxelPoolsBase::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 in GssaVoxelPools.
void VoxelPoolsBase::xferOut | ( | unsigned int | voxelIndex, | |
vector< double > & | values, | |||
const vector< unsigned int > & | poolIndex | |||
) |
Assembles data values for sending out for x-compt reacs.
vector< RateTerm* > VoxelPoolsBase::rates_ [protected] |
const Stoich* VoxelPoolsBase::stoichPtr_ [protected] |