#include <PoolBase.h>
Public Member Functions | |
PoolBase () | |
virtual | ~PoolBase () |
void | setN (const Eref &e, double v) |
double | getN (const Eref &e) const |
void | setNinit (const Eref &e, double v) |
double | getNinit (const Eref &e) const |
void | setDiffConst (const Eref &e, double v) |
double | getDiffConst (const Eref &e) const |
void | setMotorConst (const Eref &e, double v) |
double | getMotorConst (const Eref &e) const |
void | setConc (const Eref &e, double v) |
double | getConc (const Eref &e) const |
void | setConcInit (const Eref &e, double v) |
double | getConcInit (const Eref &e) const |
void | setVolume (const Eref &e, double v) |
double | getVolume (const Eref &e) const |
void | setSpecies (const Eref &e, SpeciesId v) |
SpeciesId | getSpecies (const Eref &e) const |
virtual void | vSetN (const Eref &e, double v)=0 |
virtual double | vGetN (const Eref &e) const =0 |
virtual void | vSetNinit (const Eref &e, double v)=0 |
virtual double | vGetNinit (const Eref &e) const =0 |
virtual void | vSetDiffConst (const Eref &e, double v)=0 |
virtual double | vGetDiffConst (const Eref &e) const =0 |
virtual void | vSetMotorConst (const Eref &e, double v) |
Dummy MotorConst field for most Pool subclasses. | |
virtual double | vGetMotorConst (const Eref &e) const |
virtual void | vSetConc (const Eref &e, double v)=0 |
virtual double | vGetConc (const Eref &e) const =0 |
virtual void | vSetConcInit (const Eref &e, double v)=0 |
virtual double | vGetVolume (const Eref &e) const =0 |
virtual void | vSetVolume (const Eref &e, double v)=0 |
virtual void | vSetSpecies (const Eref &e, SpeciesId v)=0 |
virtual SpeciesId | vGetSpecies (const Eref &e) const =0 |
virtual void | vSetSolver (Id ksolve, Id dsolve) |
void | process (const Eref &e, ProcPtr p) |
void | reinit (const Eref &e, ProcPtr p) |
void | reac (double A, double B) |
void | handleMolWt (const Eref &e, double v) |
virtual void | vProcess (const Eref &e, ProcPtr p) |
virtual void | vReinit (const Eref &e, ProcPtr p) |
virtual void | vReac (double A, double B) |
virtual void | vHandleMolWt (const Eref &e, double v) |
Static Public Member Functions | |
static void | zombify (Element *original, const Cinfo *zClass, Id ksolve, Id dsolve) |
static const Cinfo * | initCinfo () |
Friends | |
void | testSyncArray (unsigned int size, unsigned int numThreads, unsigned int method) |
void | checkVal (double time, const PoolBase *m, unsigned int size) |
void | forceCheckVal (double time, Element *e, unsigned int size) |
The PoolBase class is the base class for molecular pools. A pool is a set of molecules of a given species, in a uniform chemical context. Note that the same species might be present in other compartments, or be handled by other solvers. PoolBase is the base class for mass-action, single particle and other numerical variants of pools.
PoolBase::PoolBase | ( | ) |
PoolBase::~PoolBase | ( | ) | [virtual] |
double PoolBase::getConc | ( | const Eref & | e | ) | const |
double PoolBase::getConcInit | ( | const Eref & | e | ) | const |
Referenced by initCinfo(), and zombify().
double PoolBase::getDiffConst | ( | const Eref & | e | ) | const |
References vGetDiffConst().
Referenced by initCinfo(), and zombify().
double PoolBase::getMotorConst | ( | const Eref & | e | ) | const |
References vGetMotorConst().
Referenced by initCinfo(), and zombify().
double PoolBase::getN | ( | const Eref & | e | ) | const |
double PoolBase::getNinit | ( | const Eref & | e | ) | const |
References vGetNinit().
Referenced by initCinfo(), and Pool::vReinit().
unsigned int PoolBase::getSpecies | ( | const Eref & | e | ) | const |
References vGetSpecies().
Referenced by initCinfo(), and zombify().
double PoolBase::getVolume | ( | const Eref & | e | ) | const |
void PoolBase::handleMolWt | ( | const Eref & | e, | |
double | v | |||
) |
const Cinfo * PoolBase::initCinfo | ( | ) | [static] |
Reimplemented in BufPool, Pool, ZombieBufPool, and ZombiePool.
References getConc(), getConcInit(), getDiffConst(), getMotorConst(), getN(), getNinit(), getSpecies(), getVolume(), handleMolWt(), Neutral::initCinfo(), nOut, process(), reac(), reinit(), setConc(), setConcInit(), setDiffConst(), setMotorConst(), setN(), setNinit(), setSpecies(), and setVolume().
Referenced by getSlaveEnable(), ZombiePool::initCinfo(), and Pool::initCinfo().
void PoolBase::reac | ( | double | A, | |
double | B | |||
) |
void PoolBase::setConc | ( | const Eref & | e, | |
double | v | |||
) |
void PoolBase::setConcInit | ( | const Eref & | e, | |
double | v | |||
) |
References vSetConcInit().
Referenced by initCinfo(), and zombify().
void PoolBase::setDiffConst | ( | const Eref & | e, | |
double | v | |||
) |
References vSetDiffConst().
Referenced by initCinfo(), and zombify().
void PoolBase::setMotorConst | ( | const Eref & | e, | |
double | v | |||
) |
References vSetMotorConst().
Referenced by initCinfo(), and zombify().
void PoolBase::setN | ( | const Eref & | e, | |
double | v | |||
) |
void PoolBase::setNinit | ( | const Eref & | e, | |
double | v | |||
) |
References lookupVolumeFromMesh(), NA, and vSetNinit().
Referenced by initCinfo().
References vSetSpecies().
Referenced by initCinfo(), and zombify().
void PoolBase::setVolume | ( | const Eref & | e, | |
double | v | |||
) |
Volume is usually volume, but we also permit areal density This is obtained by looking up the corresponding spatial mesh entry in the parent compartment. If the message isn't set then it defaults to 1.0.
References vSetVolume().
Referenced by initCinfo().
virtual double PoolBase::vGetConc | ( | const Eref & | e | ) | const [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by getConc().
virtual double PoolBase::vGetDiffConst | ( | const Eref & | e | ) | const [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by getDiffConst().
double PoolBase::vGetMotorConst | ( | const Eref & | e | ) | const [virtual] |
Reimplemented in Pool, and ZombiePool.
Referenced by getMotorConst().
virtual double PoolBase::vGetN | ( | const Eref & | e | ) | const [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by getN().
virtual double PoolBase::vGetNinit | ( | const Eref & | e | ) | const [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by getNinit().
Implemented in Pool, and ZombiePool.
Referenced by getSpecies().
virtual double PoolBase::vGetVolume | ( | const Eref & | e | ) | const [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by getVolume().
void PoolBase::vHandleMolWt | ( | const Eref & | e, | |
double | v | |||
) | [virtual] |
Reimplemented in Pool.
Referenced by handleMolWt().
virtual void PoolBase::vSetConc | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in BufPool, Pool, ZombieBufPool, and ZombiePool.
Referenced by setConc().
virtual void PoolBase::vSetConcInit | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in BufPool, Pool, ZombieBufPool, and ZombiePool.
Referenced by setConcInit().
virtual void PoolBase::vSetDiffConst | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by setDiffConst().
void PoolBase::vSetMotorConst | ( | const Eref & | e, | |
double | v | |||
) | [virtual] |
Dummy MotorConst field for most Pool subclasses.
Reimplemented in Pool, and ZombiePool.
Referenced by setMotorConst().
virtual void PoolBase::vSetN | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in BufPool, Pool, ZombieBufPool, and ZombiePool.
Referenced by setN().
virtual void PoolBase::vSetNinit | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in BufPool, Pool, ZombieBufPool, and ZombiePool.
Referenced by setNinit().
Assign whatever info is needed by the zombie based on the solver Element. Encapsulates some unpleasant field extraction, casting, and assignment. Default version of this function does nothing.
Reimplemented in ZombiePool.
Referenced by zombify().
Implemented in Pool, and ZombiePool.
Referenced by setSpecies().
virtual void PoolBase::vSetVolume | ( | const Eref & | e, | |
double | v | |||
) | [pure virtual] |
Implemented in Pool, and ZombiePool.
Referenced by setVolume().
zombify is the base function for conversion between pool subclasses. This can be overridden, but should work for most things. This takes the original Element, and without touching its messaging, replaces it with a new data object of the specified zClass. It does the best it can with conversion of fields. Typically needs to be followed by rescheduling and possibly a class-specific function for assigning further zombie fields outside the ken of the PoolBase. The 'solver' argument specifies which objects handle the solver for this conversion. For the Pool this is either or both of a kinetic solver /ksolve/ and a diffusion solver /dsolve/. The term zombie arises because this operation was originally carried out to strip an object of independent function, and replace it with a solver-controlled facsimile.
References Element::cinfo(), Eref::data(), getConcInit(), getDiffConst(), getMotorConst(), getSpecies(), Element::localDataStart(), Element::numLocalData(), setConcInit(), setDiffConst(), setMotorConst(), setSpecies(), vSetSolver(), and Element::zombieSwap().
Referenced by Stoich::unZombifyPools().
void checkVal | ( | double | time, | |
const PoolBase * | m, | |||
unsigned int | size | |||
) | [friend] |
void forceCheckVal | ( | double | time, | |
Element * | e, | |||
unsigned int | size | |||
) | [friend] |
void testSyncArray | ( | unsigned int | size, | |
unsigned int | numThreads, | |||
unsigned int | method | |||
) | [friend] |