MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Cell.h
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-2011 Upinder S. Bhalla, Niraj Dudani and NCBS
5  ** It is made available under the terms of the
6  ** GNU Lesser General Public License version 2.1
7  ** See the file COPYING.LIB for the full notice.
8  **********************************************************************/
9 
10 #ifndef _CELL_H
11 #define _CELL_H
12 
13 class Cell
14 {
15 private:
16  struct MethodInfo
17  {
19  {
20  ;
21  }
22 
23  MethodInfo( string v1, int v2, int v3 ):
24  description( v1 ),
25  isVariableDt( v2 ),
26  isImplicit( v3 )
27  {
28  ;
29  }
30 
31  string description;
34  };
35 
36 public:
37  Cell();
38 
39  void setupf( Id cell );
40  Id getSetup() const;
41 
42  void setMethod( string value );
43  string getMethod() const;
44 
45  void setSolverClock( unsigned int value );
46  unsigned int getSolverClock() const;
47 
48  void setSolverName( string value );
49  string getSolverName() const;
50 
51  // Some readonly fields with more info about the methods.
52  int getVariableDt() const;
53  int getImplicit() const;
54  string getDescription() const;
55 
56  void processDummy( const Eref& e, ProcPtr p );
57  void reinit( const Eref& e, ProcPtr p );
58  //~ void reinit( const Eref& e, const Qinfo* q );
59 
60  static void addMethod(
61  const string& name,
62  const string& description,
63  int isVariableDt,
64  int isImplicit );
65 
66  static const Cinfo* initCinfo();
67 
68 private:
69  void setupSolver( Id cell, Id seed ) const;
70 
71  string method_;
72  unsigned int solverClock_;
73  string solverName_;
75 
76  static vector< Id > children( Id obj );
77  static Id findCompt( Id cell );
78 
79  static map< string, MethodInfo > methodMap_;
80 };
81 
82 #endif // _CELL_H
uint32_t value
Definition: moosemodule.h:42
Definition: Cell.h:13
void reinit(const Eref &e, ProcPtr p)
Definition: Cell.cpp:186
void setupf(Id cell)
Definition: Cell.cpp:214
MethodInfo(string v1, int v2, int v3)
Definition: Cell.h:23
Shell * shell_
Definition: Cell.h:74
string description
Definition: Cell.h:31
static map< string, MethodInfo > methodMap_
Definition: Cell.h:79
int getVariableDt() const
Definition: Cell.cpp:358
unsigned int solverClock_
Definition: Cell.h:72
void setSolverName(string value)
Definition: Cell.cpp:348
string solverName_
Definition: Cell.h:73
int isImplicit
Definition: Cell.h:33
string getMethod() const
Definition: Cell.cpp:333
int isVariableDt
Definition: Cell.h:32
static vector< Id > children(Id obj)
Definition: Cell.cpp:237
Definition: Eref.h:26
static void addMethod(const string &name, const string &description, int isVariableDt, int isImplicit)
Definition: Cell.cpp:168
void setupSolver(Id cell, Id seed) const
Definition: Cell.cpp:297
string getSolverName() const
Definition: Cell.cpp:353
static char name[]
Definition: mfield.cpp:401
unsigned int getSolverClock() const
Definition: Cell.cpp:343
int getImplicit() const
Definition: Cell.cpp:363
Definition: Id.h:17
string method_
Definition: Cell.h:71
void setSolverClock(unsigned int value)
Definition: Cell.cpp:338
static const Cinfo * initCinfo()
Definition: Cell.cpp:23
void processDummy(const Eref &e, ProcPtr p)
Definition: Cell.cpp:181
static Id findCompt(Id cell)
Definition: Cell.cpp:252
Cell()
Definition: Cell.cpp:159
Id getSetup() const
Definition: Cell.cpp:210
Definition: Cinfo.h:18
void setMethod(string value)
Definition: Cell.cpp:316
Definition: Shell.h:43
string getDescription() const
Definition: Cell.cpp:368