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

#include <PoolBase.h>

+ Inheritance diagram for PoolBase:
+ Collaboration diagram for PoolBase:

Public Member Functions

void decrement (double val)
 
double getConc (const Eref &e) const
 
double getConcInit (const Eref &e) const
 
double getDiffConst (const Eref &e) const
 
bool getIsBuffered (const Eref &e) const
 
double getMotorConst (const Eref &e) const
 
double getN (const Eref &e) const
 
double getNinit (const Eref &e) const
 
SpeciesId getSpecies (const Eref &e) const
 
double getVolume (const Eref &e) const
 
void handleMolWt (const Eref &e, double v)
 
void increment (double val)
 
void nIn (double val)
 
 PoolBase ()
 
void process (const Eref &e, ProcPtr p)
 
void reac (double A, double B)
 
void reinit (const Eref &e, ProcPtr p)
 
void setConc (const Eref &e, double v)
 
void setConcInit (const Eref &e, double v)
 
void setDiffConst (const Eref &e, double v)
 
void setIsBuffered (const Eref &e, bool v)
 
void setMotorConst (const Eref &e, double v)
 
void setN (const Eref &e, double v)
 
void setNinit (const Eref &e, double v)
 
void setSpecies (const Eref &e, SpeciesId v)
 
void setVolume (const Eref &e, double v)
 
virtual void vDecrement (double val)
 
virtual double vGetConc (const Eref &e) const =0
 
virtual double vGetConcInit (const Eref &e) const
 
virtual double vGetDiffConst (const Eref &e) const =0
 
virtual bool vGetIsBuffered (const Eref &e) const =0
 
virtual double vGetMotorConst (const Eref &e) const
 
virtual double vGetN (const Eref &e) const =0
 
virtual double vGetNinit (const Eref &e) const =0
 
virtual SpeciesId vGetSpecies (const Eref &e) const =0
 
virtual double vGetVolume (const Eref &e) const =0
 
virtual void vHandleMolWt (const Eref &e, double v)
 
virtual void vIncrement (double val)
 
virtual void vnIn (double val)
 
virtual void vProcess (const Eref &e, ProcPtr p)
 
virtual void vReac (double A, double B)
 
virtual void vReinit (const Eref &e, ProcPtr p)
 
virtual void vSetConc (const Eref &e, double v)=0
 
virtual void vSetConcInit (const Eref &e, double v)=0
 
virtual void vSetDiffConst (const Eref &e, double v)=0
 
virtual void vSetIsBuffered (const Eref &e, bool v)
 I put in a default empty function for vSetIsBuffered. More...
 
virtual void vSetMotorConst (const Eref &e, double v)
 Dummy MotorConst field for most Pool subclasses. More...
 
virtual void vSetN (const Eref &e, double v)=0
 
virtual void vSetNinit (const Eref &e, double v)=0
 
virtual void vSetSolver (Id ksolve, Id dsolve)
 
virtual void vSetSpecies (const Eref &e, SpeciesId v)=0
 
virtual void vSetVolume (const Eref &e, double v)=0
 
virtual ~PoolBase ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
static void zombify (Element *original, const Cinfo *zClass, Id ksolve, Id dsolve)
 

Private Attributes

double concInit_
 

Friends

void checkVal (double time, const PoolBase *m, unsigned int size)
 
void forceCheckVal (double time, Element *e, unsigned int size)
 
void testSyncArray (unsigned int size, unsigned int numThreads, unsigned int method)
 

Detailed Description

The PoolBase class is the base class for molecular pools. A pool is a set of molecules of a given species, in a uniform chemical context. Note that the same species might be present in other compartments, or be handled by other solvers. PoolBase is the base class for mass-action, single particle and other numerical variants of pools.

Definition at line 30 of file PoolBase.h.

Constructor & Destructor Documentation

PoolBase::PoolBase ( )

Definition at line 228 of file PoolBase.cpp.

229  : concInit_( 0.0 )
230 {;}
double concInit_
Definition: PoolBase.h:157
PoolBase::~PoolBase ( )
virtual

Definition at line 232 of file PoolBase.cpp.

233 {;}

Member Function Documentation

void PoolBase::decrement ( double  val)

Definition at line 254 of file PoolBase.cpp.

References vDecrement().

Referenced by initCinfo().

255 {
256  vDecrement( val );
257 }
virtual void vDecrement(double val)
Definition: PoolBase.cpp:293

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getConc ( const Eref e) const

Definition at line 331 of file PoolBase.cpp.

References vGetConc().

Referenced by initCinfo().

332 {
333  return vGetConc( e );
334 }
virtual double vGetConc(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getConcInit ( const Eref e) const

Definition at line 347 of file PoolBase.cpp.

References vGetConcInit().

Referenced by initCinfo(), and zombify().

348 {
349  // return concInit_;
350  return vGetConcInit( e );
351 }
virtual double vGetConcInit(const Eref &e) const
Definition: PoolBase.cpp:342

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getDiffConst ( const Eref e) const

Definition at line 358 of file PoolBase.cpp.

References vGetDiffConst().

Referenced by initCinfo(), Dsolve::setStoich(), and zombify().

359 {
360  return vGetDiffConst( e );
361 }
virtual double vGetDiffConst(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool PoolBase::getIsBuffered ( const Eref e) const

Definition at line 401 of file PoolBase.cpp.

References vGetIsBuffered().

Referenced by initCinfo().

402 {
403  return vGetIsBuffered( e );
404 }
virtual bool vGetIsBuffered(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getMotorConst ( const Eref e) const

Definition at line 368 of file PoolBase.cpp.

References vGetMotorConst().

Referenced by initCinfo(), and zombify().

369 {
370  return vGetMotorConst( e );
371 }
virtual double vGetMotorConst(const Eref &e) const
Definition: PoolBase.cpp:414

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getN ( const Eref e) const

Definition at line 308 of file PoolBase.cpp.

References vGetN().

Referenced by initCinfo().

309 {
310  return vGetN( e );
311 }
virtual double vGetN(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getNinit ( const Eref e) const

Definition at line 319 of file PoolBase.cpp.

References vGetNinit().

Referenced by initCinfo(), and Pool::vReinit().

320 {
321  return vGetNinit( e );
322 }
virtual double vGetNinit(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int PoolBase::getSpecies ( const Eref e) const

Definition at line 388 of file PoolBase.cpp.

References vGetSpecies().

Referenced by initCinfo(), and zombify().

389 {
390  return vGetSpecies( e );
391 }
virtual SpeciesId vGetSpecies(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double PoolBase::getVolume ( const Eref e) const

Definition at line 378 of file PoolBase.cpp.

References vGetVolume().

Referenced by initCinfo().

379 {
380  return vGetVolume( e );
381 }
virtual double vGetVolume(const Eref &e) const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::handleMolWt ( const Eref e,
double  v 
)

Definition at line 269 of file PoolBase.cpp.

References vHandleMolWt().

Referenced by initCinfo().

270 {
271  vHandleMolWt( e, v );
272 }
virtual void vHandleMolWt(const Eref &e, double v)
Definition: PoolBase.cpp:287

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::increment ( double  val)

Definition at line 249 of file PoolBase.cpp.

References vIncrement().

Referenced by initCinfo().

250 {
251  vIncrement(val);
252 }
virtual void vIncrement(double val)
Definition: PoolBase.cpp:290

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const Cinfo * PoolBase::initCinfo ( )
static

Definition at line 19 of file PoolBase.cpp.

References decrement(), getConc(), getConcInit(), getDiffConst(), getIsBuffered(), getMotorConst(), getN(), getNinit(), getSpecies(), getVolume(), handleMolWt(), increment(), Neutral::initCinfo(), nIn(), nOut, poolCinfo, process(), reac(), reinit(), setConc(), setConcInit(), setDiffConst(), setIsBuffered(), setMotorConst(), setN(), setNinit(), setSpecies(), and setVolume().

Referenced by getSlaveEnable(), ZombiePool::initCinfo(), and Pool::initCinfo().

20 {
22  // Field Definitions
25  "n",
26  "Number of molecules in pool",
29  );
30 
32  "nInit",
33  "Initial value of number of molecules in pool",
36  );
37 
39  "diffConst",
40  "Diffusion constant of molecule",
43  );
44 
45  static ElementValueFinfo< PoolBase, double > motorConst(
46  "motorConst",
47  "Motor transport rate molecule. + is away from soma, - is "
48  "towards soma. Only relevant for ZombiePool subclasses.",
51  );
52 
54  "conc",
55  "Concentration of molecules in this pool",
58  );
59 
61  "concInit",
62  "Initial value of molecular concentration in pool",
65  );
66 
68  "volume",
69  "Volume of compartment. Units are SI. "
70  "Utility field, the actual volume info is "
71  "stored on a volume mesh entry in the parent compartment."
72  "This mapping is implicit: the parent compartment must be "
73  "somewhere up the element tree, and must have matching mesh "
74  "entries. If the compartment isn't"
75  "available the volume is just taken as 1",
78  );
79 
81  "speciesId",
82  "Species identifier for this mol pool. Eventually link to ontology.",
85  );
86 
87  static ElementValueFinfo< PoolBase, bool > isBuffered(
88  "isBuffered",
89  "Flag: True if Pool is buffered. "
90  "In the case of Pool and BufPool the field can be assigned, to "
91  "change the type of the Pool object to BufPool, or vice versa. "
92  "None of the messages are affected. "
93  "This object class flip can only be done in the non-zombified "
94  "form of the Pool/BufPool. In Zombies it is read-only.",
97  );
98 
100  // MsgDest Definitions
102  static DestFinfo process( "process",
103  "Handles process call",
105  static DestFinfo reinit( "reinit",
106  "Handles reinit call",
108 
109  static DestFinfo reacDest( "reacDest",
110  "Handles reaction input",
112  );
113 
114  static DestFinfo handleMolWt( "handleMolWt",
115  "Separate finfo to assign molWt, and consequently diffusion const."
116  "Should only be used in SharedMsg with species.",
118  );
120  // MsgDest Definitions: These three are used for non-reaction
121  // calculations involving algebraically defined rate terms.
123  static DestFinfo increment( "increment",
124  "Increments mol numbers by specified amount. Can be +ve or -ve",
126  );
127 
128  static DestFinfo decrement( "decrement",
129  "Decrements mol numbers by specified amount. Can be +ve or -ve",
131  );
132 
133  static DestFinfo nIn( "nIn",
134  "Assigns the number of molecules in Pool to specified value",
136  );
137 
139  // SrcFinfo Definitions
141 
142  static SrcFinfo1< double > nOut(
143  "nOut",
144  "Sends out # of molecules in pool on each timestep"
145  );
146 
147  static SrcFinfo0 requestMolWt(
148  "requestMolWt",
149  "Requests Species object for mol wt"
150  );
151 
153  // SharedMsg Definitions
155  static Finfo* reacShared[] =
156  {
157  &reacDest, &nOut
158  };
159  static SharedFinfo reac( "reac",
160  "Connects to reaction",
161  reacShared, sizeof( reacShared ) / sizeof( const Finfo* )
162  );
163  static Finfo* procShared[] =
164  {
165  &process, &reinit
166  };
167  static SharedFinfo proc( "proc",
168  "Shared message for process and reinit",
169  procShared, sizeof( procShared ) / sizeof( const Finfo* )
170  );
171 
172  static Finfo* speciesShared[] =
173  {
174  &requestMolWt, &handleMolWt
175  };
176 
177  static SharedFinfo species( "species",
178  "Shared message for connecting to species objects",
179  speciesShared, sizeof( speciesShared ) / sizeof ( const Finfo* )
180  );
181 
182  static Finfo* poolFinfos[] =
183  {
184  &n, // Value
185  &nInit, // Value
186  &diffConst, // Value
187  &motorConst, // Value
188  &conc, // Value
189  &concInit, // Value
190  &volume, // Readonly Value
191  &speciesId, // Value
192  &isBuffered, // Value
193  &increment, // DestFinfo
194  &decrement, // DestFinfo
195  &nIn, // DestFinfo
196  &reac, // SharedFinfo
197  &proc, // SharedFinfo
198  &species, // SharedFinfo
199  };
200 
201  static string doc[] =
202  {
203  "Name", "PoolBase",
204  "Author", "Upi Bhalla",
205  "Description", "Abstract base class for pools."
206  };
207  static ZeroSizeDinfo< int > dinfo;
208  static Cinfo poolCinfo (
209  "PoolBase",
211  poolFinfos,
212  sizeof( poolFinfos ) / sizeof ( Finfo* ),
213  &dinfo,
214  doc,
215  sizeof( doc )/sizeof( string ),
216  true // Ban creation as this is an abstract base class.
217  );
218 
219  return &poolCinfo;
220 }
void setVolume(const Eref &e, double v)
Definition: PoolBase.cpp:373
SpeciesId getSpecies(const Eref &e) const
Definition: PoolBase.cpp:388
void handleMolWt(const Eref &e, double v)
Definition: PoolBase.cpp:269
void setConc(const Eref &e, double v)
Definition: PoolBase.cpp:325
Definition: EpFunc.h:64
void setConcInit(const Eref &e, double v)
Definition: PoolBase.cpp:336
double getMotorConst(const Eref &e) const
Definition: PoolBase.cpp:368
void setDiffConst(const Eref &e, double v)
Definition: PoolBase.cpp:353
Definition: OpFunc.h:40
double getConc(const Eref &e) const
Definition: PoolBase.cpp:331
void nIn(double val)
Definition: PoolBase.cpp:259
void setNinit(const Eref &e, double v)
Definition: PoolBase.cpp:313
double getVolume(const Eref &e) const
Definition: PoolBase.cpp:378
void reinit(const Eref &e, ProcPtr p)
Definition: PoolBase.cpp:244
Definition: OpFunc.h:27
const SrcFinfo1< double > & nOut
Definition: Pool.cpp:49
void decrement(double val)
Definition: PoolBase.cpp:254
void setIsBuffered(const Eref &e, bool v)
Definition: PoolBase.cpp:396
double getConcInit(const Eref &e) const
Definition: PoolBase.cpp:347
void increment(double val)
Definition: PoolBase.cpp:249
void setMotorConst(const Eref &e, double v)
Definition: PoolBase.cpp:363
void reac(double A, double B)
Definition: PoolBase.cpp:264
static const Cinfo * poolCinfo
Definition: PoolBase.cpp:225
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
double getNinit(const Eref &e) const
Definition: PoolBase.cpp:319
bool getIsBuffered(const Eref &e) const
Definition: PoolBase.cpp:401
double getDiffConst(const Eref &e) const
Definition: PoolBase.cpp:358
Definition: Cinfo.h:18
double getN(const Eref &e) const
Definition: PoolBase.cpp:308
void process(const Eref &e, ProcPtr p)
Definition: PoolBase.cpp:239
void setSpecies(const Eref &e, SpeciesId v)
Definition: PoolBase.cpp:383
void setN(const Eref &e, double v)
Definition: PoolBase.cpp:303
Definition: Finfo.h:12

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::nIn ( double  val)

Definition at line 259 of file PoolBase.cpp.

References vnIn().

Referenced by initCinfo().

260 {
261  vnIn(val);
262 }
virtual void vnIn(double val)
Definition: PoolBase.cpp:296

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::process ( const Eref e,
ProcPtr  p 
)

Definition at line 239 of file PoolBase.cpp.

References vProcess().

Referenced by initCinfo().

240 {
241  vProcess( e, p );
242 }
virtual void vProcess(const Eref &e, ProcPtr p)
Definition: PoolBase.cpp:278

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::reac ( double  A,
double  B 
)

Definition at line 264 of file PoolBase.cpp.

References vReac().

Referenced by initCinfo().

265 {
266  vReac( A, B );
267 }
virtual void vReac(double A, double B)
Definition: PoolBase.cpp:284

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::reinit ( const Eref e,
ProcPtr  p 
)

Definition at line 244 of file PoolBase.cpp.

References vReinit().

Referenced by initCinfo().

245 {
246  vReinit( e, p );
247 }
virtual void vReinit(const Eref &e, ProcPtr p)
Definition: PoolBase.cpp:281

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setConc ( const Eref e,
double  v 
)

Definition at line 325 of file PoolBase.cpp.

References vSetConc().

Referenced by initCinfo().

326 {
327  vSetConc( e, c );
328 }
virtual void vSetConc(const Eref &e, double v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setConcInit ( const Eref e,
double  v 
)

Definition at line 336 of file PoolBase.cpp.

References concInit_, and vSetConcInit().

Referenced by initCinfo(), and zombify().

337 {
338  concInit_ = c;
339  vSetConcInit( e, c );
340 }
double concInit_
Definition: PoolBase.h:157
virtual void vSetConcInit(const Eref &e, double v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setDiffConst ( const Eref e,
double  v 
)

Definition at line 353 of file PoolBase.cpp.

References vSetDiffConst().

Referenced by initCinfo(), and zombify().

354 {
355  vSetDiffConst( e, v );
356 }
virtual void vSetDiffConst(const Eref &e, double v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setIsBuffered ( const Eref e,
bool  v 
)

Functions to examine and change class between Pool and BufPool.

setIsBuffered is active only for Pool and BufPool. Otherwise ignored.

Definition at line 396 of file PoolBase.cpp.

References vSetIsBuffered().

Referenced by initCinfo().

397 {
398  vSetIsBuffered( e, v );
399 }
virtual void vSetIsBuffered(const Eref &e, bool v)
I put in a default empty function for vSetIsBuffered.
Definition: PoolBase.cpp:420

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setMotorConst ( const Eref e,
double  v 
)

Definition at line 363 of file PoolBase.cpp.

References vSetMotorConst().

Referenced by initCinfo(), and zombify().

364 {
365  vSetMotorConst( e, v );
366 }
virtual void vSetMotorConst(const Eref &e, double v)
Dummy MotorConst field for most Pool subclasses.
Definition: PoolBase.cpp:411

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setN ( const Eref e,
double  v 
)

Definition at line 303 of file PoolBase.cpp.

References vSetN().

Referenced by initCinfo().

304 {
305  vSetN( e, v );
306 }
virtual void vSetN(const Eref &e, double v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setNinit ( const Eref e,
double  v 
)

Definition at line 313 of file PoolBase.cpp.

References concInit_, lookupVolumeFromMesh(), NA, and vSetNinit().

Referenced by initCinfo().

314 {
315  concInit_ = v / ( NA * lookupVolumeFromMesh( e ) );
316  vSetNinit( e, v );
317 }
const double NA
Definition: consts.cpp:15
double concInit_
Definition: PoolBase.h:157
virtual void vSetNinit(const Eref &e, double v)=0
double lookupVolumeFromMesh(const Eref &e)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setSpecies ( const Eref e,
SpeciesId  v 
)

Definition at line 383 of file PoolBase.cpp.

References vSetSpecies().

Referenced by initCinfo(), and zombify().

384 {
385  vSetSpecies( e, v );
386 }
virtual void vSetSpecies(const Eref &e, SpeciesId v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::setVolume ( const Eref e,
double  v 
)

Volume is usually volume, but we also permit areal density This is obtained by looking up the corresponding spatial mesh entry in the parent compartment. If the message isn't set then it defaults to 1.0.

Definition at line 373 of file PoolBase.cpp.

References vSetVolume().

Referenced by initCinfo().

374 {
375  vSetVolume( e, v );
376 }
virtual void vSetVolume(const Eref &e, double v)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PoolBase::vDecrement ( double  val)
virtual

Reimplemented in Pool.

Definition at line 293 of file PoolBase.cpp.

Referenced by decrement().

294 {;}

+ Here is the caller graph for this function:

virtual double PoolBase::vGetConc ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getConc().

+ Here is the caller graph for this function:

double PoolBase::vGetConcInit ( const Eref e) const
virtual

Reimplemented in ZombiePool.

Definition at line 342 of file PoolBase.cpp.

References concInit_.

Referenced by getConcInit().

343 {
344  return concInit_;
345 }
double concInit_
Definition: PoolBase.h:157

+ Here is the caller graph for this function:

virtual double PoolBase::vGetDiffConst ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getDiffConst().

+ Here is the caller graph for this function:

virtual bool PoolBase::vGetIsBuffered ( const Eref e) const
pure virtual

Implemented in Pool, ZombiePool, and ZombieBufPool.

Referenced by getIsBuffered().

+ Here is the caller graph for this function:

double PoolBase::vGetMotorConst ( const Eref e) const
virtual

Reimplemented in ZombiePool, and Pool.

Definition at line 414 of file PoolBase.cpp.

Referenced by getMotorConst().

415 {
416  return 0.0;
417 }

+ Here is the caller graph for this function:

virtual double PoolBase::vGetN ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getN().

+ Here is the caller graph for this function:

virtual double PoolBase::vGetNinit ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getNinit().

+ Here is the caller graph for this function:

virtual SpeciesId PoolBase::vGetSpecies ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getSpecies().

+ Here is the caller graph for this function:

virtual double PoolBase::vGetVolume ( const Eref e) const
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by getVolume().

+ Here is the caller graph for this function:

void PoolBase::vHandleMolWt ( const Eref e,
double  v 
)
virtual

Reimplemented in Pool.

Definition at line 287 of file PoolBase.cpp.

Referenced by handleMolWt().

288 {;}

+ Here is the caller graph for this function:

void PoolBase::vIncrement ( double  val)
virtual

Reimplemented in Pool.

Definition at line 290 of file PoolBase.cpp.

Referenced by increment().

291 {;}

+ Here is the caller graph for this function:

void PoolBase::vnIn ( double  val)
virtual

Reimplemented in Pool.

Definition at line 296 of file PoolBase.cpp.

Referenced by nIn().

297 {;}

+ Here is the caller graph for this function:

void PoolBase::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

Reimplemented in Pool, and BufPool.

Definition at line 278 of file PoolBase.cpp.

Referenced by process().

279 {;}

+ Here is the caller graph for this function:

void PoolBase::vReac ( double  A,
double  B 
)
virtual

Reimplemented in Pool.

Definition at line 284 of file PoolBase.cpp.

Referenced by reac().

285 {;}

+ Here is the caller graph for this function:

void PoolBase::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

Reimplemented in Pool, and BufPool.

Definition at line 281 of file PoolBase.cpp.

Referenced by reinit().

282 {;}

+ Here is the caller graph for this function:

virtual void PoolBase::vSetConc ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, ZombiePool, BufPool, and ZombieBufPool.

Referenced by setConc().

+ Here is the caller graph for this function:

virtual void PoolBase::vSetConcInit ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, ZombiePool, BufPool, and ZombieBufPool.

Referenced by setConcInit().

+ Here is the caller graph for this function:

virtual void PoolBase::vSetDiffConst ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by setDiffConst().

+ Here is the caller graph for this function:

void PoolBase::vSetIsBuffered ( const Eref e,
bool  v 
)
virtual

I put in a default empty function for vSetIsBuffered.

Dummy default function for most pool subclasses.

Reimplemented in Pool.

Definition at line 420 of file PoolBase.cpp.

Referenced by setIsBuffered().

421 {;}

+ Here is the caller graph for this function:

void PoolBase::vSetMotorConst ( const Eref e,
double  v 
)
virtual

Dummy MotorConst field for most Pool subclasses.

Reimplemented in ZombiePool, and Pool.

Definition at line 411 of file PoolBase.cpp.

Referenced by setMotorConst().

412 {;}

+ Here is the caller graph for this function:

virtual void PoolBase::vSetN ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, ZombiePool, BufPool, and ZombieBufPool.

Referenced by setN().

+ Here is the caller graph for this function:

virtual void PoolBase::vSetNinit ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, ZombiePool, BufPool, and ZombieBufPool.

Referenced by setNinit().

+ Here is the caller graph for this function:

void PoolBase::vSetSolver ( Id  ksolve,
Id  dsolve 
)
virtual

Assign whatever info is needed by the zombie based on the solver Element. Encapsulates some unpleasant field extraction, casting, and assignment. Default version of this function does nothing.

Reimplemented in ZombiePool.

Definition at line 467 of file PoolBase.cpp.

Referenced by zombify().

468 {
469  ;
470 }

+ Here is the caller graph for this function:

virtual void PoolBase::vSetSpecies ( const Eref e,
SpeciesId  v 
)
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by setSpecies().

+ Here is the caller graph for this function:

virtual void PoolBase::vSetVolume ( const Eref e,
double  v 
)
pure virtual

Implemented in Pool, and ZombiePool.

Referenced by setVolume().

+ Here is the caller graph for this function:

void PoolBase::zombify ( Element original,
const Cinfo zClass,
Id  ksolve,
Id  dsolve 
)
static

zombify is the base function for conversion between pool subclasses. This can be overridden, but should work for most things. This takes the original Element, and without touching its messaging, replaces it with a new data object of the specified zClass. It does the best it can with conversion of fields. Typically needs to be followed by rescheduling and possibly a class-specific function for assigning further zombie fields outside the ken of the PoolBase. The 'solver' argument specifies which objects handle the solver for this conversion. For the Pool this is either or both of a kinetic solver /ksolve/ and a diffusion solver /dsolve/. The term zombie arises because this operation was originally carried out to strip an object of independent function, and replace it with a solver-controlled facsimile.

Definition at line 430 of file PoolBase.cpp.

References Element::cinfo(), Eref::data(), getConcInit(), getDiffConst(), getMotorConst(), getSpecies(), Element::localDataStart(), Element::numLocalData(), setConcInit(), setDiffConst(), setMotorConst(), setSpecies(), vSetSolver(), and Element::zombieSwap().

Referenced by Dsolve::setPath(), Stoich::unZombifyPools(), and Stoich::zombifyModel().

432 {
433  if ( orig->cinfo() == zClass )
434  return;
435  unsigned int start = orig->localDataStart();
436  unsigned int num = orig->numLocalData();
437  if ( num == 0 )
438  return;
439  vector< unsigned int > species( num, 0 );
440  vector< double > concInit( num, 0.0 );
441  vector< double > diffConst( num, 0.0 );
442  vector< double > motorConst( num, 0.0 );
443  for ( unsigned int i = 0; i < num; ++i )
444  {
445  Eref er( orig, i + start );
446  const PoolBase* pb =
447  reinterpret_cast< const PoolBase* >( er.data() );
448  species[ i ] = pb->getSpecies( er );
449  concInit[ i ] = pb->getConcInit( er );
450  diffConst[ i ] = pb->getDiffConst( er );
451  motorConst[ i ] = pb->getMotorConst( er );
452  }
453  orig->zombieSwap( zClass );
454  for ( unsigned int i = 0; i < num; ++i )
455  {
456  Eref er( orig, i + start );
457  PoolBase* pb = reinterpret_cast< PoolBase* >( er.data() );
458  pb->vSetSolver( ksolve, dsolve );
459  pb->setSpecies( er, species[i] );
460  pb->setConcInit( er, concInit[i] );
461  pb->setDiffConst( er, diffConst[i] );
462  pb->setMotorConst( er, motorConst[i] );
463  }
464 }
SpeciesId getSpecies(const Eref &e) const
Definition: PoolBase.cpp:388
void setConcInit(const Eref &e, double v)
Definition: PoolBase.cpp:336
double getMotorConst(const Eref &e) const
Definition: PoolBase.cpp:368
void setDiffConst(const Eref &e, double v)
Definition: PoolBase.cpp:353
Definition: Eref.h:26
double getConcInit(const Eref &e) const
Definition: PoolBase.cpp:347
void setMotorConst(const Eref &e, double v)
Definition: PoolBase.cpp:363
double getDiffConst(const Eref &e) const
Definition: PoolBase.cpp:358
virtual void vSetSolver(Id ksolve, Id dsolve)
Definition: PoolBase.cpp:467
void setSpecies(const Eref &e, SpeciesId v)
Definition: PoolBase.cpp:383

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

void checkVal ( double  time,
const PoolBase m,
unsigned int  size 
)
friend
void forceCheckVal ( double  time,
Element e,
unsigned int  size 
)
friend
void testSyncArray ( unsigned int  size,
unsigned int  numThreads,
unsigned int  method 
)
friend

Member Data Documentation

double PoolBase::concInit_
private

Definition at line 157 of file PoolBase.h.

Referenced by setConcInit(), setNinit(), and vGetConcInit().


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