11 #include "../shell/Shell.h"
27 "Cell does not process at simulation time--"
28 "it only sets up the solver at reset.",
34 "Handles 'reinit' call: This triggers setting up the solver.",
39 static Finfo* processShared[] =
47 "This shared message exists only to receive a 'reinit' call, which is "
48 "taken as a trigger to create and set up HSolve.",
50 sizeof( processShared ) /
sizeof(
Finfo* )
68 "Specifies the integration method to be used for the neuron managed "
69 "by this Cell object.",
76 "Specifies which clock to use for the HSolve, if it is used.",
83 "Specifies name for the solver object.",
90 "Read-only field which tells if the current method is a variable "
97 "Read-only field which tells if the current method is an implicit "
104 "Read-only field giving a short description of the currently selected "
105 "integration method.",
109 static Finfo* cellFinfos[] =
122 static string doc[] =
125 "Author",
"Niraj Dudani, 2012, NCBS",
126 "Description",
"Container for a neuron's components. "
127 "Also manages automatic solver setup. "
128 "In case of solver setup, assumes that all the "
129 "compartments under this Cell belong to a single "
130 "neuron. If more than 1 group of axially "
131 "connected compartments are present, then only "
132 "one of them will be taken over by the solver.",
139 sizeof( cellFinfos ) /
sizeof(
Finfo* ),
144 "Exponential Euler.",
162 solverName_(
"_integ" ),
163 shell_( reinterpret_cast<
Shell* >(
Id().eref().data() ) )
170 const string& description,
189 cout <<
".. Cell::reinit()" << endl;
216 cout <<
"Cell::setup()" << endl;
217 cout <<
".... cell path: " << cell.
path() << endl;
222 Id solver( solverPath );
223 if ( solver.
path() == solverPath )
258 vector< vector< Id > > cstack;
263 cstack.push_back(
children( cell ) );
264 while ( !cstack.empty() )
266 const vector< Id >& child = cstack.back();
271 if ( !cstack.empty() )
272 cstack.back().pop_back();
276 dump(
"TODO",
"TODO: Commented out code. ");
277 Id curr = child.back();
282 if ( curr()->cinfo() == compartmentCinfo )
290 cstack.push_back(
children( curr ) );
301 ,
"Using 0 for parentMsgIndex in function call Shell::innerCreate"
302 "0 in first and third argument to NodeBalance. "
303 "I am not sure if I should be doing this here in this function."
318 map< string, MethodInfo >::iterator i =
methodMap_.find( value );
327 cerr <<
"Warning: Cell::setMethod(): method '" << value
328 <<
"' not known. Using '" <<
method_ <<
"'.\n";
void reinit(const Eref &e, ProcPtr p)
std::string path(const std::string &separator="/") const
static const Cinfo * find(const std::string &name)
static const Cinfo * compartmentCinfo
static map< string, MethodInfo > methodMap_
static void children(const Eref &e, vector< Id > &ret)
int getVariableDt() const
unsigned int solverClock_
void setSolverName(string value)
static vector< Id > children(Id obj)
static void addMethod(const string &name, const string &description, int isVariableDt, int isImplicit)
void setupSolver(Id cell, Id seed) const
static const Cinfo * cellCinfo
string getSolverName() const
unsigned int getSolverClock() const
void setSolverClock(unsigned int value)
void innerCreate(string type, ObjId parent, Id newElm, string name, const NodeBalance &nb, unsigned int parentMsgIndex)
static const Cinfo * initCinfo()
static const Cinfo * initCinfo()
void processDummy(const Eref &e, ProcPtr p)
static Id findCompt(Id cell)
void setMethod(string value)
string getDescription() const