MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <GlobalDataElement.h>
Public Member Functions | |
Element * | copyElement (Id newParent, Id newId, unsigned int n, bool toGlobal) const |
unsigned int | getNode (unsigned int dataIndex) const |
Inherited virtual. Returns node location of specified object. More... | |
unsigned int | getNumOnNode (unsigned int node) const |
Inherited virtual. More... | |
GlobalDataElement (Id id, const Cinfo *c, const string &name, unsigned int numData=1) | |
GlobalDataElement (Id id, const Element *orig, unsigned int n) | |
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 entry on this node. More... | |
unsigned int | numData () const |
Inherited virtual. Returns number of data entries. More... | |
unsigned int | rawIndex (unsigned int dataId) const |
Converts dataId to index on current node. More... | |
unsigned int | startDataIndex (unsigned int node) const |
Inherited virtual. Returns start dataIndex on specified node. More... | |
~GlobalDataElement () | |
![]() | |
char * | data (unsigned int rawIndex, unsigned int fieldIndex=0) const |
DataElement (Id id, const Cinfo *c, const string &name, unsigned int numData=1) | |
DataElement (Id id, const Element *orig, unsigned int n, unsigned int startEntry) | |
bool | hasFields () const |
Do not define getNode() or rawIndex() funcs, those are derived. More... | |
unsigned int | numField (unsigned int rawIndex) const |
Define only in derived classes: getNode( unsigned int dataIndex ) const;. More... | |
unsigned int | numLocalData () const |
Defined only in derived classes: unsigned int numData() const;. More... | |
void | resize (unsigned int newNumData) |
void | resizeField (unsigned int rawIndex, unsigned int newNumField) |
unsigned int | totNumLocalField () const |
void | zombieSwap (const Cinfo *newCinfo) |
Virtual func. More... | |
~DataElement () | |
![]() | |
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 () |
Additional Inherited Members | |
![]() | |
static void | destroyElementTree (const vector< Id > &tree) |
This is the usual class for managing the MOOSE interface. Handles the data. Elaborates on base class for how it handles destruction. Does block-wise partitioning between nodes.
Definition at line 21 of file GlobalDataElement.h.
GlobalDataElement::GlobalDataElement | ( | Id | id, |
const Cinfo * | c, | ||
const string & | name, | ||
unsigned int | numData = 1 |
||
) |
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 numData is the number of data entries, defaults to a singleton. The isGlobal flag specifies whether the created objects should be replicated on all nodes, or partitioned without replication.
Referenced by copyElement().
This constructor copies over the original n times. It is used for doing all copies, in Shell::innerCopyElements.
Definition at line 28 of file GlobalDataElement.cpp.
GlobalDataElement::~GlobalDataElement | ( | ) |
|
virtual |
Virtual copier. Makes a copy of self.
Implements Element.
Definition at line 38 of file GlobalDataElement.cpp.
References GlobalDataElement().
|
virtual |
Inherited virtual. Returns node location of specified object.
Implements Element.
Definition at line 58 of file GlobalDataElement.cpp.
References Shell::myNode().
|
virtual |
Inherited virtual.
Implements Element.
Definition at line 67 of file GlobalDataElement.cpp.
References DataElement::numLocalData().
|
inlinevirtual |
True if there is a copy of every dataEntry on all nodes.
Implements Element.
Definition at line 79 of file GlobalDataElement.h.
|
inlinevirtual |
Inherited virtual. Returns index of first entry on this node.
Implements Element.
Definition at line 63 of file GlobalDataElement.h.
|
virtual |
Inherited virtual. Returns number of data entries.
Implements Element.
Definition at line 53 of file GlobalDataElement.cpp.
References DataElement::numLocalData().
|
virtual |
Converts dataId to index on current node.
Implements Element.
Definition at line 63 of file GlobalDataElement.cpp.
|
inlinevirtual |
Inherited virtual. Returns start dataIndex on specified node.
Implements Element.
Definition at line 71 of file GlobalDataElement.h.