MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <MsgElement.h>
Public Member Functions | |
Element * | copyElement (Id newParent, Id newId, unsigned int n, bool toGlobal) const |
char * | data (unsigned int rawIndex, unsigned int fieldIndex=0) const |
unsigned int | getNode (unsigned int dataIndex) const |
Inherited virtual. Just returns current node. More... | |
unsigned int | getNumOnNode (unsigned int node) const |
bool | hasFields () const |
bool | isGlobal () const |
True if there is a copy of every dataEntry on all nodes. More... | |
unsigned int | localDataStart () const |
Inherited virtual. Returns index of first data entry on node. More... | |
MsgElement (Id id, const Cinfo *c, const string &name, unsigned int(*numMsg)(), char *(*lookupMsg)(unsigned int)) | |
unsigned int | numData () const |
Inherited virtual. Returns number of data entries. More... | |
unsigned int | numField (unsigned int rawIndex) const |
Inherited virtual. Returns number of field entries for specified data. More... | |
unsigned int | numLocalData () const |
Inherited virtual. Returns number of data entries. More... | |
unsigned int | rawIndex (unsigned int dataIndex) const |
Inherited virtual. Just returns index. More... | |
void | resize (unsigned int newNumData) |
void | resizeField (unsigned int rawIndex, unsigned int newNumField) |
unsigned int | startDataIndex (unsigned int node) const |
Inherited virtual. As this is a global we always return zero. More... | |
unsigned int | totNumLocalField () const |
void | zombieSwap (const Cinfo *newCinfo) |
~MsgElement () | |
![]() | |
void | addMsg (ObjId mid) |
void | addMsgAndFunc (ObjId mid, FuncId fid, BindIndex bindIndex) |
const Cinfo * | cinfo () const |
void | clearAllMsgs () |
Used upon ending of MOOSE session, to rapidly clear out messages. More... | |
void | clearBinding (BindIndex b) |
void | digestMessages () |
void | dropAllMsgsFromSrc (Id src) |
void | dropMsg (ObjId mid) |
Element (Id id, const Cinfo *c, const string &name) | |
unsigned int | findBinding (MsgFuncBinding b) const |
ObjId | findCaller (FuncId fid) const |
unsigned int | getFieldsOfOutgoingMsg (ObjId mid, vector< pair< BindIndex, FuncId > > &ret) const |
unsigned int | getInputMsgs (vector< ObjId > &caller, FuncId fid) const |
unsigned int | getInputsWithTgtIndex (vector< pair< Id, unsigned int > > &ret, const DestFinfo *finfo) const |
const vector< MsgFuncBinding > * | getMsgAndFunc (BindIndex b) const |
unsigned int | getMsgSourceAndSender (FuncId fid, vector< ObjId > &src, vector< string > &sender) const |
unsigned int | getMsgTargetAndFunctions (DataId srcDataId, const SrcFinfo *finfo, vector< ObjId > &tgt, vector< string > &func) const |
vector< ObjId > | getMsgTargets (DataId srcDataId, const SrcFinfo *finfo) const |
const string & | getName () const |
unsigned int | getNeighbors (vector< Id > &ret, const Finfo *finfo) const |
int | getTick () const |
bool | hasMsgs (BindIndex b) const |
Id | id () const |
void | innerSetTick (unsigned int tick) |
bool | isDoomed () const |
void | markAsDoomed () |
void | markRewired () |
const vector< MsgDigest > & | msgDigest (unsigned int index) |
const vector< ObjId > & | msgIn () const |
void | printMsgDigest (unsigned int srcIndex, unsigned int dataIndex) const |
void | putOffNodeTargetsInDigest (unsigned int srcNum, vector< vector< bool > > &targetNodes) |
void | putTargetsInDigest (unsigned int srcNum, const MsgFuncBinding &mfb, const FuncOrder &fo, vector< vector< bool > > &targetNodes) |
void | replaceCinfo (const Cinfo *newCinfo) |
Support function for zombieSwap, replaces Cinfo. More... | |
void | setName (const string &val) |
void | setTick (int t) |
void | showFields () const |
void | showMsg () const |
virtual | ~Element () |
Private Attributes | |
char *(* | lookupMsg_ )(unsigned int) |
unsigned int(* | numMsg_ )() |
Additional Inherited Members | |
![]() | |
static void | destroyElementTree (const vector< Id > &tree) |
This is a specialized Element class for managing Msg data. Basically it just gives a wrapper for the vectors managed by each of the Msg classes.
Definition at line 20 of file MsgElement.h.
|
inline |
This is the main constructor, used by Shell::innerCreate which makes most Elements. Also used to create base Elements to init the simulator in main.cpp. Id is the Id of the new Element Cinfo is the class name is its name
Definition at line 31 of file MsgElement.h.
|
inline |
|
inlinevirtual |
Virtual copier. Doesn't do anything. The copy happens at the lower level, involving the Msg classes and the MsgElement just manages them.
Implements Element.
Definition at line 51 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. Looks up specified field data entry. On regular objects just returns the data entry specified by the rawIndex. On FieldElements like synapses, does a second lookup on the field index. Note that the index is NOT a DataIndex: it is instead the raw index of the data on the current node. Index is also NOT the character offset, but the index to the data array in whatever type the data may be.
The DataIndex has to be filtered through the nodeMap to find a) if the entry is here, and b) what its raw index is.
Returns 0 if either index is out of range.
Implements Element.
Definition at line 145 of file MsgElement.h.
References lookupMsg_.
|
inlinevirtual |
Inherited virtual. Just returns current node.
Implements Element.
Definition at line 91 of file MsgElement.h.
References Shell::myNode().
|
inlinevirtual |
Returns number of data (or, if relevant, field) entries on specified node.
Implements Element.
Definition at line 121 of file MsgElement.h.
References numMsg_.
|
inlinevirtual |
Inherited virtual True if this is a FieldElement having an array of fields on each data entry. Clearly not true for the MsgElement.
Implements Element.
Definition at line 113 of file MsgElement.h.
|
inlinevirtual |
True if there is a copy of every dataEntry on all nodes.
Implements Element.
Definition at line 117 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. Returns index of first data entry on node.
Implements Element.
Definition at line 74 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. Returns number of data entries.
Implements Element.
Definition at line 62 of file MsgElement.h.
References numMsg_.
|
inlinevirtual |
Inherited virtual. Returns number of field entries for specified data.
Implements Element.
Definition at line 80 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. Returns number of data entries.
Implements Element.
Definition at line 68 of file MsgElement.h.
References numMsg_.
|
inlinevirtual |
Inherited virtual. Just returns index.
Implements Element.
Definition at line 103 of file MsgElement.h.
References dataIndex.
|
inlinevirtual |
Inherited virtual Changes the number of entries in the data. Doesn't do anything for the MsgElement.
Implements Element.
Definition at line 156 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. Changes the number of fields on the specified data entry. Doesn't do anything for the MsgElement.
Implements Element.
Definition at line 164 of file MsgElement.h.
|
inlinevirtual |
Inherited virtual. As this is a global we always return zero.
Implements Element.
Definition at line 97 of file MsgElement.h.
|
inlinevirtual |
Returns number of field entries on local node. If this is not a FieldElement, returns numLocalData, assuming 1 field per data.
Implements Element.
Definition at line 85 of file MsgElement.h.
References numMsg_.
|
inlinevirtual |
Virtual func. The parent does the data swap part, so here it is just the Cinfo we replace.
Reimplemented from Element.
Definition at line 172 of file MsgElement.h.
References Element::replaceCinfo(), and Element::zombieSwap().
|
private |
Function to return a pointer to the selected Msg.
Definition at line 187 of file MsgElement.h.
Referenced by data().
|
private |
Function to return the # of Messages.
Definition at line 182 of file MsgElement.h.
Referenced by getNumOnNode(), numData(), numLocalData(), and totNumLocalField().