MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <CompartmentBase.h>
Public Member Functions | |
void | cable () |
CompartmentBase () | |
void | displace (double dx, double dy, double dz) |
Displaces compartment by specified distance vector. More... | |
double | getCm (const Eref &e) const |
double | getDiameter () const |
double | getEm (const Eref &e) const |
double | getIm (const Eref &e) const |
double | getInitVm (const Eref &e) const |
double | getInject (const Eref &e) const |
double | getLength () const |
double | getRa (const Eref &e) const |
double | getRm (const Eref &e) const |
double | getVm (const Eref &e) const |
double | getX () const |
double | getX0 () const |
double | getY () const |
double | getY0 () const |
double | getZ () const |
double | getZ0 () const |
void | handleAxial (double Vm) |
void | handleChannel (const Eref &e, double Gk, double Ek) |
void | handleRaxial (double Ra, double Vm) |
void | initProc (const Eref &e, ProcPtr p) |
void | initReinit (const Eref &e, ProcPtr p) |
void | injectMsg (const Eref &e, double current) |
void | process (const Eref &e, ProcPtr p) |
void | randInject (const Eref &e, double prob, double current) |
bool | rangeWarning (const string &field, double value) |
void | reinit (const Eref &e, ProcPtr p) |
void | setCm (const Eref &e, double Cm) |
void | setDiameter (double diameter) |
void | setEm (const Eref &e, double Em) |
void | setGeomAndElec (const Eref &e, double length, double dia) |
Scales electrical values along with setting length, dia. More... | |
void | setInitVm (const Eref &e, double initVm) |
void | setInject (const Eref &e, double Inject) |
void | setLength (double length) |
void | setRa (const Eref &e, double Ra) |
void | setRm (const Eref &e, double Rm) |
void | setVm (const Eref &e, double Vm) |
void | setX (double value) |
void | setX0 (double value) |
void | setY (double value) |
void | setY0 (double value) |
void | setZ (double value) |
void | setZ0 (double value) |
void | updateLength () |
virtual double | vGetCm (const Eref &e) const =0 |
virtual double | vGetEm (const Eref &e) const =0 |
virtual double | vGetIm (const Eref &e) const =0 |
virtual double | vGetInitVm (const Eref &e) const =0 |
virtual double | vGetInject (const Eref &e) const =0 |
virtual double | vGetRa (const Eref &e) const =0 |
virtual double | vGetRm (const Eref &e) const =0 |
virtual double | vGetVm (const Eref &e) const =0 |
virtual void | vHandleAxial (double Vm)=0 |
virtual void | vHandleChannel (const Eref &e, double Gk, double Ek)=0 |
virtual void | vHandleRaxial (double Ra, double Vm)=0 |
virtual void | vInitProc (const Eref &e, ProcPtr p)=0 |
virtual void | vInitReinit (const Eref &e, ProcPtr p)=0 |
virtual void | vInjectMsg (const Eref &e, double current)=0 |
virtual void | vProcess (const Eref &e, ProcPtr p)=0 |
virtual void | vRandInject (const Eref &e, double prob, double current)=0 |
virtual void | vReinit (const Eref &e, ProcPtr p)=0 |
virtual void | vSetCm (const Eref &e, double Cm)=0 |
virtual void | vSetEm (const Eref &e, double Em)=0 |
virtual void | vSetInitVm (const Eref &e, double initVm)=0 |
virtual void | vSetInject (const Eref &e, double Inject)=0 |
virtual void | vSetRa (const Eref &e, double Ra)=0 |
virtual void | vSetRm (const Eref &e, double Rm)=0 |
virtual void | vSetSolver (const Eref &e, Id hsolve) |
virtual void | vSetVm (const Eref &e, double Vm)=0 |
virtual | ~CompartmentBase () |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
static SrcFinfo1< double > * | VmOut () |
static void | zombify (Element *orig, const Cinfo *zClass, Id hsolve) |
Private Attributes | |
double | diameter_ |
double | length_ |
double | x0_ |
double | x_ |
double | y0_ |
double | y_ |
double | z0_ |
double | z_ |
Definition at line 30 of file CompartmentBase.h.
CompartmentBase::CompartmentBase | ( | ) |
|
virtual |
Definition at line 376 of file CompartmentBase.cpp.
void CompartmentBase::cable | ( | ) |
Dummy function to act as recipient of 'cable' message, which is just for grouping compartments.
Definition at line 623 of file CompartmentBase.cpp.
Referenced by initCinfo().
void CompartmentBase::displace | ( | double | dx, |
double | dy, | ||
double | dz | ||
) |
Displaces compartment by specified distance vector.
Definition at line 628 of file CompartmentBase.cpp.
References x0_, x_, y0_, y_, z0_, and z_.
Referenced by initCinfo().
double CompartmentBase::getCm | ( | const Eref & | e | ) | const |
Definition at line 420 of file CompartmentBase.cpp.
References vGetCm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getDiameter | ( | ) | const |
Definition at line 477 of file CompartmentBase.cpp.
References diameter_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getEm | ( | const Eref & | e | ) | const |
Definition at line 409 of file CompartmentBase.cpp.
References vGetEm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getIm | ( | const Eref & | e | ) | const |
Definition at line 447 of file CompartmentBase.cpp.
References vGetIm().
Referenced by initCinfo().
double CompartmentBase::getInitVm | ( | const Eref & | e | ) | const |
Definition at line 467 of file CompartmentBase.cpp.
References vGetInitVm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getInject | ( | const Eref & | e | ) | const |
Definition at line 457 of file CompartmentBase.cpp.
References vGetInject().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getLength | ( | ) | const |
Definition at line 497 of file CompartmentBase.cpp.
References length_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getRa | ( | const Eref & | e | ) | const |
Definition at line 442 of file CompartmentBase.cpp.
References vGetRa().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getRm | ( | const Eref & | e | ) | const |
Definition at line 431 of file CompartmentBase.cpp.
References vGetRm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getVm | ( | const Eref & | e | ) | const |
Definition at line 399 of file CompartmentBase.cpp.
References vGetVm().
Referenced by initCinfo().
double CompartmentBase::getX | ( | ) | const |
Definition at line 547 of file CompartmentBase.cpp.
References x_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getX0 | ( | ) | const |
Definition at line 514 of file CompartmentBase.cpp.
References x0_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getY | ( | ) | const |
Definition at line 558 of file CompartmentBase.cpp.
References y_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getY0 | ( | ) | const |
Definition at line 525 of file CompartmentBase.cpp.
References y0_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getZ | ( | ) | const |
Definition at line 569 of file CompartmentBase.cpp.
References z_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
double CompartmentBase::getZ0 | ( | ) | const |
Definition at line 536 of file CompartmentBase.cpp.
References z0_.
Referenced by initCinfo(), and moose::CompartmentDataHolder::readData().
void CompartmentBase::handleAxial | ( | double | Vm | ) |
handleAxial handles incoming axial message data.
Definition at line 608 of file CompartmentBase.cpp.
References vHandleAxial().
Referenced by initCinfo().
void CompartmentBase::handleChannel | ( | const Eref & | e, |
double | Gk, | ||
double | Ek | ||
) |
handleChannel handles information coming from the channel to the compartment
Definition at line 598 of file CompartmentBase.cpp.
References vHandleChannel().
Referenced by initCinfo().
void CompartmentBase::handleRaxial | ( | double | Ra, |
double | Vm | ||
) |
handleRaxial handles incoming raxial message data.
Definition at line 603 of file CompartmentBase.cpp.
References vHandleRaxial().
Referenced by initCinfo().
|
static |
Initializes the class info.
The initCinfo() function sets up the CompartmentBase class. This function uses the common trick of having an internal static value which is created the first time the function is called. There are several static arrays set up here. The ones which use SharedFinfos are for shared messages where multiple kinds of information go along the same connection.
Definition at line 59 of file CompartmentBase.cpp.
References axialOut(), cable(), compartmentCinfo, displace(), getCm(), getDiameter(), getEm(), getIm(), getInitVm(), getInject(), getLength(), getRa(), getRm(), getVm(), getX(), getX0(), getY(), getY0(), getZ(), getZ0(), handleAxial(), handleChannel(), handleRaxial(), init(), Neutral::initCinfo(), initProc(), initReinit(), injectMsg(), process(), randInject(), raxialOut(), reinit(), setCm(), setDiameter(), setEm(), setGeomAndElec(), setInitVm(), setInject(), setLength(), setRa(), setRm(), setVm(), setX(), setX0(), setY(), setY0(), setZ(), setZ0(), and VmOut().
Referenced by moose::Compartment::initCinfo(), and ZombieCompartment::initCinfo().
The initProc function is for a second phase of 'process' operations. It sends the axial and raxial messages to other compartments. It has to be executed out of phase with the main process so that all compartments are equivalent and there is no calling order dependence in the results.
Definition at line 588 of file CompartmentBase.cpp.
References vInitProc().
Referenced by initCinfo().
Empty function to do another reinit step out of phase with the main one. Nothing needs doing there.
Definition at line 593 of file CompartmentBase.cpp.
References vInitReinit().
Referenced by initCinfo().
void CompartmentBase::injectMsg | ( | const Eref & | e, |
double | current | ||
) |
Injects a constantly updated current into the compartment. Unlike the 'inject' field, this injected current is applicable only for a single timestep. So this is meant to be used as the destination of a message rather than as a one-time assignment.
Definition at line 613 of file CompartmentBase.cpp.
References vInjectMsg().
Referenced by initCinfo().
The process function does the object updating and sends out messages to channels, nernsts, and so on.
Definition at line 578 of file CompartmentBase.cpp.
References vProcess().
Referenced by initCinfo().
void CompartmentBase::randInject | ( | const Eref & | e, |
double | prob, | ||
double | current | ||
) |
Injects a constantly updated current into the compartment, with a probability prob. Note that it isn't the current amplitude that is random, it is the presence or absence of the current that is probabilistic.
Definition at line 618 of file CompartmentBase.cpp.
References vRandInject().
Referenced by initCinfo().
bool CompartmentBase::rangeWarning | ( | const string & | field, |
double | value | ||
) |
A utility function to check for assignment to fields that must be > 0
Definition at line 381 of file CompartmentBase.cpp.
References RANGE.
Referenced by setCm(), setRa(), setRm(), moose::Compartment::vSetCm(), moose::Compartment::vSetRa(), and moose::Compartment::vSetRm().
The reinit function reinitializes all fields.
Definition at line 583 of file CompartmentBase.cpp.
References vReinit().
Referenced by initCinfo().
void CompartmentBase::setCm | ( | const Eref & | e, |
double | Cm | ||
) |
Definition at line 414 of file CompartmentBase.cpp.
References rangeWarning(), and vSetCm().
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setDiameter | ( | double | diameter | ) |
Definition at line 472 of file CompartmentBase.cpp.
References diameter_, and value.
Referenced by initCinfo(), makeCompt(), setGeomAndElec(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setEm | ( | const Eref & | e, |
double | Em | ||
) |
Definition at line 404 of file CompartmentBase.cpp.
References vSetEm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setGeomAndElec | ( | const Eref & | e, |
double | length, | ||
double | dia | ||
) |
Scales electrical values along with setting length, dia.
Definition at line 647 of file CompartmentBase.cpp.
References allChildren(), ALLDATA, diameter_, doubleEq(), Field< A >::get(), hasScaleFormula(), length_, Eref::objId(), Field< A >::set(), setDiameter(), setLength(), vGetCm(), vGetRa(), vGetRm(), vSetCm(), vSetRa(), vSetRm(), x0_, x_, y0_, y_, z0_, and z_.
Referenced by initCinfo().
void CompartmentBase::setInitVm | ( | const Eref & | e, |
double | initVm | ||
) |
Definition at line 462 of file CompartmentBase.cpp.
References vSetInitVm().
Referenced by initCinfo(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setInject | ( | const Eref & | e, |
double | Inject | ||
) |
Definition at line 452 of file CompartmentBase.cpp.
References vSetInject().
Referenced by initCinfo(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setLength | ( | double | length | ) |
Definition at line 482 of file CompartmentBase.cpp.
References doubleEq(), length_, value, x0_, x_, y0_, y_, z0_, and z_.
Referenced by initCinfo(), makeCompt(), setGeomAndElec(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setRa | ( | const Eref & | e, |
double | Ra | ||
) |
Definition at line 436 of file CompartmentBase.cpp.
References rangeWarning(), and vSetRa().
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setRm | ( | const Eref & | e, |
double | Rm | ||
) |
Definition at line 425 of file CompartmentBase.cpp.
References rangeWarning(), and vSetRm().
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setVm | ( | const Eref & | e, |
double | Vm | ||
) |
Definition at line 394 of file CompartmentBase.cpp.
References vSetVm().
Referenced by initCinfo().
void CompartmentBase::setX | ( | double | value | ) |
Definition at line 541 of file CompartmentBase.cpp.
References updateLength(), value, and x_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setX0 | ( | double | value | ) |
Definition at line 508 of file CompartmentBase.cpp.
References updateLength(), value, and x0_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setY | ( | double | value | ) |
Definition at line 552 of file CompartmentBase.cpp.
References updateLength(), value, and y_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setY0 | ( | double | value | ) |
Definition at line 519 of file CompartmentBase.cpp.
References updateLength(), value, and y0_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setZ | ( | double | value | ) |
Definition at line 563 of file CompartmentBase.cpp.
References updateLength(), value, and z_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::setZ0 | ( | double | value | ) |
Definition at line 530 of file CompartmentBase.cpp.
References updateLength(), value, and z0_.
Referenced by initCinfo(), makeCompt(), and moose::CompartmentDataHolder::writeData().
void CompartmentBase::updateLength | ( | ) |
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getCm(), and setGeomAndElec().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getEm().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getIm().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getInitVm().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getInject().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getRa(), and setGeomAndElec().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getRm(), and setGeomAndElec().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by getVm().
|
pure virtual |
handleAxial handles incoming axial message data.
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by handleAxial().
|
pure virtual |
handleChannel handles information coming from the channel to the compartment
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by handleChannel().
|
pure virtual |
handleRaxial handles incoming raxial message data.
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by handleRaxial().
The initProc function is for a second phase of 'process' operations. It sends the axial and raxial messages to other compartments. It has to be executed out of phase with the main process so that all compartments are equivalent and there is no calling order dependence in the results.
Implemented in ZombieCompartment, moose::Compartment, and SymCompartment.
Referenced by initProc().
Empty function to do another reinit step out of phase with the main one. Nothing needs doing there.
Implemented in ZombieCompartment, moose::Compartment, and SymCompartment.
Referenced by initReinit().
|
pure virtual |
Injects a constantly updated current into the compartment. Unlike the 'inject' field, this injected current is applicable only for a single timestep. So this is meant to be used as the destination of a message rather than as a one-time assignment.
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by injectMsg().
|
static |
This Finfo is used to send out Vm to channels, spikegens, etc
It is exposed here so that HSolve can also use it to send out the Vm to the recipients.
Definition at line 26 of file CompartmentBase.cpp.
Referenced by initCinfo(), HSolveActive::sendValues(), moose::LIF::vProcess(), moose::ExIF::vProcess(), moose::QIF::vProcess(), moose::AdExIF::vProcess(), moose::AdThreshIF::vProcess(), moose::IzhIF::vProcess(), moose::Compartment::vProcess(), and moose::Compartment::vReinit().
The process function does the object updating and sends out messages to channels, nernsts, and so on.
Implemented in ZombieCompartment, moose::Compartment, moose::IzhIF, moose::IntFireBase, moose::AdExIF, moose::AdThreshIF, moose::QIF, moose::ExIF, and moose::LIF.
Referenced by process().
|
pure virtual |
Injects a constantly updated current into the compartment, with a probability prob. Note that it isn't the current amplitude that is random, it is the presence or absence of the current that is probabilistic.
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by randInject().
The reinit function reinitializes all fields.
Implemented in ZombieCompartment, moose::Compartment, moose::IzhIF, moose::IntFireBase, moose::AdExIF, moose::AdThreshIF, moose::QIF, SymCompartment, moose::ExIF, and moose::LIF.
Referenced by reinit().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setCm(), and setGeomAndElec().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setEm().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setInitVm().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setInject().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setGeomAndElec(), and setRa().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setGeomAndElec(), and setRm().
Reimplemented in ZombieCompartment.
Definition at line 685 of file CompartmentBase.cpp.
Referenced by zombify().
|
pure virtual |
Implemented in ZombieCompartment, and moose::Compartment.
Referenced by setVm().
This function is used to swap Cinfos of any CompartmentBase derived class. Used for making ZombieCompartments.
Definition at line 689 of file CompartmentBase.cpp.
References Element::cinfo(), Eref::data(), Element::localDataStart(), Element::numLocalData(), vSetSolver(), and Element::zombieSwap().
|
private |
Definition at line 262 of file CompartmentBase.h.
Referenced by CompartmentBase(), getDiameter(), setDiameter(), and setGeomAndElec().
|
private |
Definition at line 263 of file CompartmentBase.h.
Referenced by CompartmentBase(), getLength(), setGeomAndElec(), setLength(), and updateLength().
|
private |
Definition at line 264 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getX0(), setGeomAndElec(), setLength(), setX0(), and updateLength().
|
private |
Definition at line 267 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getX(), setGeomAndElec(), setLength(), setX(), and updateLength().
|
private |
Definition at line 265 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getY0(), setGeomAndElec(), setLength(), setY0(), and updateLength().
|
private |
Definition at line 268 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getY(), setGeomAndElec(), setLength(), setY(), and updateLength().
|
private |
Definition at line 266 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getZ0(), setGeomAndElec(), setLength(), setZ0(), and updateLength().
|
private |
Definition at line 269 of file CompartmentBase.h.
Referenced by CompartmentBase(), displace(), getZ(), setGeomAndElec(), setLength(), setZ(), and updateLength().