MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <HHChannel2D.h>
Public Member Functions | |
bool | checkOriginal (Id chanId) const |
Returns true if channel is original, false if copy. More... | |
void | conc1 (double conc) |
void | conc2 (double conc) |
void | createGate (const Eref &e, string gateType) |
void | destroyGate (const Eref &e, string gateType) |
int | getInstant () const |
unsigned int | getNumXgates () const |
unsigned int | getNumYgates () const |
Returns 1 if Y gate present, otherwise 0. More... | |
unsigned int | getNumZgates () const |
Returns 1 if Z gate present, otherwise 0. More... | |
int | getUseConcentration () |
double | getX () const |
HHGate2D * | getXgate (unsigned int i) |
Access function used for the X gate. The index is ignored. More... | |
string | getXindex () const |
double | getXpower (const Eref &e) const |
double | getY () const |
HHGate2D * | getYgate (unsigned int i) |
Access function used for the Y gate. The index is ignored. More... | |
string | getYindex () const |
double | getYpower (const Eref &e) const |
double | getZ () const |
HHGate2D * | getZgate (unsigned int i) |
Access function used for the Z gate. The index is ignored. More... | |
string | getZindex () const |
double | getZpower (const Eref &e) const |
HHChannel2D () | |
void | innerCreateGate (const string &gateName, HHGate2D **gatePtr, Id chanId, Id gateId) |
Inner utility function for creating the gate. More... | |
void | innerDestroyGate (const string &gateName, HHGate2D **gatePtr, Id chanId) |
bool | setGatePower (const Eref &e, double power, double *assignee, const string &gateType) |
void | setInstant (int Instant) |
void | setNumGates (unsigned int num) |
Dummy assignment function for the number of gates. More... | |
void | setUseConcentration (int value) |
void | setX (double X) |
void | setXindex (string index) |
void | setXpower (const Eref &e, double Xpower) |
void | setY (double Y) |
void | setYindex (string index) |
void | setYpower (const Eref &e, double Ypower) |
void | setZ (double Z) |
void | setZindex (string index) |
void | setZpower (const Eref &e, double Zpower) |
void | vProcess (const Eref &e, ProcPtr p) |
void | vReinit (const Eref &e, ProcPtr p) |
![]() | |
ChanCommon () | |
double | getGbar () const |
Utility function to acces Gbar. More... | |
double | getModulation () const |
double | getVm () const |
Utility function to access Vm. More... | |
void | sendProcessMsgs (const Eref &e, const ProcPtr info) |
void | sendReinitMsgs (const Eref &e, const ProcPtr info) |
void | updateIk () |
double | vGetEk (const Eref &e) const |
double | vGetGbar (const Eref &e) const |
double | vGetGk (const Eref &e) const |
double | vGetIk (const Eref &e) const |
double | vGetModulation (const Eref &e) const |
void | vHandleVm (double Vm) |
void | vSetEk (const Eref &e, double Ek) |
void | vSetGbar (const Eref &e, double Gbar) |
void | vSetGk (const Eref &e, double Gk) |
void | vSetIk (const Eref &e, double Ic) |
void | vSetModulation (const Eref &e, double modulation) |
~ChanCommon () | |
![]() | |
ChanBase () | |
double | getEk (const Eref &e) const |
double | getGbar (const Eref &e) const |
double | getGk (const Eref &e) const |
double | getIk (const Eref &e) const |
double | getModulation (const Eref &e) const |
void | handleVm (double Vm) |
void | process (const Eref &e, const ProcPtr info) |
void | reinit (const Eref &e, const ProcPtr info) |
void | setEk (const Eref &e, double Ek) |
void | setGbar (const Eref &e, double Gbar) |
void | setGk (const Eref &e, double Gk) |
void | setIk (const Eref &e, double Ic) |
void | setModulation (const Eref &e, double modulation) |
~ChanBase () | |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
static PFDD | selectPower (double power) |
![]() | |
static const Cinfo * | initCinfo () |
Specify the Class Info static variable for initialization. More... | |
![]() | |
static SrcFinfo2< double, double > * | channelOut () |
static SrcFinfo1< double > * | IkOut () |
static const Cinfo * | initCinfo () |
Specify the Class Info static variable for initialization. More... | |
static SrcFinfo1< double > * | permeability () |
Public Attributes | |
double(* | takeXpower_ )(double, double) |
double(* | takeYpower_ )(double, double) |
double(* | takeZpower_ )(double, double) |
Private Member Functions | |
int | dependency (string index, unsigned int dim) |
double | depValue (int dependency) |
double | integrate (double state, double dt, double A, double B) |
Static Private Member Functions | |
static double | power1 (double x, double p) |
static double | power2 (double x, double p) |
static double | power3 (double x, double p) |
static double | power4 (double x, double p) |
static double | powerN (double x, double p) |
Private Attributes | |
double | conc1_ |
Internal variable used to calculate conductance. More... | |
double | conc2_ |
double | g_ |
int | instant_ |
Exponent for Z gate. More... | |
double | X_ |
int | Xdep0_ |
int | Xdep1_ |
HHGate2D * | xGate_ |
string | Xindex_ |
bool | xInited_ |
State variable for Z gate. More... | |
double | Xpower_ |
double | Y_ |
State variable for X gate. More... | |
int | Ydep0_ |
int | Ydep1_ |
HHGate2D * | yGate_ |
string | Yindex_ |
bool | yInited_ |
double | Ypower_ |
Exponent for X gate. More... | |
double | Z_ |
State variable for Y gate. More... | |
int | Zdep0_ |
int | Zdep1_ |
HHGate2D * | zGate_ |
HHGate2D for the yGate. More... | |
string | Zindex_ |
bool | zInited_ |
double | Zpower_ |
Exponent for Y gate. More... | |
Static Private Attributes | |
static const double | EPSILON = 1.0e-10 |
HHGate2D for the zGate. More... | |
static const int | INSTANT_X = 1 |
static const int | INSTANT_Y = 2 |
static const int | INSTANT_Z = 4 |
Additional Inherited Members | |
![]() | |
double | Vm_ |
Vm_ is input variable from compartment, used for most rates. More... | |
Definition at line 24 of file HHChannel2D.h.
HHChannel2D::HHChannel2D | ( | ) |
Definition at line 173 of file HHChannel2D.cpp.
bool HHChannel2D::checkOriginal | ( | Id | chanId | ) | const |
Returns true if channel is original, false if copy.
If the gate exists and has only this element for input, then change the gate power. If the gate exists and has multiple parents, then make a new gate, set its power. If the gate does not exist, make a new gate, set its power.
The function is designed with the idea that if copies of this channel are made, then they all point back to the original HHGate. (Unless they are cross-node copies). It is only if we subsequently alter the HHGate of this channel that we need to make our own variant of the HHGate, or disconnect from an existing one.
Definition at line 599 of file HHChannel2D.cpp.
References HHGate2D::isOriginalChannel(), xGate_, yGate_, and zGate_.
Referenced by createGate(), and destroyGate().
void HHChannel2D::conc1 | ( | double | conc | ) |
Assign the local conc_ to the incoming conc from the concentration calculations for the compartment. Typically the message source will be a CaConc object, but there are other options for computing the conc.
Definition at line 402 of file HHChannel2D.cpp.
References conc1_.
Referenced by initCinfo().
void HHChannel2D::conc2 | ( | double | conc | ) |
Definition at line 407 of file HHChannel2D.cpp.
References conc2_.
Referenced by initCinfo().
void HHChannel2D::createGate | ( | const Eref & | e, |
string | gateType | ||
) |
Function for safely creating each gate, identified by strings as X, Y and Z. Will only work on a new channel, not on a copy. The idea is that the gates are always referred to the original 'library' channel, and their contents cannot be touched except by the original.
Definition at line 624 of file HHChannel2D.cpp.
References checkOriginal(), Eref::id(), innerCreateGate(), Id::path(), Id::value(), xGate_, yGate_, and zGate_.
Referenced by setGatePower().
|
private |
Definition at line 362 of file HHChannel2D.cpp.
Referenced by setXindex(), setYindex(), and setZindex().
|
private |
Definition at line 351 of file HHChannel2D.cpp.
References conc1_, conc2_, and ChanCommon::Vm_.
Referenced by vProcess(), and vReinit().
void HHChannel2D::destroyGate | ( | const Eref & | e, |
string | gateType | ||
) |
Utility function for destroying gate. Works only on original HHChannel. Somewhat dangerous, should never be used after a copy has been made as the pointer of the gate will be in use elsewhere.
Definition at line 655 of file HHChannel2D.cpp.
References checkOriginal(), Eref::id(), innerDestroyGate(), Id::path(), xGate_, yGate_, and zGate_.
Referenced by setGatePower().
int HHChannel2D::getInstant | ( | ) | const |
Definition at line 228 of file HHChannel2D.cpp.
References instant_.
Referenced by initCinfo().
unsigned int HHChannel2D::getNumXgates | ( | ) | const |
Access function for the number of Xgates. Gives 1 if present, otherwise 0.
Definition at line 336 of file HHChannel2D.cpp.
References xGate_.
Referenced by initCinfo().
unsigned int HHChannel2D::getNumYgates | ( | ) | const |
Returns 1 if Y gate present, otherwise 0.
Definition at line 341 of file HHChannel2D.cpp.
References yGate_.
Referenced by initCinfo().
unsigned int HHChannel2D::getNumZgates | ( | ) | const |
Returns 1 if Z gate present, otherwise 0.
Definition at line 346 of file HHChannel2D.cpp.
References zGate_.
Referenced by initCinfo().
int HHChannel2D::getUseConcentration | ( | ) |
double HHChannel2D::getX | ( | ) | const |
Definition at line 238 of file HHChannel2D.cpp.
References X_.
Referenced by initCinfo().
HHGate2D * HHChannel2D::getXgate | ( | unsigned int | i | ) |
Access function used for the X gate. The index is ignored.
Definition at line 318 of file HHChannel2D.cpp.
References xGate_.
Referenced by initCinfo().
string HHChannel2D::getXindex | ( | ) | const |
Definition at line 263 of file HHChannel2D.cpp.
References Xindex_.
Referenced by initCinfo().
double HHChannel2D::getXpower | ( | const Eref & | e | ) | const |
Assigns the Xpower for this gate. If the gate exists and has only this element for input, then change the gate value. If the gate exists and has multiple parents, then make a new gate. If the gate does not exist, make a new gate
Definition at line 209 of file HHChannel2D.cpp.
References Xpower_.
Referenced by initCinfo().
double HHChannel2D::getY | ( | ) | const |
Definition at line 248 of file HHChannel2D.cpp.
References Y_.
Referenced by initCinfo().
HHGate2D * HHChannel2D::getYgate | ( | unsigned int | i | ) |
Access function used for the Y gate. The index is ignored.
Definition at line 323 of file HHChannel2D.cpp.
References yGate_.
Referenced by initCinfo().
string HHChannel2D::getYindex | ( | ) | const |
Definition at line 280 of file HHChannel2D.cpp.
References Yindex_.
Referenced by initCinfo().
double HHChannel2D::getYpower | ( | const Eref & | e | ) | const |
Definition at line 214 of file HHChannel2D.cpp.
References Ypower_.
Referenced by initCinfo().
double HHChannel2D::getZ | ( | ) | const |
Definition at line 258 of file HHChannel2D.cpp.
References Z_.
Referenced by initCinfo().
HHGate2D * HHChannel2D::getZgate | ( | unsigned int | i | ) |
Access function used for the Z gate. The index is ignored.
Definition at line 328 of file HHChannel2D.cpp.
References zGate_.
Referenced by initCinfo().
string HHChannel2D::getZindex | ( | ) | const |
Definition at line 297 of file HHChannel2D.cpp.
References Zindex_.
Referenced by initCinfo().
double HHChannel2D::getZpower | ( | const Eref & | e | ) | const |
Definition at line 219 of file HHChannel2D.cpp.
References Zpower_.
Referenced by initCinfo().
|
static |
Definition at line 23 of file HHChannel2D.cpp.
References conc1(), conc2(), getInstant(), getNumXgates(), getNumYgates(), getNumZgates(), getX(), getXgate(), getXindex(), getXpower(), getY(), getYgate(), getYindex(), getYpower(), getZ(), getZgate(), getZindex(), getZpower(), HHChannel2DCinfo, ChanBase::initCinfo(), HHGate2D::initCinfo(), setInstant(), setNumGates(), setX(), setXindex(), setXpower(), setY(), setYindex(), setYpower(), setZ(), setZindex(), and setZpower().
void HHChannel2D::innerCreateGate | ( | const string & | gateName, |
HHGate2D ** | gatePtr, | ||
Id | chanId, | ||
Id | gateId | ||
) |
Inner utility function for creating the gate.
Definition at line 612 of file HHChannel2D.cpp.
References Id::path().
Referenced by createGate().
Inner utility for destroying the gate
Definition at line 643 of file HHChannel2D.cpp.
References Id::path().
Referenced by destroyGate().
|
private |
Returns the state variable for the new timestep based on the internal variables A_ and B_ which were passed in from the gate.
Definition at line 420 of file HHChannel2D.cpp.
References EPSILON.
Referenced by vProcess().
|
inlinestaticprivate |
Definition at line 208 of file HHChannel2D.h.
Referenced by selectPower().
|
inlinestaticprivate |
Definition at line 211 of file HHChannel2D.h.
Referenced by power4(), and selectPower().
|
inlinestaticprivate |
Definition at line 214 of file HHChannel2D.h.
Referenced by selectPower().
|
inlinestaticprivate |
Definition at line 217 of file HHChannel2D.h.
References power2().
Referenced by selectPower().
|
staticprivate |
Definition at line 674 of file HHChannel2D.cpp.
References moose::log().
Referenced by selectPower().
|
static |
Definition at line 681 of file HHChannel2D.cpp.
References power1(), power2(), power3(), power4(), and powerN().
Referenced by setXpower(), setYpower(), and setZpower().
bool HHChannel2D::setGatePower | ( | const Eref & | e, |
double | power, | ||
double * | assignee, | ||
const string & | gateType | ||
) |
Utility for altering gate powers
Definition at line 535 of file HHChannel2D.cpp.
References createGate(), destroyGate(), and doubleEq().
Referenced by setXpower(), setYpower(), and setZpower().
void HHChannel2D::setInstant | ( | int | Instant | ) |
Definition at line 224 of file HHChannel2D.cpp.
References instant_.
Referenced by initCinfo().
void HHChannel2D::setNumGates | ( | unsigned int | num | ) |
Dummy assignment function for the number of gates.
Definition at line 333 of file HHChannel2D.cpp.
Referenced by initCinfo().
void HHChannel2D::setUseConcentration | ( | int | value | ) |
void HHChannel2D::setX | ( | double | X | ) |
Definition at line 233 of file HHChannel2D.cpp.
Referenced by initCinfo().
void HHChannel2D::setXindex | ( | string | index | ) |
Definition at line 268 of file HHChannel2D.cpp.
References dependency(), Xdep0_, Xdep1_, and Xindex_.
Referenced by initCinfo().
void HHChannel2D::setXpower | ( | const Eref & | e, |
double | Xpower | ||
) |
Assigns the Xpower for this gate. If the gate exists and has only this element for input, then change the gate value. If the gate exists and has multiple parents, then make a new gate. If the gate does not exist, make a new gate
Definition at line 563 of file HHChannel2D.cpp.
References selectPower(), setGatePower(), takeXpower_, and Xpower_.
Referenced by initCinfo().
void HHChannel2D::setY | ( | double | Y | ) |
Definition at line 243 of file HHChannel2D.cpp.
Referenced by initCinfo().
void HHChannel2D::setYindex | ( | string | index | ) |
Definition at line 285 of file HHChannel2D.cpp.
References dependency(), Ydep0_, Ydep1_, and Yindex_.
Referenced by initCinfo().
void HHChannel2D::setYpower | ( | const Eref & | e, |
double | Ypower | ||
) |
Definition at line 569 of file HHChannel2D.cpp.
References selectPower(), setGatePower(), takeYpower_, and Ypower_.
Referenced by initCinfo().
void HHChannel2D::setZ | ( | double | Z | ) |
Definition at line 253 of file HHChannel2D.cpp.
Referenced by initCinfo().
void HHChannel2D::setZindex | ( | string | index | ) |
Definition at line 302 of file HHChannel2D.cpp.
References dependency(), Zdep0_, Zdep1_, and Zindex_.
Referenced by initCinfo().
void HHChannel2D::setZpower | ( | const Eref & | e, |
double | Zpower | ||
) |
Definition at line 575 of file HHChannel2D.cpp.
References selectPower(), setGatePower(), takeZpower_, and Zpower_.
Referenced by initCinfo().
processFunc handles the update and calculations every clock tick. It first sends the request for evaluation of the gate variables to the respective gate objects and recieves their response immediately through a return message. This is done so that many channel instances can share the same gate lookup tables, but do so cleanly. Such messages should never go to a remote node. Then the function does its own little calculations to send back to the parent compartment through regular messages.
Implements ChanBase.
Definition at line 429 of file HHChannel2D.cpp.
References depValue(), ProcInfo::dt, g_, ChanBase::getGbar(), instant_, INSTANT_X, INSTANT_Y, INSTANT_Z, integrate(), HHGate2D::lookupBoth(), ChanCommon::sendProcessMsgs(), ChanBase::setGk(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), ChanCommon::vGetModulation(), X_, Xdep0_, Xdep1_, xGate_, Xpower_, Y_, Ydep0_, Ydep1_, yGate_, Ypower_, Z_, Zdep0_, Zdep1_, zGate_, and Zpower_.
Reinitializes the values for the channel. This involves computing the steady-state value for the channel gates using the provided Vm from the parent compartment. It involves a similar cycle through the gates and then updates to the parent compartment as for the processFunc.
Here we get the steady-state values for the gate (the 'instant' calculation) as A_/B_.
Implements ChanBase.
Definition at line 477 of file HHChannel2D.cpp.
References depValue(), Eref::element(), EPSILON, g_, ChanBase::getGbar(), Element::getName(), HHGate2D::lookupBoth(), ChanCommon::sendReinitMsgs(), ChanBase::setGk(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), ChanCommon::vGetModulation(), X_, Xdep0_, Xdep1_, xGate_, xInited_, Xpower_, Y_, Ydep0_, Ydep1_, yGate_, yInited_, Ypower_, Z_, Zdep0_, Zdep1_, zGate_, zInited_, and Zpower_.
|
private |
Internal variable used to calculate conductance.
Definition at line 180 of file HHChannel2D.h.
Referenced by conc1(), and depValue().
|
private |
Definition at line 181 of file HHChannel2D.h.
Referenced by conc2(), and depValue().
|
staticprivate |
HHGate2D for the zGate.
Definition at line 203 of file HHChannel2D.h.
Referenced by integrate(), and vReinit().
|
private |
Definition at line 178 of file HHChannel2D.h.
Referenced by vProcess(), and vReinit().
|
private |
Exponent for Z gate.
bitmapped flag for X, Y, Z, to do equil calculation for gate
Definition at line 168 of file HHChannel2D.h.
Referenced by getInstant(), setInstant(), and vProcess().
|
staticprivate |
Definition at line 204 of file HHChannel2D.h.
Referenced by vProcess().
|
staticprivate |
Definition at line 205 of file HHChannel2D.h.
Referenced by vProcess().
|
staticprivate |
Definition at line 206 of file HHChannel2D.h.
Referenced by vProcess().
double( * HHChannel2D::takeXpower_)(double, double) |
Definition at line 113 of file HHChannel2D.h.
Referenced by setXpower(), vProcess(), and vReinit().
double( * HHChannel2D::takeYpower_)(double, double) |
Definition at line 114 of file HHChannel2D.h.
Referenced by setYpower(), vProcess(), and vReinit().
double( * HHChannel2D::takeZpower_)(double, double) |
Definition at line 115 of file HHChannel2D.h.
Referenced by setZpower(), vProcess(), and vReinit().
|
private |
Definition at line 169 of file HHChannel2D.h.
Referenced by getX(), setX(), vProcess(), and vReinit().
|
private |
Definition at line 187 of file HHChannel2D.h.
Referenced by setXindex(), vProcess(), and vReinit().
|
private |
Definition at line 188 of file HHChannel2D.h.
Referenced by setXindex(), vProcess(), and vReinit().
|
private |
HHGate2D data structure for the xGate. This is writable only on the HHChannel that originally created the HHGate, for others it must be treated as readonly.
Definition at line 199 of file HHChannel2D.h.
Referenced by checkOriginal(), createGate(), destroyGate(), getNumXgates(), getXgate(), vProcess(), and vReinit().
|
private |
Definition at line 183 of file HHChannel2D.h.
Referenced by getXindex(), and setXindex().
|
private |
State variable for Z gate.
true when the matching state variable has been initialized
Definition at line 176 of file HHChannel2D.h.
|
private |
Definition at line 163 of file HHChannel2D.h.
Referenced by getXpower(), setXpower(), vProcess(), and vReinit().
|
private |
State variable for X gate.
Definition at line 170 of file HHChannel2D.h.
Referenced by getY(), setY(), vProcess(), and vReinit().
|
private |
Definition at line 189 of file HHChannel2D.h.
Referenced by setYindex(), vProcess(), and vReinit().
|
private |
Definition at line 190 of file HHChannel2D.h.
Referenced by setYindex(), vProcess(), and vReinit().
|
private |
Definition at line 200 of file HHChannel2D.h.
Referenced by checkOriginal(), createGate(), destroyGate(), getNumYgates(), getYgate(), vProcess(), and vReinit().
|
private |
Definition at line 184 of file HHChannel2D.h.
Referenced by getYindex(), and setYindex().
|
private |
Definition at line 176 of file HHChannel2D.h.
|
private |
Exponent for X gate.
Definition at line 164 of file HHChannel2D.h.
Referenced by getYpower(), setYpower(), vProcess(), and vReinit().
|
private |
State variable for Y gate.
Definition at line 171 of file HHChannel2D.h.
Referenced by getZ(), setZ(), vProcess(), and vReinit().
|
private |
Definition at line 191 of file HHChannel2D.h.
Referenced by setZindex(), vProcess(), and vReinit().
|
private |
Definition at line 192 of file HHChannel2D.h.
Referenced by setZindex(), vProcess(), and vReinit().
|
private |
HHGate2D for the yGate.
Definition at line 201 of file HHChannel2D.h.
Referenced by checkOriginal(), createGate(), destroyGate(), getNumZgates(), getZgate(), vProcess(), and vReinit().
|
private |
Definition at line 185 of file HHChannel2D.h.
Referenced by getZindex(), and setZindex().
|
private |
Definition at line 176 of file HHChannel2D.h.
|
private |
Exponent for Y gate.
Definition at line 165 of file HHChannel2D.h.
Referenced by getZpower(), setZpower(), vProcess(), and vReinit().