MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <SingleMsg.h>
Public Member Functions | |
Msg * | copy (Id origSrc, Id newSrc, Id newTgt, FuncId fid, unsigned int b, unsigned int n) const |
ObjId | findOtherEnd (ObjId end) const |
Eref | firstTgt (const Eref &src) const |
DataId | getI1 () const |
DataId | getI2 () const |
unsigned int | getTargetField () const |
DataId | i1 () const |
DataId | i2 () const |
Id | managerId () const |
void | setI1 (DataId di) |
void | setI2 (DataId di) |
void | setTargetField (unsigned int f) |
SingleMsg (const Eref &e1, const Eref &e2, unsigned int msgIndex) | |
void | sources (vector< vector< Eref > > &v) const |
void | targets (vector< vector< Eref > > &v) const |
~SingleMsg () | |
![]() | |
Element * | e1 () const |
Element * | e2 () const |
ObjId | getAdjacent (ObjId) const |
vector< string > | getDestFieldsOnE1 () const |
vector< string > | getDestFieldsOnE2 () const |
Id | getE1 () const |
Id | getE2 () const |
vector< string > | getSrcFieldsOnE1 () const |
vector< string > | getSrcFieldsOnE2 () const |
bool | isForward (const Element *src) const |
ObjId | mid () const |
Msg (ObjId mid, Element *e1, Element *e2) | |
Constructor. More... | |
virtual | ~Msg () |
Destructor. More... | |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
static char * | lookupMsg (unsigned int index) |
Static function for Msg access. More... | |
static unsigned int | numMsg () |
Msg lookup functions. More... | |
![]() | |
static void | clearAllMsgs () |
static void | deleteMsg (ObjId mid) |
static const Msg * | getMsg (ObjId m) |
static const Cinfo * | initCinfo () |
static unsigned int | initMsgManagers () |
static bool | isLastTrump () |
True when MOOSE has been terminated and is being cleaned up. More... | |
static const Msg * | lastMsg () |
Private Attributes | |
unsigned int | f2_ |
DataId | i1_ |
DataId | i2_ |
Static Private Attributes | |
static Id | managerId_ |
static vector< SingleMsg * > | msg_ |
Friends | |
unsigned int | Msg::initMsgManagers () |
Additional Inherited Members | |
![]() | |
Element * | e1_ |
Index of this Msg on the msg_ vector. More... | |
Element * | e2_ |
Element 1 attached to Msg. More... | |
ObjId | mid_ |
![]() | |
static bool | lastTrump_ = false |
Flag to indicate termination of program. More... | |
static Id | msgManagerId_ |
Element 2 attached to Msg. More... | |
This is a message from a single source object to a single target object. The source object must be a DataEntry. The target object may be on a FieldElement, and the target specification includes the index of the field object.
Definition at line 20 of file SingleMsg.h.
Definition at line 21 of file SingleMsg.cpp.
References msg_.
Referenced by copy().
SingleMsg::~SingleMsg | ( | ) |
|
virtual |
Make a copy of this Msg. The original msg was on origSrc. The new Msg should go from newSrc to newTgt, and have the function fid, on bindIndex b. The copy may have to be a higher-order Msg type to handle arrays if n > 1. Note that n is not the number of msgs, but the multiplier by which numData will be scaled.
Implements Msg.
Definition at line 111 of file SingleMsg.cpp.
References Element::addMsgAndFunc(), Msg::e1(), Msg::e2(), Id::element(), f2_, i1_, i2_, Msg::mid(), and SingleMsg().
Find the other end of this Msg. In most cases this is a straightforward return of e1 or e2, plus perhaps a DataId. But in some complex msgs we need to figure out DataIds that match with the target. In many-to-one cases we just return the first entry. If no Element match, return ObjId( Id(), DataId::bad() ) If Element e matches but not DataId, return ObjId( e.id(), DataId::bad() )
Implements Msg.
Definition at line 96 of file SingleMsg.cpp.
References BADINDEX, ObjId::dataIndex, Msg::e1(), Msg::e2(), ObjId::element(), i1_, and i2_.
Obtain the first target Eref for the specified Src Eref It is really meant only to work with messages with a single target ObjId for each given src, typically OneToOne.
Implements Msg.
Definition at line 46 of file SingleMsg.cpp.
References Msg::e1_, Msg::e2_, Eref::element(), f2_, i1_, and i2_.
DataId SingleMsg::getI1 | ( | ) | const |
Definition at line 187 of file SingleMsg.cpp.
References i1_.
Referenced by initCinfo().
DataId SingleMsg::getI2 | ( | ) | const |
Definition at line 199 of file SingleMsg.cpp.
References i2_.
Referenced by initCinfo().
unsigned int SingleMsg::getTargetField | ( | ) | const |
Definition at line 217 of file SingleMsg.cpp.
References f2_.
DataId SingleMsg::i1 | ( | ) | const |
Definition at line 81 of file SingleMsg.cpp.
References i1_.
DataId SingleMsg::i2 | ( | ) | const |
Definition at line 86 of file SingleMsg.cpp.
References i2_.
|
static |
Definition at line 148 of file SingleMsg.cpp.
References getI1(), getI2(), Msg::initCinfo(), setI1(), setI2(), and singleMsgCinfo.
Referenced by Msg::initMsgManagers().
|
static |
Static function for Msg access.
Definition at line 229 of file SingleMsg.cpp.
References msg_.
Referenced by Msg::clearAllMsgs(), and Msg::initMsgManagers().
Id SingleMsg::managerId | ( | ) | const |
|
static |
Msg lookup functions.
Static function for Msg access.
Definition at line 223 of file SingleMsg.cpp.
References msg_.
Referenced by Msg::clearAllMsgs(), and Msg::initMsgManagers().
void SingleMsg::setI1 | ( | DataId | di | ) |
Definition at line 192 of file SingleMsg.cpp.
References Msg::e1(), Msg::e2(), i1_, and Element::markRewired().
Referenced by initCinfo().
void SingleMsg::setI2 | ( | DataId | di | ) |
Definition at line 204 of file SingleMsg.cpp.
References Msg::e1(), Msg::e2(), i2_, and Element::markRewired().
Referenced by initCinfo().
void SingleMsg::setTargetField | ( | unsigned int | f | ) |
Definition at line 211 of file SingleMsg.cpp.
References Msg::e1(), f2_, and Element::markRewired().
|
virtual |
Return all the sources of e2 from e1, that is, all the msgs coming into specified entries on e2 from e1.
ALLDATA used when the sources include all data entries on a source. Indexing is v[dataId in range e2.numData][src list]
Implements Msg.
Definition at line 55 of file SingleMsg.cpp.
References Msg::e1_, Msg::e2_, i1_, i2_, and Element::numData().
|
virtual |
Return all the targets of e1 on e2, that is, all the msgs going from specified entries on e1 to e2. ALLDATA used when the targets include all data entries on a target. Indexing is v[dataId in range e1.numData][tgt list]
Implements Msg.
Definition at line 62 of file SingleMsg.cpp.
References Msg::e1_, Msg::e2_, f2_, i1_, i2_, and Element::numData().
|
friend |
|
private |
Definition at line 60 of file SingleMsg.h.
Referenced by copy(), firstTgt(), getTargetField(), setTargetField(), and targets().
|
private |
Definition at line 58 of file SingleMsg.h.
Referenced by copy(), findOtherEnd(), firstTgt(), getI1(), i1(), setI1(), sources(), and targets().
|
private |
Definition at line 59 of file SingleMsg.h.
Referenced by copy(), findOtherEnd(), firstTgt(), getI2(), i2(), setI2(), sources(), and targets().
|
staticprivate |
Definition at line 61 of file SingleMsg.h.
Referenced by Msg::initMsgManagers(), and managerId().
|
staticprivate |
Definition at line 62 of file SingleMsg.h.
Referenced by lookupMsg(), numMsg(), SingleMsg(), and ~SingleMsg().