MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DifShellBase.cpp
Go to the documentation of this file.
1 /**********************************************************************
2  ** This program is part of 'MOOSE', the
3  ** Multiscale Object Oriented Simulation Environment.
4  ** copyright (C) 2003-2008
5  ** Upinder S. Bhalla, Niraj Dudani and NCBS
6  ** It is made available under the terms of the
7  ** GNU Lesser General Public License version 2.1
8  ** See the file COPYING.LIB for the full notice.
9  ****/
10 
11 #include "header.h"
12 #include "DifShellBase.h"
13 #include "ElementValueFinfo.h"
14 
16 {
17  static SrcFinfo1< double > concentrationOut("concentrationOut",
18  "Sends out concentration");
19  return &concentrationOut;
20 }
21 
23  static SrcFinfo2< double, double > sourceOut("innerDifSourceOut",
24  "Sends out source information.");
25  return &sourceOut;
26 }
27 
29  static SrcFinfo2< double, double > sourceOut("outerDifSourceOut",
30  "Sends out source information.");
31  return &sourceOut;
32 }
33 
35 {
36 
37  static DestFinfo process( "process",
38  "Handles process call",
40  static DestFinfo reinit( "reinit",
41  "Reinit happens only in stage 0",
43 
44  static Finfo* processShared[] = {
45  &process, &reinit
46  };
47 
48  static SharedFinfo proc(
49  "proc",
50  "Shared message to receive Process message from scheduler",
51  processShared, sizeof( processShared ) / sizeof( Finfo* ));
52 
53 
54 
55 
56  static DestFinfo reaction( "reaction",
57  "Here the DifShell receives reaction rates (forward and backward), and concentrations for the "
58  "free-buffer and bound-buffer molecules.",
60 
61  static Finfo* bufferShared[] = {
63  };
64 
65  static SharedFinfo buffer( "buffer",
66  "This is a shared message from a DifShell to a Buffer (FixBuffer or DifBuffer). " ,
67  bufferShared,
68  sizeof( bufferShared ) / sizeof( Finfo* ));
70 
71 
72 
73 
74  static DestFinfo fluxFromOut( "fluxFromOut",
75  "Destination message",
77 
78  static Finfo* innerDifShared[] = {
80  };
81  static SharedFinfo innerDif( "innerDif",
82  "This shared message (and the next) is between DifShells: adjoining shells exchange information to "
83  "find out the flux between them. "
84  "Using this message, an inner shell sends to, and receives from its outer shell." ,
85  innerDifShared,
86  sizeof( innerDifShared ) / sizeof( Finfo* ));
87 
88  static DestFinfo fluxFromIn( "fluxFromIn", "",
90 
91  static Finfo* outerDifShared[] = {
93  };
94 
95  static SharedFinfo outerDif( "outerDif",
96  "Using this message, an outer shell sends to, and receives from its inner shell." ,
97  outerDifShared,
98  sizeof( outerDifShared ) / sizeof( Finfo* ));
99 
101  "Concentration C",// is computed by the DifShell",
104  static ElementValueFinfo< DifShellBase, double> Ceq( "Ceq", "",
110  static ElementValueFinfo< DifShellBase, double> valence( "valence", "",
113  static ElementValueFinfo< DifShellBase, double> leak( "leak", "",
116  static ElementValueFinfo< DifShellBase, unsigned int> shapeMode( "shapeMode", "",
119  static ElementValueFinfo< DifShellBase, double> length( "length", "",
122  static ElementValueFinfo< DifShellBase, double> diameter( "diameter", "",
125  static ElementValueFinfo< DifShellBase, double> thickness( "thickness", "",
128  static ElementValueFinfo< DifShellBase, double> volume( "volume", "",
131  static ElementValueFinfo< DifShellBase, double> outerArea( "outerArea", "",
134  static ElementValueFinfo< DifShellBase, double> innerArea( "innerArea", "",
137 
138  static DestFinfo mmPump( "mmPump", "Here DifShell receives pump outflux",
140  static DestFinfo influx( "influx", "",
142  static DestFinfo outflux( "outflux", "",
144  static DestFinfo fInflux( "fInflux", "",
146  static DestFinfo fOutflux( "fOutflux", "",
148  static DestFinfo storeInflux( "storeInflux", "",
150  static DestFinfo storeOutflux( "storeOutflux", "",
152  static DestFinfo tauPump( "tauPump","",
154  static DestFinfo eqTauPump( "eqTauPump", "",
156  static DestFinfo hillPump( "hillPump", "",
158  static Finfo* difShellBaseFinfos[] = {
160  // Field definitions
162  &C,
163  &Ceq,
164  &D,
165  &valence,
166  &leak,
167  &shapeMode,
168  &length,
169  &diameter,
170  &thickness,
171  &volume,
172  &outerArea,
173  &innerArea,
175  // MsgSrc definitions
177 
179  // SharedFinfo definitions
181  &proc,
182  &buffer,
186  &innerDif,
187  &outerDif,
189  // DestFinfo definitions
191  &influx,
192  &outflux,
193  &fInflux,
194  &fOutflux,
195  &storeInflux,
196  &storeOutflux,
197  &tauPump,
198  &eqTauPump,
199  &mmPump,
200  &hillPump,
201  };
202 
203  static string doc[] =
204  {
205  "Name", "DifShellBase",
206  "Author", "Niraj Dudani. Ported to async13 by Subhasis Ray/Asia Jedrzejewska-Szmek",
207  "Description", "DifShell object: Models diffusion of an ion (typically calcium) within an "
208  "electric compartment. A DifShell is an iso-concentration region with respect to "
209  "the ion. Adjoining DifShells exchange flux of this ion, and also keep track of "
210  "changes in concentration due to pumping, buffering and channel currents, by "
211  "talking to the appropriate objects.",
212  };
213  static ZeroSizeDinfo< int > dinfo;
214  //static Dinfo< DifShellBase> dinfo;
215  static Cinfo difShellBaseCinfo(
216  "DifShellBase",
218  difShellBaseFinfos,
219  sizeof( difShellBaseFinfos ) / sizeof( Finfo* ),
220  &dinfo,
221  doc,
222  sizeof( doc ) / sizeof( string ));
223 
224  return &difShellBaseCinfo;
225 }
226 
227 //Cinfo *object* corresponding to the class.
229 
231 { ; }
232 
233 void DifShellBase::setC( const Eref& e, double C)
234 {
235  vSetC(e,C);
236 }
237 double DifShellBase::getC(const Eref& e) const
238 {
239  return vGetC(e);
240 }
241 
242 void DifShellBase::setCeq( const Eref& e, double Ceq )
243 {
244  vSetCeq(e,Ceq);
245 }
246 
247 double DifShellBase::getCeq(const Eref& e ) const
248 {
249  return vGetCeq(e);
250 }
251 
252 void DifShellBase::setD(const Eref& e, double D )
253 {
254  vSetD(e,D);
255 }
256 
257 double DifShellBase::getD(const Eref& e ) const
258 {
259  return vGetD(e);
260 }
261 
262 void DifShellBase::setValence(const Eref& e, double valence )
263 {
264  vSetValence(e,valence);
265 }
266 
267 double DifShellBase::getValence(const Eref& e ) const
268 {
269  return vGetValence(e);
270 }
271 
272 void DifShellBase::setLeak(const Eref& e, double leak )
273 {
274  vSetLeak(e,leak);
275 }
276 
277 double DifShellBase::getLeak(const Eref& e ) const
278 {
279  return vGetLeak(e);
280 }
281 
282 void DifShellBase::setShapeMode(const Eref& e, unsigned int shapeMode )
283 {
284  vSetShapeMode(e,shapeMode);
285 }
286 
287 unsigned int DifShellBase::getShapeMode(const Eref& e) const
288 {
289  return vGetShapeMode(e);
290 }
291 
292 void DifShellBase::setLength(const Eref& e, double length )
293 {
294  vSetLength(e,length);
295 }
296 
297 double DifShellBase::getLength(const Eref& e ) const
298 {
299  return vGetLength(e);
300 }
301 
302 void DifShellBase::setDiameter(const Eref& e, double diameter )
303 {
304  vSetDiameter(e,diameter);
305 }
306 
307 double DifShellBase::getDiameter(const Eref& e ) const
308 {
309  return vGetDiameter(e);
310 }
311 
312 void DifShellBase::setThickness( const Eref& e, double thickness )
313 {
314  vSetThickness(e,thickness);
315 }
316 
317 double DifShellBase::getThickness(const Eref& e) const
318 {
319  return vGetThickness(e);
320 }
321 
322 void DifShellBase::setVolume(const Eref& e, double volume )
323 {
324  vSetVolume(e,volume);
325 }
326 
327 double DifShellBase::getVolume(const Eref& e ) const
328 {
329  return vGetVolume(e);
330 }
331 
332 void DifShellBase::setOuterArea(const Eref& e, double outerArea )
333 {
334  vSetOuterArea(e,outerArea);
335 }
336 
337 double DifShellBase::getOuterArea(const Eref& e ) const
338 {
339  return vGetOuterArea(e);
340 }
341 
342 void DifShellBase::setInnerArea(const Eref& e, double innerArea )
343 {
344  vSetInnerArea(e,innerArea);
345 }
346 
347 double DifShellBase::getInnerArea(const Eref& e) const
348 {
349  return vGetInnerArea(e);
350 }
351 
353 // Dest functions
355 
356 void DifShellBase::reinit( const Eref& e, ProcPtr p )
357 {
358  vReinit( e, p );
359 }
360 
361 void DifShellBase::process( const Eref& e, ProcPtr p )
362 {
363  vProcess( e, p );
364 }
365 
367  const Eref& e,
368  double kf,
369  double kb,
370  double bFree,
371  double bBound )
372 {
373  vBuffer( e, kf, kb, bFree, bBound );
374 }
375 
377  double outerC,
378  double outerThickness )
379 {
380  vFluxFromOut(e, outerC, outerThickness );
381 }
382 
384  const Eref& e,
385  double innerC,
386  double innerThickness )
387 {
388  vFluxFromIn( e, innerC, innerThickness );
389 }
390 
392  double I )
393 {
394  vInflux( e, I );
395 }
396 
398  double I )
399 {
400  vOutflux(e, I );
401 }
402 
404  double I,
405  double fraction )
406 {
407  vFInflux(e, I, fraction );
408 }
409 
411  double I,
412  double fraction )
413 {
414  vFOutflux(e, I, fraction );
415 }
416 
418  double flux )
419 {
420  vStoreInflux( e, flux );
421 }
422 
424  double flux )
425 {
426  vStoreOutflux(e, flux );
427 }
428 
430  double kP,
431  double Ceq )
432 {
433  vTauPump( e, kP, Ceq );
434 }
435 
437  double kP )
438 {
439  vEqTauPump(e, kP );
440 }
441 
443  double vMax,
444  double Kd )
445 {
446  vMMPump(e, vMax, Kd );
447 }
448 
450  double vMax,
451  double Kd,
452  unsigned int hill )
453 {
454  vHillPump(e, vMax, Kd, hill );
455 }
void setLeak(const Eref &e, double leak)
virtual void vSetShapeMode(const Eref &e, unsigned int shapeMode)=0
static const Cinfo * initCinfo()
void setThickness(const Eref &e, double thickness)
virtual double vGetD(const Eref &e) const =0
virtual void vFOutflux(const Eref &e, double I, double fraction)=0
void buffer(const Eref &e, double kf, double kb, double bFree, double bBound)
void setOuterArea(const Eref &e, double outerArea)
virtual void vTauPump(const Eref &e, double kP, double Ceq)=0
double getLeak(const Eref &e) const
void setInnerArea(const Eref &e, double innerArea)
Definition: EpFunc.h:64
virtual void vStoreOutflux(const Eref &e, double flux)=0
void influx(const Eref &e, double I)
virtual void vSetInnerArea(const Eref &e, double innerArea)=0
double getInnerArea(const Eref &e) const
virtual void vMMPump(const Eref &e, double vMax, double Kd)=0
double getD(const Eref &e) const
virtual void vSetCeq(const Eref &e, double Ceq)=0
static const Cinfo * difShellBaseCinfo
virtual void vInflux(const Eref &e, double I)=0
virtual void vSetLeak(const Eref &e, double leak)=0
double getDiameter(const Eref &e) const
static SrcFinfo1< double > * concentrationOut()
double getLength(const Eref &e) const
void storeInflux(const Eref &e, double flux)
virtual double vGetC(const Eref &e) const =0
double getThickness(const Eref &e) const
void fOutflux(const Eref &e, double I, double fraction)
void setValence(const Eref &e, double valence)
Definition: EpFunc.h:95
virtual double vGetVolume(const Eref &e) const =0
double getValence(const Eref &e) const
void setVolume(const Eref &e, double volume)
virtual void vBuffer(const Eref &e, double kf, double kb, double bFree, double bBound)=0
virtual void vStoreInflux(const Eref &e, double flux)=0
virtual double vGetInnerArea(const Eref &e) const =0
void setCeq(const Eref &e, double Ceq)
void eqTauPump(const Eref &e, double kP)
void setC(const Eref &e, double C)
void fluxFromIn(const Eref &e, double innerC, double innerThickness)
virtual void vSetValence(const Eref &e, double valence)=0
virtual void vSetDiameter(const Eref &e, double diameter)=0
void hillPump(const Eref &e, double vMax, double Kd, unsigned int hill)
virtual double vGetLeak(const Eref &e) const =0
virtual void vHillPump(const Eref &e, double vMax, double Kd, unsigned int hill)=0
virtual void vFluxFromOut(const Eref &e, double outerC, double outerThickness)=0
virtual void vSetC(const Eref &e, double C)=0
void setShapeMode(const Eref &e, unsigned int shapeMode)
void process(const Eref &e, ProcPtr p)
void setDiameter(const Eref &e, double diameter)
static SrcFinfo2< double, double > * innerDifSourceOut()
double getC(const Eref &e) const
double getVolume(const Eref &e) const
Definition: Eref.h:26
virtual unsigned int vGetShapeMode(const Eref &e) const =0
void setLength(const Eref &e, double length)
void tauPump(const Eref &e, double kP, double Ceq)
virtual double vGetCeq(const Eref &e) const =0
virtual void vOutflux(const Eref &e, double I)=0
void outflux(const Eref &e, double I)
virtual double vGetValence(const Eref &e) const =0
virtual void vSetVolume(const Eref &e, double volume)=0
virtual double vGetThickness(const Eref &e) const =0
void mmPump(const Eref &e, double vMax, double Kd)
virtual void vSetOuterArea(const Eref &e, double outerArea)=0
virtual void vSetLength(const Eref &e, double length)=0
void reinit(const Eref &e, ProcPtr p)
void storeOutflux(const Eref &e, double flux)
virtual double vGetOuterArea(const Eref &e) const =0
void fluxFromOut(const Eref &e, double outerC, double outerThickness)
static SrcFinfo2< double, double > * outerDifSourceOut()
virtual void vFInflux(const Eref &e, double I, double fraction)=0
virtual void vSetD(const Eref &e, double D)=0
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
virtual void vFluxFromIn(const Eref &e, double innerC, double innerThickness)=0
virtual double vGetDiameter(const Eref &e) const =0
virtual void vReinit(const Eref &e, ProcPtr p)=0
double getOuterArea(const Eref &e) const
unsigned int getShapeMode(const Eref &e) const
double getCeq(const Eref &e) const
Definition: Cinfo.h:18
virtual void vProcess(const Eref &e, ProcPtr p)=0
virtual void vSetThickness(const Eref &e, double thickness)=0
virtual void vEqTauPump(const Eref &e, double kP)=0
virtual double vGetLength(const Eref &e) const =0
void setD(const Eref &e, double D)
Definition: EpFunc.h:79
Definition: Finfo.h:12
void fInflux(const Eref &e, double I, double fraction)