MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CaConcBase Class Referenceabstract

#include <CaConcBase.h>

+ Inheritance diagram for CaConcBase:
+ Collaboration diagram for CaConcBase:

Public Member Functions

 CaConcBase ()
 
void current (const Eref &e, double I)
 
void currentFraction (const Eref &e, double I, double fraction)
 
void decrease (const Eref &e, double I)
 
double getB (const Eref &e) const
 
double getCa (const Eref &e) const
 
double getCaBasal (const Eref &e) const
 
double getCeiling (const Eref &e) const
 
double getDiameter (const Eref &e) const
 
double getFloor (const Eref &e) const
 
double getLength (const Eref &e) const
 
double getTau (const Eref &e) const
 
double getThickness (const Eref &e) const
 
void increase (const Eref &e, double I)
 
void process (const Eref &, ProcPtr info)
 
void reinit (const Eref &, ProcPtr info)
 
void setB (const Eref &e, double val)
 
void setCa (const Eref &e, double val)
 
void setCaBasal (const Eref &e, double val)
 
void setCeiling (const Eref &e, double val)
 
void setDiameter (const Eref &e, double val)
 
void setFloor (const Eref &e, double val)
 
void setLength (const Eref &e, double val)
 
void setTau (const Eref &e, double val)
 
void setThickness (const Eref &e, double val)
 
void updateDimensions (const Eref &e)
 
virtual void vCurrent (const Eref &e, double I)=0
 
virtual void vCurrentFraction (const Eref &e, double I, double fraction)=0
 
virtual void vDecrease (const Eref &e, double I)=0
 
virtual double vGetB (const Eref &e) const =0
 
virtual double vGetCa (const Eref &e) const =0
 
virtual double vGetCaBasal (const Eref &e) const =0
 
virtual double vGetCeiling (const Eref &e) const =0
 
virtual double vGetFloor (const Eref &e) const =0
 
virtual double vGetTau (const Eref &e) const =0
 
virtual void vIncrease (const Eref &e, double I)=0
 
virtual void vProcess (const Eref &, ProcPtr info)=0
 
virtual void vReinit (const Eref &, ProcPtr info)=0
 
virtual void vSetB (const Eref &e, double val)=0
 
virtual void vSetCa (const Eref &e, double val)=0
 
virtual void vSetCaBasal (const Eref &e, double val)=0
 
virtual void vSetCeiling (const Eref &e, double val)=0
 
virtual void vSetFloor (const Eref &e, double val)=0
 
virtual void vSetSolver (const Eref &e, Id hsolve)
 Used to set up the solver. Dummy for regular classes. More...
 
virtual void vSetTau (const Eref &e, double val)=0
 

Static Public Member Functions

static SrcFinfo1< double > * concOut ()
 
static const CinfoinitCinfo ()
 
static void zombify (Element *orig, const Cinfo *zClass, Id hsolve)
 

Private Attributes

double diameter_
 
double length_
 
double thickness_
 

Detailed Description

This is the base class for CaConc. It handles calcium current influx, conversion to calcium concentration, buffering, and pumps. It obeys the equation:

dC/dt = B*Ik - C/tau where Ca = Ca_base + C.

From the GENESIS notes: In SI units, where concentration is moles/m^3 (milli-moles/liter) and current is in amperes, theory gives B = 5.2e-6/(shell volume). In practice, B is a parameter to be fitted or estimated from experiment, as buffering, non-uniform distribution of Ca, etc., will modify this value. If thick = 0, the readcell routine calculates B by dividing the "density" parameter in the cell parameter file by the volume of the compartment. Otherwise, it scales as a true shell, with the volume of a shell having thickness thick. A negative value of the "density" parameter may be used to indicate that it should be taken as an absolute value of B, without scaling.

This is a base class to provide the interface functions.

Definition at line 38 of file CaConcBase.h.

Constructor & Destructor Documentation

CaConcBase::CaConcBase ( )

Definition at line 194 of file CaConcBase.cpp.

195  :
196  thickness_( 0.0 )
197 {;}
double thickness_
Definition: CaConcBase.h:122

Member Function Documentation

SrcFinfo1< double > * CaConcBase::concOut ( )
static

Definition at line 25 of file CaConcBase.cpp.

Referenced by initCinfo(), HSolveActive::sendValues(), CaConc::vProcess(), and CaConc::vReinit().

25  {
26  static SrcFinfo1< double > concOut( "concOut",
27  "Concentration of Ca in pool" );
28  return &concOut;
29 }
static SrcFinfo1< double > * concOut()
Definition: CaConcBase.cpp:25

+ Here is the caller graph for this function:

void CaConcBase::current ( const Eref e,
double  I 
)

Definition at line 313 of file CaConcBase.cpp.

References vCurrent().

Referenced by initCinfo().

314 {
315  vCurrent( e, I );
316 }
virtual void vCurrent(const Eref &e, double I)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::currentFraction ( const Eref e,
double  I,
double  fraction 
)

Definition at line 318 of file CaConcBase.cpp.

References vCurrentFraction().

Referenced by initCinfo().

319 {
320  vCurrentFraction( e, I, fraction );
321 }
virtual void vCurrentFraction(const Eref &e, double I, double fraction)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::decrease ( const Eref e,
double  I 
)

Definition at line 328 of file CaConcBase.cpp.

References vDecrease().

Referenced by initCinfo().

329 {
330  vDecrease( e, I );
331 }
virtual void vDecrease(const Eref &e, double I)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getB ( const Eref e) const

Definition at line 234 of file CaConcBase.cpp.

References vGetB().

Referenced by initCinfo(), and zombify().

235 {
236  return vGetB( e );
237 }
virtual double vGetB(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getCa ( const Eref e) const

Definition at line 207 of file CaConcBase.cpp.

References vGetCa().

Referenced by initCinfo(), and zombify().

208 {
209  return vGetCa( e );
210 }
virtual double vGetCa(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getCaBasal ( const Eref e) const

Definition at line 216 of file CaConcBase.cpp.

References vGetCaBasal().

Referenced by initCinfo(), and zombify().

217 {
218  return vGetCaBasal( e );
219 }
virtual double vGetCaBasal(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getCeiling ( const Eref e) const

Definition at line 242 of file CaConcBase.cpp.

References vGetCeiling().

Referenced by initCinfo(), and zombify().

243 {
244  return vGetCeiling( e );
245 }
virtual double vGetCeiling(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getDiameter ( const Eref e) const

Definition at line 284 of file CaConcBase.cpp.

References diameter_.

Referenced by initCinfo(), and zombify().

285 {
286  return diameter_;
287 }
double diameter_
Definition: CaConcBase.h:123

+ Here is the caller graph for this function:

double CaConcBase::getFloor ( const Eref e) const

Definition at line 251 of file CaConcBase.cpp.

References vGetFloor().

Referenced by initCinfo(), and zombify().

252 {
253  return vGetFloor( e );
254 }
virtual double vGetFloor(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getLength ( const Eref e) const

Definition at line 294 of file CaConcBase.cpp.

References length_.

Referenced by initCinfo(), and zombify().

295 {
296  return length_;
297 }
double length_
Definition: CaConcBase.h:124

+ Here is the caller graph for this function:

double CaConcBase::getTau ( const Eref e) const

Definition at line 225 of file CaConcBase.cpp.

References vGetTau().

Referenced by initCinfo(), and zombify().

226 {
227  return vGetTau( e );
228 }
virtual double vGetTau(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double CaConcBase::getThickness ( const Eref e) const

Definition at line 273 of file CaConcBase.cpp.

References thickness_.

Referenced by initCinfo(), and zombify().

274 {
275  return thickness_;
276 }
double thickness_
Definition: CaConcBase.h:122

+ Here is the caller graph for this function:

void CaConcBase::increase ( const Eref e,
double  I 
)

Definition at line 323 of file CaConcBase.cpp.

References vIncrease().

Referenced by initCinfo().

324 {
325  vIncrease( e, I );
326 }
virtual void vIncrease(const Eref &e, double I)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Cinfo * CaConcBase::initCinfo ( )
static

Definition at line 31 of file CaConcBase.cpp.

References concOut(), current(), currentFraction(), decrease(), getB(), getCa(), getCaBasal(), getCeiling(), getDiameter(), getFloor(), getLength(), getTau(), getThickness(), increase(), Neutral::initCinfo(), process(), reinit(), setB(), setCa(), setCaBasal(), setCeiling(), setDiameter(), setFloor(), setLength(), setTau(), and setThickness().

Referenced by ZombieCaConc::initCinfo(), and CaConc::initCinfo().

32 {
34  // Shared message definitions
36  static DestFinfo process( "process",
37  "Handles process call",
39  static DestFinfo reinit( "reinit",
40  "Handles reinit call",
42 
43  static Finfo* processShared[] =
44  {
45  &process, &reinit
46  };
47 
48  static SharedFinfo proc( "proc",
49  "Shared message to receive Process message from scheduler",
50  processShared, sizeof( processShared ) / sizeof( Finfo* ) );
51 
53  // Field definitions
56  "Calcium concentration.",
59  );
60  static ElementValueFinfo< CaConcBase, double > CaBasal( "CaBasal",
61  "Basal Calcium concentration.",
64  );
65  static ElementValueFinfo< CaConcBase, double > Ca_base( "Ca_base",
66  "Basal Calcium concentration, synonym for CaBasal",
69  );
71  "Settling time for Ca concentration",
74  );
76  "Volume scaling factor. "
77  "Deprecated. This is a legacy field from GENESIS and exposes "
78  "internal calculations. Please do not use. \n"
79  "B = 1/(vol * F) so that it obeys:\n"
80  "dC/dt = B*I_Ca - C/tau",
83  );
84  static ElementValueFinfo< CaConcBase, double > thick( "thick",
85  "Thickness of Ca shell, assumed cylindrical. Legal range is between 0 \n"
86  "and the radius. If outside this range it is taken as the radius. \n"
87  " Default zero, ie, the shell is the entire thickness of the cylinder \n",
90  );
91  static ElementValueFinfo< CaConcBase, double > length( "length",
92  "Length of Ca shell, assumed cylindrical",
95  );
96  static ElementValueFinfo< CaConcBase, double > diameter( "diameter",
97  "Diameter of Ca shell, assumed cylindrical",
100  );
101  static ElementValueFinfo< CaConcBase, double > ceiling( "ceiling",
102  "Ceiling value for Ca concentration. If Ca > ceiling, Ca = ceiling. \n"
103  "If ceiling <= 0.0, there is no upper limit on Ca concentration value.",
106  );
107  static ElementValueFinfo< CaConcBase, double > floor( "floor",
108  "Floor value for Ca concentration. If Ca < floor, Ca = floor",
111  );
112 
114  // MsgDest definitions
116 
117  static DestFinfo current( "current",
118  "Calcium Ion current, due to be converted to conc.",
120  );
121 
122  static DestFinfo currentFraction( "currentFraction",
123  "Fraction of total Ion current, that is carried by Ca2+.",
125  );
126 
127  static DestFinfo increase( "increase",
128  "Any input current that increases the concentration.",
130  );
131 
132  static DestFinfo decrease( "decrease",
133  "Any input current that decreases the concentration.",
135  );
136 
137  static DestFinfo basal( "basal",
138  "Synonym for assignment of basal conc.",
140  );
141 
142  static Finfo* CaConcBaseFinfos[] =
143  {
144  &proc, // Shared
145  concOut(), // Src
146  &Ca, // Value
147  &CaBasal, // Value
148  &Ca_base, // Value
149  &tau, // Value
150  &B, // Value
151  &thick, // Value
152  &diameter, // Value
153  &length, // Value
154  &ceiling, // Value
155  &floor, // Value
156  &current, // Dest
157  &currentFraction, // Dest
158  &increase, // Dest
159  &decrease, // Dest
160  &basal, // Dest
161  };
162 
163  // We want the Ca updates before channel updates, so along with compts.
164  // static SchedInfo schedInfo[] = { { process, 0, 0 } };
165 
166  static string doc[] =
167  {
168  "Name", "CaConcBase",
169  "Author", "Upinder S. Bhalla, 2014, NCBS",
170  "Description",
171  "CaConcBase: Base class for Calcium concentration pool. \n"
172  "Takes current from a channel and keeps track of calcium buildup and \n"
173  " depletion by a single exponential process. ",
174  };
175 
176  static ZeroSizeDinfo< int > dinfo;
177 
178  static Cinfo CaConcBaseCinfo(
179  "CaConcBase",
181  CaConcBaseFinfos,
182  sizeof( CaConcBaseFinfos )/sizeof(Finfo *),
183  &dinfo,
184  doc,
185  sizeof(doc)/sizeof(string)
186  );
187 
188  return &CaConcBaseCinfo;
189 }
void increase(const Eref &e, double I)
Definition: CaConcBase.cpp:323
double getLength(const Eref &e) const
Definition: CaConcBase.cpp:294
void setDiameter(const Eref &e, double val)
Definition: CaConcBase.cpp:278
double getCa(const Eref &e) const
Definition: CaConcBase.cpp:207
double getThickness(const Eref &e) const
Definition: CaConcBase.cpp:273
void currentFraction(const Eref &e, double I, double fraction)
Definition: CaConcBase.cpp:318
Definition: EpFunc.h:64
double getTau(const Eref &e) const
Definition: CaConcBase.cpp:225
void setTau(const Eref &e, double val)
Definition: CaConcBase.cpp:221
void setCa(const Eref &e, double val)
Definition: CaConcBase.cpp:203
double getDiameter(const Eref &e) const
Definition: CaConcBase.cpp:284
static SrcFinfo1< double > * concOut()
Definition: CaConcBase.cpp:25
double getCaBasal(const Eref &e) const
Definition: CaConcBase.cpp:216
double getFloor(const Eref &e) const
Definition: CaConcBase.cpp:251
void setCaBasal(const Eref &e, double val)
Definition: CaConcBase.cpp:212
void setFloor(const Eref &e, double val)
Definition: CaConcBase.cpp:247
void setCeiling(const Eref &e, double val)
Definition: CaConcBase.cpp:238
void setLength(const Eref &e, double val)
Definition: CaConcBase.cpp:289
double getCeiling(const Eref &e) const
Definition: CaConcBase.cpp:242
void current(const Eref &e, double I)
Definition: CaConcBase.cpp:313
void setB(const Eref &e, double val)
Definition: CaConcBase.cpp:230
void reinit(const Eref &, ProcPtr info)
Definition: CaConcBase.cpp:303
double getB(const Eref &e) const
Definition: CaConcBase.cpp:234
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
void setThickness(const Eref &e, double val)
Definition: CaConcBase.cpp:267
Definition: Cinfo.h:18
void decrease(const Eref &e, double I)
Definition: CaConcBase.cpp:328
Definition: EpFunc.h:79
Definition: Finfo.h:12
void process(const Eref &, ProcPtr info)
Definition: CaConcBase.cpp:308

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::process ( const Eref e,
ProcPtr  info 
)

Definition at line 308 of file CaConcBase.cpp.

References vProcess().

Referenced by initCinfo().

309 {
310  vProcess( e, p );
311 }
virtual void vProcess(const Eref &, ProcPtr info)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::reinit ( const Eref e,
ProcPtr  info 
)

Definition at line 303 of file CaConcBase.cpp.

References vReinit().

Referenced by initCinfo().

304 {
305  vReinit( e, p );
306 }
virtual void vReinit(const Eref &, ProcPtr info)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setB ( const Eref e,
double  val 
)

Definition at line 230 of file CaConcBase.cpp.

References vSetB().

Referenced by initCinfo(), and zombify().

231 {
232  vSetB( e, B );
233 }
virtual void vSetB(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setCa ( const Eref e,
double  val 
)

Definition at line 203 of file CaConcBase.cpp.

References vSetCa().

Referenced by initCinfo(), and zombify().

204 {
205  vSetCa( e, Ca );
206 }
virtual void vSetCa(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setCaBasal ( const Eref e,
double  val 
)

Definition at line 212 of file CaConcBase.cpp.

References vSetCaBasal().

Referenced by initCinfo(), and zombify().

213 {
214  vSetCaBasal( e, CaBasal );
215 }
virtual void vSetCaBasal(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setCeiling ( const Eref e,
double  val 
)

Definition at line 238 of file CaConcBase.cpp.

References vSetCeiling().

Referenced by initCinfo(), and zombify().

239 {
240  vSetCeiling( e, ceiling );
241 }
virtual void vSetCeiling(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setDiameter ( const Eref e,
double  val 
)

Definition at line 278 of file CaConcBase.cpp.

References diameter_, and updateDimensions().

Referenced by initCinfo(), and zombify().

279 {
280  diameter_ = diameter;
281  updateDimensions( e );
282 }
double diameter_
Definition: CaConcBase.h:123
void updateDimensions(const Eref &e)
Definition: CaConcBase.cpp:256

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setFloor ( const Eref e,
double  val 
)

Definition at line 247 of file CaConcBase.cpp.

References vSetFloor().

Referenced by initCinfo(), and zombify().

248 {
249  vSetFloor( e, floor );
250 }
virtual void vSetFloor(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setLength ( const Eref e,
double  val 
)

Definition at line 289 of file CaConcBase.cpp.

References length_, and updateDimensions().

Referenced by initCinfo(), and zombify().

290 {
291  length_ = length;
292  updateDimensions( e );
293 }
void updateDimensions(const Eref &e)
Definition: CaConcBase.cpp:256
double length_
Definition: CaConcBase.h:124

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setTau ( const Eref e,
double  val 
)

Definition at line 221 of file CaConcBase.cpp.

References vSetTau().

Referenced by initCinfo(), and zombify().

222 {
223  vSetTau( e, tau );
224 }
virtual void vSetTau(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::setThickness ( const Eref e,
double  val 
)

Definition at line 267 of file CaConcBase.cpp.

References thickness_, and updateDimensions().

Referenced by initCinfo(), and zombify().

268 {
269  thickness_ = thickness;
270  updateDimensions( e );
271 }
void updateDimensions(const Eref &e)
Definition: CaConcBase.cpp:256
double thickness_
Definition: CaConcBase.h:122

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CaConcBase::updateDimensions ( const Eref e)

Definition at line 256 of file CaConcBase.cpp.

References diameter_, FaradayConst, length_, PI, thickness_, and vSetB().

Referenced by setDiameter(), setLength(), and setThickness().

257 {
258  double vol = PI * diameter_ * diameter_ * length_ * 0.25;
259  if ( thickness_ > 0 && thickness_ < diameter_/2.0 ) {
260  double coreRadius = diameter_ / 2.0 - thickness_;
261  vol -= PI * coreRadius * coreRadius * length_;
262  }
263  double B = 1.0 / ( FaradayConst * vol );
264  vSetB( e, B );
265 }
double diameter_
Definition: CaConcBase.h:123
const double FaradayConst
Definition: consts.cpp:17
double thickness_
Definition: CaConcBase.h:122
double length_
Definition: CaConcBase.h:124
const double PI
Definition: consts.cpp:12
virtual void vSetB(const Eref &e, double val)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void CaConcBase::vCurrent ( const Eref e,
double  I 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by current().

+ Here is the caller graph for this function:

virtual void CaConcBase::vCurrentFraction ( const Eref e,
double  I,
double  fraction 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by currentFraction().

+ Here is the caller graph for this function:

virtual void CaConcBase::vDecrease ( const Eref e,
double  I 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by decrease().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetB ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getB().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetCa ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getCa().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetCaBasal ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getCaBasal().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetCeiling ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getCeiling().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetFloor ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getFloor().

+ Here is the caller graph for this function:

virtual double CaConcBase::vGetTau ( const Eref e) const
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by getTau().

+ Here is the caller graph for this function:

virtual void CaConcBase::vIncrease ( const Eref e,
double  I 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by increase().

+ Here is the caller graph for this function:

virtual void CaConcBase::vProcess ( const Eref ,
ProcPtr  info 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by process().

+ Here is the caller graph for this function:

virtual void CaConcBase::vReinit ( const Eref ,
ProcPtr  info 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by reinit().

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetB ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setB(), and updateDimensions().

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetCa ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setCa().

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetCaBasal ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setCaBasal().

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetCeiling ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setCeiling().

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetFloor ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setFloor().

+ Here is the caller graph for this function:

void CaConcBase::vSetSolver ( const Eref e,
Id  hsolve 
)
virtual

Used to set up the solver. Dummy for regular classes.

Reimplemented in ZombieCaConc.

Definition at line 339 of file CaConcBase.cpp.

Referenced by zombify().

340 {;}

+ Here is the caller graph for this function:

virtual void CaConcBase::vSetTau ( const Eref e,
double  val 
)
pure virtual

Implemented in CaConc, and ZombieCaConc.

Referenced by setTau().

+ Here is the caller graph for this function:

void CaConcBase::zombify ( Element orig,
const Cinfo zClass,
Id  hsolve 
)
static

Swaps Cinfos in order to make Zombies.

Definition at line 343 of file CaConcBase.cpp.

References Element::cinfo(), Eref::data(), getB(), getCa(), getCaBasal(), getCeiling(), getDiameter(), getFloor(), getLength(), getTau(), getThickness(), Element::localDataStart(), Element::numLocalData(), setB(), setCa(), setCaBasal(), setCeiling(), setDiameter(), setFloor(), setLength(), setTau(), setThickness(), vSetSolver(), and Element::zombieSwap().

Referenced by HSolve::unzombify(), and HSolve::zombify().

345 {
346  if ( orig->cinfo() == zClass )
347  return;
348  unsigned int start = orig->localDataStart();
349  unsigned int num = orig->numLocalData();
350  if ( num == 0 )
351  return;
352  vector< double > data( num * 9 );
353 
354  unsigned int j = 0;
355  for ( unsigned int i = 0; i < num; ++i ) {
356  Eref er( orig, i + start );
357  const CaConcBase* cb =
358  reinterpret_cast< const CaConcBase* >( er.data() );
359  data[j + 0] = cb->getCa( er );
360  data[j + 1] = cb->getCaBasal( er );
361  data[j + 2] = cb->getTau( er );
362  data[j + 3] = cb->getB( er );
363  data[j + 4] = cb->getCeiling( er );
364  data[j + 5] = cb->getFloor( er );
365  data[j + 6] = cb->getThickness( er );
366  data[j + 7] = cb->getLength( er );
367  data[j + 8] = cb->getDiameter( er );
368  j += 9;
369  }
370  orig->zombieSwap( zClass );
371  j = 0;
372  for ( unsigned int i = 0; i < num; ++i ) {
373  Eref er( orig, i + start );
374  CaConcBase* cb = reinterpret_cast< CaConcBase* >( er.data() );
375  cb->vSetSolver( er, hsolve );
376  cb->setCa( er, data[j + 0] );
377  cb->setCaBasal( er, data[j + 1] );
378  cb->setTau( er, data[j + 2] );
379  cb->setB( er, data[j + 3] );
380  cb->setCeiling( er, data[j + 4] );
381  cb->setFloor( er, data[j + 5] );
382  cb->setThickness( er, data[j + 6] );
383  cb->setLength( er, data[j + 7] );
384  cb->setDiameter( er, data[j + 8] );
385  j += 9; //was 7?
386  }
387 }
double getLength(const Eref &e) const
Definition: CaConcBase.cpp:294
void setDiameter(const Eref &e, double val)
Definition: CaConcBase.cpp:278
double getCa(const Eref &e) const
Definition: CaConcBase.cpp:207
double getThickness(const Eref &e) const
Definition: CaConcBase.cpp:273
virtual void vSetSolver(const Eref &e, Id hsolve)
Used to set up the solver. Dummy for regular classes.
Definition: CaConcBase.cpp:339
double getTau(const Eref &e) const
Definition: CaConcBase.cpp:225
void setTau(const Eref &e, double val)
Definition: CaConcBase.cpp:221
void setCa(const Eref &e, double val)
Definition: CaConcBase.cpp:203
virtual void zombieSwap(const Cinfo *zCinfo)
virtual func, this base version must be called by all derived classes
Definition: Element.cpp:159
double getDiameter(const Eref &e) const
Definition: CaConcBase.cpp:284
double getCaBasal(const Eref &e) const
Definition: CaConcBase.cpp:216
double getFloor(const Eref &e) const
Definition: CaConcBase.cpp:251
void setCaBasal(const Eref &e, double val)
Definition: CaConcBase.cpp:212
void setFloor(const Eref &e, double val)
Definition: CaConcBase.cpp:247
void setCeiling(const Eref &e, double val)
Definition: CaConcBase.cpp:238
void setLength(const Eref &e, double val)
Definition: CaConcBase.cpp:289
Definition: Eref.h:26
const Cinfo * cinfo() const
Definition: Element.cpp:66
virtual unsigned int localDataStart() const =0
Returns index of first data entry on this node.
virtual unsigned int numLocalData() const =0
Returns number of local data entries on this node.
double getCeiling(const Eref &e) const
Definition: CaConcBase.cpp:242
void setB(const Eref &e, double val)
Definition: CaConcBase.cpp:230
double getB(const Eref &e) const
Definition: CaConcBase.cpp:234
void setThickness(const Eref &e, double val)
Definition: CaConcBase.cpp:267

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double CaConcBase::diameter_
private

Definition at line 123 of file CaConcBase.h.

Referenced by getDiameter(), setDiameter(), and updateDimensions().

double CaConcBase::length_
private

Definition at line 124 of file CaConcBase.h.

Referenced by getLength(), setLength(), and updateDimensions().

double CaConcBase::thickness_
private

Definition at line 122 of file CaConcBase.h.

Referenced by getThickness(), setThickness(), and updateDimensions().


The documentation for this class was generated from the following files: