MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <Id.h>
Public Member Functions | |
void | bindIdToElement (Element *e) |
void | destroy () const |
Element * | element () const |
Synonym for Id::operator()() More... | |
Eref | eref () const |
Id () | |
Id (unsigned int id) | |
Id (const std::string &path, const std::string &separator="/") | |
Id (const ObjId &oi) | |
bool | operator!= (const Id &other) const |
bool | operator< (const Id &other) const |
bool | operator== (const Id &other) const |
std::string | path (const std::string &separator="/") const |
unsigned int | value () const |
void | zeroOut () const |
~Id () | |
Static Public Member Functions | |
static void | clearAllElements () |
static std::string | id2str (Id id) |
static bool | isValid (Id id) |
static bool | isValid (unsigned int id) |
static Id | nextId () |
static unsigned int | numIds () |
static Id | str2Id (const std::string &s) |
Static Private Member Functions | |
static vector< Element * > & | elements () |
Private Attributes | |
unsigned int | id_ |
Friends | |
ostream & | operator<< (ostream &s, const Id &i) |
istream & | operator>> (istream &s, Id &i) |
This class manages id lookups for elements. Ids provide a uniform handle for every object, independent of which node they are located on.
Id::Id | ( | ) |
Id::Id | ( | unsigned int | id | ) |
Id::Id | ( | const std::string & | path, |
const std::string & | separator = "/" |
||
) |
Returns an id found by traversing the specified path
Definition at line 31 of file Id.cpp.
References Shell::doFind(), Id(), ObjId::id, and id_.
Id::Id | ( | const ObjId & | oi | ) |
|
inline |
void Id::bindIdToElement | ( | Element * | e | ) |
The specified element is placed into current id.
Definition at line 148 of file Id.cpp.
References elements(), and id_.
|
static |
Used to clean up all Elements when the simulation is terminated
Definition at line 202 of file Id.cpp.
References elements().
Referenced by finalize(), and main().
void Id::destroy | ( | ) | const |
Cleanly deletes the associated Element, and zeroes out contents of elements vector at the location pointed to by this->id_.
Definition at line 176 of file Id.cpp.
References elements(), and id_.
Referenced by Element::destroyElementTree(), Cell::setupf(), testArith(), testFibonacci(), testLookupSetGet(), testMpiFibonacci(), testMsgSrcDestFields(), testSetGetExtField(), testSharedMsg(), and testShellParserStart().
Element * Id::element | ( | ) | const |
Synonym for Id::operator()()
Returns the Element pointed to by the id If it is off-node, returns an allocated wrapper element with postmaster and id information. Calling func has to free it. This wrapper element may also point to UNKNOWN NODE, in which case the master node IdManager has to figure out where it belongs. Returns 0 on failure. Deprecated. Element* operator()() const; Returns the Element pointed to by the Id. Perhaps cleaner to use than operator()() as it is an explicit function.
Here we work with a single big array of all ids. Off-node elements are represented by their postmasters. When we hit a postmaster we put the id into a special field on it. Note that this is horrendously thread-unsafe.
Definition at line 113 of file Id.cpp.
Referenced by ReadCell::addCaConc(), ReadCell::addCanonicalChannel(), ReadCell::addChannel(), addClockMsg(), ReadCell::addSpikeGen(), Streamer::addTable(), Shell::adopt(), assignParam(), ReadCell::buildChannels(), ReadCell::buildCompartment(), buildFromProto(), Dsolve::buildMeshJunctions(), Dsolve::buildNeuroMeshJunctions(), ReadKkit::buildSumTotal(), Dsolve::calcJunction(), checkChildren(), checkForSpine(), SetGet::checkSet(), OneToAllMsg::copy(), OneToOneDataIndexMsg::copy(), OneToOneMsg::copy(), SingleMsg::copy(), DiagonalMsg::copy(), SparseMsg::copy(), FieldElement::data(), HSolve::deepSearchForCompartment(), HSolve::deleteIncomingMessages(), Shell::doAddMsg(), doClassSpecificMessaging(), Shell::doLoadModel(), Shell::doMove(), Element::dropAllMsgsFromSrc(), fillSegIndex(), fillSegments(), VoxelPoolsBase::filterCrossRateTerms(), NeuroNode::filterSpines(), NeuroMesh::filterSpines(), findAllConnectedCompartments(), findFuncMsgSrc(), findMeshOfEnz(), findModelParent(), DiagonalMsg::findOtherEnd(), findParentComptOfReac(), FieldElement::getNode(), FieldElement::getNumOnNode(), Stoich::getProxyPools(), LookupField< L, A >::getVec(), Shell::innerAddMsg(), innerCopyElements(), Shell::innerMove(), Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), isDoingReinit(), FieldElement::isGlobal(), isOffSolverReac(), Shell::isRunning(), ReadKkit::loadTab(), FieldElement::localDataStart(), main(), Dsolve::mapXfersBetweenDsolves(), FieldElement::numData(), FieldElement::numField(), FieldElement::numLocalData(), FieldElementFinfoBase::postCreationFunc(), FieldElement::rawIndex(), ReadCell::read(), Streamer::reinit(), FieldElement::resizeField(), SrcFinfo1< T >::sendTo(), SrcFinfo2< T1, T2 >::sendTo(), Gsolve::setCompartment(), ZombiePoolInterface::setCompartment(), Stoich::setCompartment(), Ksolve::setDsolve(), Gsolve::setDsolve(), Stoich::setDsolve(), Stoich::setKsolve(), HSolve::setSeed(), ZombieFunction::setSolver(), ZombieReac::setSolver(), ZombieMMenz::setSolver(), ZombieEnz::setSolver(), Neuron::setSpineAndPsdMesh(), Gsolve::setStoich(), SteadyState::setStoich(), Ksolve::setStoich(), Dsolve::setStoich(), ReadKkit::setupSlaveMsg(), showFields(), FieldElement::startDataIndex(), test2ArgSetVec(), testAssortedMsg(), testCellDiffn(), testCopy(), testCopyFieldElement(), testCreateMsg(), testCylDiffnWithStoich(), testFilterOffNodeTargets(), testGet(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSendSpike(), testSetGet(), testSetGetDouble(), testSetGetVec(), testSharedMsg(), testSmallCellDiffn(), testStrGet(), testStrSet(), testTaperingCylDiffn(), testTreeTraversal(), testTwoReacGetNeighbors(), ZombiePool::vSetSolver(), ZombieCaConc::vSetSolver(), ZombieHHChannel::vSetSolver(), ZombieCompartment::vSetSolver(), Stoich::zombifyModel(), and Stoich::zombifyPoolFuncWithScaling().
|
staticprivate |
Definition at line 59 of file Id.cpp.
Referenced by bindIdToElement(), clearAllElements(), destroy(), eref(), isValid(), nextId(), numIds(), and zeroOut().
Eref Id::eref | ( | ) | const |
Returns the Eref to the element plus index
Definition at line 125 of file Id.cpp.
References elements(), and id_.
Referenced by ReadCell::addChannelMessage(), addClockMsg(), addSpine(), Streamer::addTable(), ReadKkit::assignPoolCompartments(), benchmarkMsg(), ReadSwc::build(), Dsolve::build(), Neuron::buildElist(), ReadKkit::buildEnz(), buildFromProto(), Dsolve::calcJunction(), checkChildren(), Cell::children(), HSolve::children(), SteadyState::classifyState(), Shell::cleanSimulation(), OneToOneDataIndexMsg::copy(), OneToOneMsg::copy(), doClassSpecificMessaging(), ReadCspace::expandEnzyme(), ReadCspace::expandReaction(), Neuron::getExprElist(), Neuron::getExprVal(), getShell(), handle_keyboard_interrupts(), init(), MarkovSolverBase::init(), innerCopyElements(), Neutral::isDescendant(), isDoingReinit(), Shell::isRunning(), Shell::launchParser(), makeCompt(), ReadCspace::makeMolecule(), ReadCspace::makePlots(), makeReacTest(), makeStandardElements(), Dsolve::mapChansBetweenDsolves(), Dsolve::mapDiffPoolsBetweenDsolves(), mapVoxelsBetweenMeshes(), Dsolve::mapXfersBetweenDsolves(), path(), FieldElementFinfoBase::postCreationFunc(), HSolveUtils::rates(), Table::reinit(), Streamer::reinit(), Clock::reportClock(), Ksolve::setDsolve(), Gsolve::setDsolve(), Stoich::setDsolve(), Stoich::setElist(), MarkovRateTable::setInt2dChildTable(), Stoich::setKsolve(), ZombieReac::setSolver(), ZombieMMenz::setSolver(), ZombieEnz::setSolver(), Neuron::setSpineAndPsdMesh(), Gsolve::setStoich(), SteadyState::setStoich(), Ksolve::setStoich(), Dsolve::setStoich(), Cell::setupSolver(), MarkovRateTable::setVtChildTable(), Element::showFields(), storeFunctionMsgs(), testAssortedMsg(), testBuildStoich(), testCalcJunction(), testCellDiffn(), testChildren(), testClock(), testClockMessaging(), testCopy(), testCopyFieldElement(), testCopyMsgOps(), testCreateMsg(), testCylDiffn(), testCylDiffnWithStoich(), testDescendant(), testFibonacci(), testFilterOffNodeTargets(), testFindModelParent(), testGetMsg(), testGetMsgs(), testInterNodeOps(), testMMenz(), testMMenzProcess(), testMove(), testMpiFibonacci(), testMsgElementListing(), testMsgField(), testMsgSrcDestFields(), testObjIdToAndFromPath(), testPoolVolumeScaling(), testReacVolumeScaling(), testReadKkit(), ReadCspace::testReadModel(), testReMesh(), testRunGsolve(), testRunKsolve(), testSendMsg(), testSendSpike(), testSetupReac(), testSharedMsg(), testShellAddMsg(), testShellParserCreateDelete(), testShellParserQuit(), testShellParserStart(), testShellSetGet(), testSmallCellDiffn(), testStats(), testSyncSynapseSize(), testTable(), testTaperingCylDiffn(), testTreeTraversal(), testTwoReacGetNeighbors(), testVolScaling(), testWildcard(), verifyKids(), ZombieCaConc::vSetSolver(), ZombieHHChannel::vSetSolver(), and ZombieCompartment::vSetSolver().
|
static |
|
inlinestatic |
Definition at line 145 of file Id.h.
References elements(), and id_.
Referenced by moose_connect(), moose_copy(), moose_ElementField_getPath(), moose_ElementField_setattro(), moose_Field_hash(), moose_Field_init(), moose_Field_repr(), moose_getField(), moose_Id_delete(), moose_Id_getattro(), moose_Id_getItem(), moose_Id_getLength(), moose_Id_getPath(), moose_Id_getShape(), moose_Id_getSlice(), moose_Id_repr(), moose_Id_setattro(), moose_Id_setField(), moose_Id_str(), moose_move(), moose_ObjId_connect(), moose_ObjId_get_destField_attr(), moose_ObjId_get_elementField_attr(), moose_ObjId_get_lookupField_attr(), moose_ObjId_getDataIndex(), moose_ObjId_getField(), moose_ObjId_getFieldIndex(), moose_ObjId_getFieldNames(), moose_ObjId_getFieldType(), moose_ObjId_getId(), moose_ObjId_getLookupField(), moose_ObjId_getNeighbors(), moose_ObjId_hash(), moose_ObjId_init_from_id(), moose_ObjId_repr(), moose_ObjId_richcompare(), moose_ObjId_setattro(), moose_ObjId_setDestField(), moose_ObjId_setLookupField(), and moose_ObjId_str().
|
inlinestatic |
Definition at line 150 of file Id.h.
References elements(), and id.
|
static |
Reserves an id for assigning to an Element. Each time it is called a new id is reserved, even if previous ones have not been used yet.
Definition at line 132 of file Id.cpp.
References elements().
Referenced by buildFinfoElement(), Shell::doCopy(), Shell::doCreate(), init(), Msg::initMsgManagers(), innerCopyElements(), Cinfo::makeCinfoElements(), FieldElementFinfoBase::postCreationFunc(), Cell::setupSolver(), showFields(), test2ArgSetVec(), testArith(), testClock(), testCreateMsg(), testFibonacci(), testGet(), testLookupSetGet(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSendSpike(), testSetGet(), testSetGetDouble(), testSetGetExtField(), testSetGetSynapse(), testSetGetVec(), testSetRepeat(), testSharedMsg(), testSparseMsg(), testStrGet(), and testStrSet().
|
static |
Returns the number of Ids in use.
Definition at line 143 of file Id.cpp.
References elements().
|
inline |
|
inline |
|
inline |
string Id::path | ( | const std::string & | separator = "/" | ) | const |
Returns the full pathname of the object on the id.
Definition at line 76 of file Id.cpp.
References eref(), and Neutral::path().
Referenced by Streamer::addTable(), ReadCell::buildCompartment(), Dsolve::buildMeshJunctions(), Dsolve::buildNeuroMeshJunctions(), Neuron::buildSegmentTree(), SetGet::checkSet(), HHChannel2D::createGate(), HHChannel2D::destroyGate(), HHChannel::destroyGate(), diagnoseTree(), Shell::doCopy(), findModelParent(), HSolveUtils::gates(), Neutral::getMsgDestFunctions(), Neutral::getMsgDests(), Neutral::getNeighbors(), LookupField< L, A >::getVec(), HHChannel2D::innerCreateGate(), HHChannel::innerCreateGate(), HHChannel2D::innerDestroyGate(), HHChannel::innerDestroyGate(), installDummy(), isOffSolverReac(), ReadCspace::makePlots(), makeStandardElements(), Ksolve::print(), printJunction(), ReadKkit::read(), ReadCell::ReadCell(), ReadCspace::readModelString(), ReadCell::readScript(), Table::reinit(), Streamer::reinit(), Streamer::removeTable(), HHGate::setAlpha(), HHGate::setBeta(), Ksolve::setDsolve(), Gsolve::setDsolve(), Stoich::setFunctionExpr(), setMethod(), HHGate::setMinfinity(), Neutral::setName(), HSolve::setSeed(), ZombieFunction::setSolver(), ZombieEnz::setSolver(), Neuron::setSpineAndPsdMesh(), HHGate::setTableA(), HHGate::setTau(), Cell::setupf(), ReadCell::startGraftCell(), storePlotMsgs(), ReadCspace::testReadModel(), testTreeTraversal(), Conv< Id >::val2str(), HHChannel::vCreateGate(), ZombieCaConc::vSetSolver(), ZombieHHChannel::vSetSolver(), ZombieCompartment::vSetSolver(), writeGroup(), and writeKkit().
|
static |
Returns an id whose value is string-converted from the specified string.
Static func to extract an id from a string. We need to accept ids out of the existing range, but it would be nice to have a heuristic on how outrageous the incoming value is.
Definition at line 49 of file Id.cpp.
References Id().
unsigned int Id::value | ( | ) | const |
Definition at line 197 of file Id.cpp.
References id_.
Referenced by ReadKkit::buildSumTotal(), HHChannel2D::createGate(), Dsolve::fillConcChans(), Neutral::getId(), Neuron::getSpineIdsFromCompartmentIds(), PsdMesh::handlePsdList(), SpineMesh::handleSpineList(), init(), Dsolve::innerBuildMeshJunctions(), Stoich::installAndUnschedFunc(), Stoich::installAndUnschedFuncRate(), Stoich::installAndUnschedFuncReac(), makeReacTest(), std::hash< Id >::operator()(), Neutral::setName(), Dsolve::setStoich(), storeFunctionMsgs(), testCopyFieldElement(), testObjIdToAndFromPath(), testPoolVolumeScaling(), testReacVolumeScaling(), testSendSpike(), testSetGetExtField(), testSetGetSynapse(), testSetGetVec(), testSetRepeat(), testSparseMsg(), testSyncSynapseSize(), testTreeTraversal(), testTwoReacGetNeighbors(), and HHChannel::vCreateGate().
void Id::zeroOut | ( | ) | const |
Used to clean out any specific Id.
Definition at line 191 of file Id.cpp.
References elements(), and id_.
Referenced by Element::~Element().
|
friend |
|
friend |
|
private |
Definition at line 172 of file Id.h.
Referenced by bindIdToElement(), destroy(), eref(), Id(), isValid(), moose_copy(), moose_Id_richCompare(), moose_move(), moose_ObjId_setattro(), operator!=(), operator<(), operator<<(), operator==(), operator>>(), setDestFinfo(), setDestFinfo1(), setDestFinfo2(), value(), and zeroOut().