MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <FieldElement.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 |
FieldElement (Id parent, Id kid, const Cinfo *c, const string &name, const FieldElementFinfoBase *fef) | |
unsigned int | getNode (unsigned int dataId) const |
Virtual: Returns location of specified dataId. More... | |
unsigned int | getNumOnNode (unsigned int node) const |
Inherited virtual. More... | |
bool | hasFields () const |
bool | isGlobal () const |
Virtual. Returns true if global, ie, if its parent is global. More... | |
unsigned int | localDataStart () const |
Virtual: Returns index of first data entry on this node. More... | |
unsigned int | numData () const |
Virtual: Returns number of data entries. More... | |
unsigned int | numField (unsigned int rawIndex) const |
Virtual: Returns number of field entries for specified data. More... | |
unsigned int | numLocalData () const |
Virtual: Returns number of data entries on current node. More... | |
unsigned int | rawIndex (unsigned int dataId) const |
Virtual: Returns converted dataId to index on current node. More... | |
void | resize (unsigned int newNumData) |
void | resizeField (unsigned int rawIndex, unsigned int newNumField) |
unsigned int | startDataIndex (unsigned int node) const |
Virtual: Returns start DataIndex on specified node. More... | |
unsigned int | totNumLocalField () const |
Virtual: Returns number of field entries on current node. More... | |
void | zombieSwap (const Cinfo *zCinfo) |
~FieldElement () | |
![]() | |
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 | |
const FieldElementFinfoBase * | fef_ |
Id | parent_ |
Additional Inherited Members | |
![]() | |
static void | destroyElementTree (const vector< Id > &tree) |
Specialization of Element class, used to look up array fields within objects when those fields each need to have independent Element capabilies such as messaging and subfield lookup. Made automatically by Elements which have such fields.
Definition at line 18 of file FieldElement.h.
FieldElement::FieldElement | ( | Id | parent, |
Id | kid, | ||
const Cinfo * | c, | ||
const string & | name, | ||
const FieldElementFinfoBase * | fef | ||
) |
Definition at line 13 of file FieldElement.cpp.
Referenced by copyElement().
FieldElement::~FieldElement | ( | ) |
Virtual func: leave the clearing of the messages to ElementBase, the data is cleared by the parent Element of this field.
Definition at line 30 of file FieldElement.cpp.
|
virtual |
Virtual copier. Makes a copy of self.
Implements Element.
Definition at line 35 of file FieldElement.cpp.
References Element::cinfo(), fef_, FieldElement(), and Element::getName().
|
virtual |
virtual. Looks up specified field field entry. First it finds the appropriate data entry from the rawIndex. Then it looks up the field using the lookupField. Returns the data entry specified by the rawIndex, fieldIndex.
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 109 of file FieldElement.cpp.
References Element::data(), Id::element(), fef_, FieldElementFinfoBase::lookupField(), and parent_.
Referenced by numField(), and resizeField().
|
virtual |
Virtual: Returns location of specified dataId.
Implements Element.
Definition at line 76 of file FieldElement.cpp.
References Id::element(), Element::getNode(), and parent_.
|
virtual |
Inherited virtual.
Implements Element.
Definition at line 96 of file FieldElement.cpp.
References Id::element(), Element::isGlobal(), Shell::myNode(), parent_, and totNumLocalField().
|
inlinevirtual |
Virtual: True if this is a FieldElement having an array of fields on each data entry. So true in this case.
Implements Element.
Definition at line 62 of file FieldElement.h.
|
virtual |
Virtual. Returns true if global, ie, if its parent is global.
Implements Element.
Definition at line 91 of file FieldElement.cpp.
References Id::element(), Element::isGlobal(), and parent_.
|
virtual |
Virtual: Returns index of first data entry on this node.
Implements Element.
Definition at line 55 of file FieldElement.cpp.
References Id::element(), Element::localDataStart(), and parent_.
|
virtual |
Virtual: Returns number of data entries.
Implements Element.
Definition at line 45 of file FieldElement.cpp.
References Id::element(), Element::numData(), and parent_.
Referenced by moose_ObjId_getLength().
|
virtual |
Virtual: Returns number of field entries for specified data.
Implements Element.
Definition at line 60 of file FieldElement.cpp.
References data(), Element::data(), Id::element(), fef_, FieldElementFinfoBase::getNumField(), and parent_.
Referenced by totNumLocalField().
|
virtual |
Virtual: Returns number of data entries on current node.
Implements Element.
Definition at line 50 of file FieldElement.cpp.
References Id::element(), Element::numLocalData(), and parent_.
Referenced by totNumLocalField().
|
virtual |
Virtual: Returns converted dataId to index on current node.
Implements Element.
Definition at line 86 of file FieldElement.cpp.
References Id::element(), parent_, and Element::rawIndex().
|
virtual |
virtual Changes the number of entries in the data. Not permitted for FieldElements since they are just fields on the data.
Implements Element.
Definition at line 116 of file FieldElement.cpp.
|
virtual |
virtual. Changes the number of fields on the specified data entry.
Implements Element.
Definition at line 121 of file FieldElement.cpp.
References data(), Element::data(), Id::element(), fef_, parent_, and FieldElementFinfoBase::setNumField().
|
virtual |
Virtual: Returns start DataIndex on specified node.
Implements Element.
Definition at line 81 of file FieldElement.cpp.
References Id::element(), parent_, and Element::startDataIndex().
|
virtual |
Virtual: Returns number of field entries on current node.
Implements Element.
Definition at line 67 of file FieldElement.cpp.
References numField(), and numLocalData().
Referenced by getNumOnNode().
|
virtual |
Virtual: after replacing Cinfo of parent, we need to replace Cinfo and fef here. The zCinfo is the new Cinfo for this FieldElement.
Reimplemented from Element.
Definition at line 130 of file FieldElement.cpp.
References fef_, Cinfo::findFinfo(), Element::getName(), and Element::replaceCinfo().
|
private |
Definition at line 119 of file FieldElement.h.
Referenced by copyElement(), data(), numField(), resizeField(), and zombieSwap().
|
private |
Definition at line 118 of file FieldElement.h.
Referenced by data(), getNode(), getNumOnNode(), isGlobal(), localDataStart(), numData(), numField(), numLocalData(), rawIndex(), resizeField(), and startDataIndex().