26 "Author",
"Niraj Dudani. Ported to async13 by Subhasis Ray. Rewritten by Asia Jedrzejewska-Szmek",
27 "Description",
"DifShell object: Models diffusion of an ion (typically calcium) within an "
28 "electric compartment. A DifShell is an iso-concentration region with respect to "
29 "the ion. Adjoining DifShells exchange flux of this ion, and also keep track of "
30 "changes in concentration due to pumping, buffering and channel currents, by "
31 "talking to the appropriate objects.",
41 sizeof( doc ) /
sizeof(
string ));
83 cerr <<
"Error: DifShell: C cannot be negative!\n";
98 cerr <<
"Error: DifShell: Ceq cannot be negative!\n";
115 cerr <<
"Error: DifShell: D cannot be negative!\n";
129 if ( valence < 0.0 ) {
130 cerr <<
"Error: DifShell: valence cannot be negative!\n";
155 if ( shapeMode != 0 && shapeMode != 1 && shapeMode != 3 ) {
156 cerr <<
"Error: DifShell: I only understand shapeModes 0, 1 and 3.\n";
170 if ( length < 0.0 ) {
171 cerr <<
"Error: DifShell: length cannot be negative!\n";
186 if ( diameter < 0.0 ) {
187 cerr <<
"Error: DifShell: diameter cannot be negative!\n";
202 if ( thickness < 0.0 ) {
203 cerr <<
"Error: DifShell: thickness cannot be negative!\n";
219 cerr <<
"Warning: DifShell: Trying to set volume, when shapeMode is not USER-DEFINED\n";
221 if ( volume < 0.0 ) {
222 cerr <<
"Error: DifShell: volume cannot be negative!\n";
237 cerr <<
"Warning: DifShell: Trying to set outerArea, when shapeMode is not USER-DEFINED\n";
239 if ( outerArea < 0.0 ) {
240 cerr <<
"Error: DifShell: outerArea cannot be negative!\n";
255 cerr <<
"Warning: DifShell: Trying to set innerArea, when shapeMode is not USER-DEFINED\n";
257 if ( innerArea < 0.0 ) {
258 cerr <<
"Error: DifShell: innerArea cannot be negative!\n";
278 double x = exp( -B * dt );
279 return state * x + ( A / B ) * ( 1 - x );
282 return state + A * dt ;
301 volume_ = 4./3.*
M_PI * ( rOut * rOut * rOut - rIn * rIn * rIn );
494 ch = pow( C_, static_cast< double >( hill ) );
static const Cinfo * initCinfo()
void vSetThickness(const Eref &e, double thickness)
void vSetLength(const Eref &e, double length)
void vSetDiameter(const Eref &e, double diameter)
void vSetD(const Eref &e, double D)
void vEqTauPump(const Eref &e, double kP)
static const Cinfo * initCinfo()
void vInflux(const Eref &e, double I)
void vHillPump(const Eref &e, double vMax, double Kd, unsigned int hill)
double vGetC(const Eref &e) const
void vFOutflux(const Eref &e, double I, double fraction)
unsigned int vGetShapeMode(const Eref &e) const
void vSetShapeMode(const Eref &e, unsigned int shapeMode)
static SrcFinfo1< double > * concentrationOut()
void vFInflux(const Eref &e, double I, double fraction)
double integrate(double state, double dt, double A, double B)
static const double F
Faraday's constant (Coulomb / Mole)
void vProcess(const Eref &e, ProcPtr p)
static const Cinfo * difShellCinfo
void vReinit(const Eref &e, ProcPtr p)
void vTauPump(const Eref &e, double kP, double Ceq)
double vGetValence(const Eref &e) const
void vSetLeak(const Eref &e, double leak)
void vSetVolume(const Eref &e, double volume)
void vFluxFromOut(const Eref &e, double outerC, double outerThickness)
void vSetValence(const Eref &e, double valence)
void vFluxFromIn(const Eref &e, double innerC, double innerThickness)
static SrcFinfo2< double, double > * innerDifSourceOut()
void vSetC(const Eref &e, double C)
C is a read-only field.
void vBuffer(const Eref &e, double kf, double kb, double bFree, double bBound)
void vMMPump(const Eref &e, double vMax, double Kd)
double vGetDiameter(const Eref &e) const
double vGetVolume(const Eref &e) const
DifShell()
Faraday's constant (Coulomb / Mole)
static const double EPSILON
double vGetThickness(const Eref &e) const
double vGetLength(const Eref &e) const
void vStoreInflux(const Eref &e, double flux)
void vSetInnerArea(const Eref &e, double innerArea)
void vStoreOutflux(const Eref &e, double flux)
double vGetInnerArea(const Eref &e) const
double vGetOuterArea(const Eref &e) const
double vGetLeak(const Eref &e) const
void calculateVolumeArea(const Eref &e)
void vOutflux(const Eref &e, double I)
void vSetCeq(const Eref &e, double Ceq)
static SrcFinfo2< double, double > * outerDifSourceOut()
double vGetD(const Eref &e) const
void vSetOuterArea(const Eref &e, double outerArea)
double vGetCeq(const Eref &e) const