#include <Neutral.h>
Public Member Functions | |
Neutral () | |
void | setThis (Neutral v) |
Neutral | getThis () const |
void | setName (const Eref &e, string name) |
string | getName (const Eref &e) const |
vector< ObjId > | getOutgoingMsgs (const Eref &e) const |
vector< ObjId > | getIncomingMsgs (const Eref &e) const |
vector< Id > | getNeighbors (const Eref &e, string field) const |
vector< ObjId > | getMsgDests (const Eref &e, string src) const |
vector< string > | getMsgDestFunctions (const Eref &e, string src) const |
ObjId | getObjId (const Eref &e) const |
ObjId | getParent (const Eref &e) const |
vector< Id > | getChildren (const Eref &e) const |
unsigned int | buildTree (const Eref &e, vector< Id > &tree) const |
string | getPath (const Eref &e) const |
string | getClass (const Eref &e) const |
void | setNumData (const Eref &e, unsigned int num) |
unsigned int | getNumData (const Eref &e) const |
void | setNumField (const Eref &e, unsigned int num) |
unsigned int | getNumField (const Eref &e) const |
void | setTick (const Eref &e, int num) |
int | getTick (const Eref &e) const |
Returns clock tick of this object. | |
double | getDt (const Eref &e) const |
Returns dt associated with this object based on its clock tick. | |
vector< string > | getValueFields (const Eref &e) const |
Information function to return names of all value Finfos. | |
vector< string > | getSourceFields (const Eref &e) const |
Information function to return names of all SrcFinfos. | |
vector< string > | getDestFields (const Eref &e) const |
Information function to return names of all DestFinfos. | |
void | destroy (const Eref &e, int stage) |
void | blockNodeBalance (const Eref &e, unsigned int, unsigned int, unsigned int) |
void | generalNodeBalance (const Eref &e, unsigned int myNode, vector< unsigned int > nodeAssignment) |
Static Public Member Functions | |
static Id | child (const Eref &e, const string &name) |
static ObjId | parent (const Eref &e) |
static ObjId | parent (ObjId id) |
static bool | isDescendant (Id me, Id ancestor) |
static const Cinfo * | initCinfo () |
static void | children (const Eref &e, vector< Id > &ret) |
static string | path (const Eref &e) |
static bool | isGlobalField (const string &field) |
Friends | |
istream & | operator>> (istream &s, Neutral &d) |
ostream & | operator<< (ostream &s, const Neutral &d) |
Neutral::Neutral | ( | ) |
void Neutral::blockNodeBalance | ( | const Eref & | e, | |
unsigned | int, | |||
unsigned | int, | |||
unsigned | int | |||
) |
Request conversion of data into a blockDataHandler subclass, and to carry out node balancing of data as per args.
Referenced by initCinfo().
Builds a vector of all descendants of e
Referenced by destroy(), and verifyKids().
Finds specific named child
Referenced by ReadKkit::assignPoolCompartments(), Shell::doMove(), Neuron::setSpineAndPsdMesh(), and testTreeTraversal().
return ids of all the children in ret.
Referenced by ReadCell::addChannelMessage(), allChildren(), Neuron::buildSegmentTree(), checkChildren(), Shell::cleanSimulation(), ReadCspace::deployParameters(), getChildren(), initCinfo(), innerCopyElements(), ReadCspace::makePlots(), singleLevelWildcard(), testCopyFieldElement(), testTable(), and verifyKids().
void Neutral::destroy | ( | const Eref & | e, | |
int | stage | |||
) |
Destroys Element and all children
References ALLDATA, buildTree(), Element::cinfo(), Msg::deleteMsg(), Element::destroyElementTree(), Eref::element(), Cinfo::isA(), and Eref::objId().
Referenced by Shell::destroy(), and initCinfo().
void Neutral::generalNodeBalance | ( | const Eref & | e, | |
unsigned int | myNode, | |||
vector< unsigned int > | nodeAssignment | |||
) |
Request conversion of data into a generalDataHandler subclass, and to carry out node balancing of data as per args.
Referenced by initCinfo().
Looks up all the Element children of the current Element
Gets Element children, not individual entries in the array.
References children().
Referenced by initCinfo(), testCopy(), and testMove().
string Neutral::getClass | ( | const Eref & | e | ) | const |
Looks up the Class name of the current Element
References Element::cinfo(), Eref::element(), and Cinfo::name().
Referenced by initCinfo().
vector< string > Neutral::getDestFields | ( | const Eref & | e | ) | const |
Information function to return names of all DestFinfos.
References Element::cinfo(), Eref::element(), Cinfo::getDestFinfo(), Cinfo::getNumDestFinfo(), and Finfo::name().
Referenced by initCinfo().
double Neutral::getDt | ( | const Eref & | e | ) | const |
Returns dt associated with this object based on its clock tick.
References Eref::element(), and Element::getTick().
Referenced by initCinfo().
Readonly field access function for getting all incoming Msgs.
References Msg::e2(), Eref::element(), Msg::getMsg(), Msg::mid(), and Element::msgIn().
Referenced by initCinfo().
vector< string > Neutral::getMsgDestFunctions | ( | const Eref & | e, | |
string | src | |||
) | const |
Return vector of function names called on each target ObjId of the specified SrcFinfo, by the current object. Twin function to getMsgDests.
Referenced by initCinfo().
Return vector of target ObjIds called by the specified SrcFinfo, by the current object. Twin function to getMsgDestFunctions.
Referenced by initCinfo().
string Neutral::getName | ( | const Eref & | e | ) | const |
References Eref::element(), and Element::getName().
Referenced by initCinfo().
Readonly field access function for getting Ids connected to current Id via specified Field. Field is specified by its name. Returns an empty vector if it fails.
Referenced by initCinfo().
unsigned int Neutral::getNumData | ( | const Eref & | e | ) | const |
References Eref::element(), and Element::numData().
Referenced by initCinfo().
unsigned int Neutral::getNumField | ( | const Eref & | e | ) | const |
References Eref::dataIndex(), Eref::element(), Eref::isDataHere(), Element::numField(), and Element::rawIndex().
Referenced by initCinfo().
Simply returns own ObjId
References Eref::objId().
Referenced by initCinfo().
Readonly field access function for getting all outgoing Msgs.
References Element::cinfo(), Eref::element(), Element::getMsgAndFunc(), and Cinfo::numBindIndex().
Referenced by initCinfo().
Looks up the full Id info for the parent of the current Element
References parent().
Referenced by initCinfo(), and testCopy().
string Neutral::getPath | ( | const Eref & | e | ) | const |
Traverses to root, building path.
References path().
Referenced by initCinfo().
vector< string > Neutral::getSourceFields | ( | const Eref & | e | ) | const |
Information function to return names of all SrcFinfos.
References Element::cinfo(), Eref::element(), Cinfo::getNumSrcFinfo(), Cinfo::getSrcFinfo(), and Finfo::name().
Referenced by initCinfo().
Neutral Neutral::getThis | ( | ) | const |
Field access functions for the entire object. For Neutrals the getThis function does return the Neutral object, but it has no data to set. However, the function name acts as a placeholder and derived objects can override the function so that the entire object can be accessed as a field and also used for inter-node data transfer.
Referenced by initCinfo().
int Neutral::getTick | ( | const Eref & | e | ) | const |
Returns clock tick of this object.
References Eref::element(), and Element::getTick().
Referenced by initCinfo().
vector< string > Neutral::getValueFields | ( | const Eref & | e | ) | const |
Information function to return names of all value Finfos.
References Element::cinfo(), Eref::element(), Cinfo::getNumValueFinfo(), Cinfo::getValueFinfo(), and Finfo::name().
Referenced by initCinfo().
const Cinfo * Neutral::initCinfo | ( | ) | [static] |
Standard initialization function, used whenever we want to look up the class Cinfo
References blockNodeBalance(), children(), destroy(), generalNodeBalance(), getChildren(), getClass(), getDestFields(), getDt(), getIncomingMsgs(), getMsgDestFunctions(), getMsgDests(), getName(), getNeighbors(), getNumData(), getNumField(), getObjId(), getOutgoingMsgs(), getParent(), getPath(), getSourceFields(), getThis(), getTick(), getValueFields(), parent(), path(), setName(), setNumData(), setNumField(), setThis(), and setTick().
Referenced by init(), Annotator::initCinfo(), Adaptor::initCinfo(), Shell::initCinfo(), Clock::initCinfo(), RandGenerator::initCinfo(), Msg::initCinfo(), MeshEntry::initCinfo(), ChemCompt::initCinfo(), Boundary::initCinfo(), Stoich::initCinfo(), SteadyState::initCinfo(), Ksolve::initCinfo(), Gsolve::initCinfo(), Species::initCinfo(), ReacBase::initCinfo(), PoolBase::initCinfo(), EnzBase::initCinfo(), HSolve::initCinfo(), Cell::initCinfo(), RC::initCinfo(), PulseGen::initCinfo(), PIDController::initCinfo(), DiffAmp::initCinfo(), Variable::initCinfo(), TableBase::initCinfo(), Stats::initCinfo(), Mstring::initCinfo(), Interpol2D::initCinfo(), Group::initCinfo(), Function::initCinfo(), Func::initCinfo(), Arith::initCinfo(), VectorTable::initCinfo(), moose::VClamp::initCinfo(), Spine::initCinfo(), SpikeGen::initCinfo(), RandSpike::initCinfo(), Neuron::initCinfo(), Nernst::initCinfo(), MarkovSolverBase::initCinfo(), MarkovRateTable::initCinfo(), MarkovGslSolver::initCinfo(), IzhikevichNrn::initCinfo(), IntFire::initCinfo(), HHGate2D::initCinfo(), HHGate::initCinfo(), GapJunction::initCinfo(), DifShell::initCinfo(), moose::CompartmentBase::initCinfo(), ChanBase::initCinfo(), CaConcBase::initCinfo(), TestId::initCinfo(), Finfo::initCinfo(), Cinfo::initCinfo(), Msg::initMsgManagers(), innerCopyMsgs(), showFields(), testCinfoFields(), testFinfoFields(), testIsA(), and testSetGetExtField().
Checks if 'me' is a descendant of 'ancestor'
References Eref::element(), ObjId::eref(), Id::eref(), Element::findCaller(), Cinfo::findFinfo(), Msg::findOtherEnd(), DestFinfo::getFid(), Msg::getMsg(), Element::id(), and Eref::objId().
Referenced by Shell::doMove(), and testDescendant().
static bool Neutral::isGlobalField | ( | const string & | field | ) | [static] |
Checks if specified field is a global, typically because it is present on the Element and therefore should be assigned uniformly on all nodes
References ObjId::element(), Element::findCaller(), Cinfo::findFinfo(), Msg::findOtherEnd(), DestFinfo::getFid(), Msg::getMsg(), and ObjId::id.
Returns parent object
References Eref::objId().
Referenced by findModelParent(), getCompt(), getParent(), initCinfo(), innerCopyElements(), ReadCspace::printMol(), MeshEntry::reinit(), storeFunctionMsgs(), and testObjIdToAndFromPath().
string Neutral::path | ( | const Eref & | e | ) | [static] |
Finds the path of element e
References ObjId::dataIndex, ObjId::element(), Eref::element(), ObjId::eref(), Eref::fieldIndex(), Element::findCaller(), Cinfo::findFinfo(), Msg::findOtherEnd(), DestFinfo::getFid(), Msg::getMsg(), Element::getName(), Element::hasFields(), ObjId::id, and Eref::objId().
Referenced by getPath(), and initCinfo().
void Neutral::setName | ( | const Eref & | e, | |
string | name | |||
) |
Field access functions for the name of the Element/Neutral
Referenced by initCinfo().
void Neutral::setNumData | ( | const Eref & | e, | |
unsigned int | num | |||
) |
numData is the number of data entries on this Element.
References Eref::element(), and Element::resize().
Referenced by initCinfo().
void Neutral::setNumField | ( | const Eref & | e, | |
unsigned int | num | |||
) |
numField is the size of the field array on the FieldElement specified by the Eref including its data index.
References Eref::dataIndex(), Eref::element(), Eref::isDataHere(), Element::rawIndex(), and Element::resizeField().
Referenced by initCinfo().
void Neutral::setThis | ( | Neutral | v | ) |
Field access functions for the entire object. For Neutrals the setThis function is a dummy: it doesn't do anything because the Neutral has no data to set. However, the function name acts as a placeholder and derived objects can override the function so that the entire object can be accessed as a field and also for inter-node data transfer.
Referenced by initCinfo().
void Neutral::setTick | ( | const Eref & | e, | |
int | num | |||
) |
The clock Tick specifies the timing and order of execution of the 'process' action of this object in the simulation. The timing is set by assigning the appropriate dt to this tick in the Clock object. A value of -1 means that the object is disabled.
References Eref::element(), and Element::setTick().
Referenced by initCinfo().
ostream& operator<< | ( | ostream & | s, | |
const Neutral & | d | |||
) | [friend] |
istream& operator>> | ( | istream & | s, | |
Neutral & | d | |||
) | [friend] |