Structure for communicating between processors. More...
Public Member Functions | |
commsStruct () noexcept | |
Default construct with above == -1. More... | |
commsStruct (const label above, labelList &&below, labelList &&allBelow, labelList &&allNotBelow) | |
Move construct from components. More... | |
commsStruct (const label numProcs, const label myProcID, const label above, const labelUList &below, const labelUList &allBelow) | |
Copy construct from below, allBelow components. More... | |
label | nProcs () const |
The number of processors addressed by the structure. More... | |
label | above () const noexcept |
The procID of the processor directly above. More... | |
const labelList & | below () const noexcept |
The procIDs of the processors directly below. More... | |
const labelList & | allBelow () const noexcept |
The procIDs of all processors below (so not just directly below) More... | |
const labelList & | allNotBelow () const noexcept |
The procIDs of all processors not below myProcNo. The inverse set of allBelow without myProcNo. More... | |
void | reset () |
Reset to default constructed state. More... | |
void | reset (const label procID, const label numProcs) |
Reset with automatic linear/tree selection. More... | |
bool | operator== (const commsStruct &) const |
bool | operator!= (const commsStruct &) const |
Static Public Member Functions | |
static void | printGraph (Ostream &os, const UList< UPstream::commsStruct > &comms, const label proci=0) |
Print un-directed graph in graphviz dot format. More... | |
Friends | |
Ostream & | operator<< (Ostream &, const commsStruct &) |
Structure for communicating between processors.
Definition at line 116 of file UPstream.H.
|
inlinenoexcept |
Default construct with above == -1.
Definition at line 151 of file UPstream.H.
commsStruct | ( | const label | above, |
labelList && | below, | ||
labelList && | allBelow, | ||
labelList && | allNotBelow | ||
) |
Move construct from components.
Definition at line 27 of file UPstreamCommsStruct.C.
commsStruct | ( | const label | numProcs, |
const label | myProcID, | ||
const label | above, | ||
const labelUList & | below, | ||
const labelUList & | allBelow | ||
) |
Copy construct from below, allBelow components.
Definition at line 42 of file UPstreamCommsStruct.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and Foam::nl.
|
static |
Print un-directed graph in graphviz dot format.
Definition at line 89 of file UPstreamCommsStruct.C.
References UList< T >::empty(), Foam::indent(), Foam::nl, os(), and Foam::pos().
Foam::label nProcs | ( | ) | const |
The number of processors addressed by the structure.
Definition at line 154 of file UPstreamCommsStruct.C.
References UList< T >::size().
|
inlinenoexcept |
The procID of the processor directly above.
Definition at line 200 of file UPstream.H.
Referenced by Foam::operator<<(), and UPstream::commsStruct::operator==().
|
inlinenoexcept |
The procIDs of the processors directly below.
Definition at line 205 of file UPstream.H.
Referenced by Foam::operator<<(), and UPstream::commsStruct::operator==().
|
inlinenoexcept |
The procIDs of all processors below (so not just directly below)
Definition at line 211 of file UPstream.H.
Referenced by Foam::operator<<().
|
inlinenoexcept |
The procIDs of all processors not below myProcNo. The inverse set of allBelow without myProcNo.
Definition at line 217 of file UPstream.H.
Referenced by Foam::operator<<().
void reset | ( | ) |
Reset to default constructed state.
Definition at line 160 of file UPstreamCommsStruct.C.
void reset | ( | const label | procID, |
const label | numProcs | ||
) |
Reset with automatic linear/tree selection.
Definition at line 170 of file UPstreamCommsStruct.C.
References Foam::identity(), UPstream::nProcsSimpleSum, UPstream::procID(), and DynamicList< T, SizeMin >::push_back().
bool operator== | ( | const commsStruct & | comm | ) | const |
Definition at line 292 of file UPstreamCommsStruct.C.
References UPstream::commsStruct::above(), and UPstream::commsStruct::below().
bool operator!= | ( | const commsStruct & | comm | ) | const |
Definition at line 304 of file UPstreamCommsStruct.C.
References Foam::operator==().
|
friend |