UPstream::commsStruct Class Reference

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 labelListbelow () const noexcept
 The procIDs of the processors directly below. More...
 
const labelListallBelow () const noexcept
 The procIDs of all processors below (so not just directly below) More...
 
const labelListallNotBelow () 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

Ostreamoperator<< (Ostream &, const commsStruct &)
 

Detailed Description

Structure for communicating between processors.

Definition at line 104 of file UPstream.H.

Constructor & Destructor Documentation

◆ commsStruct() [1/3]

commsStruct ( )
inlinenoexcept

Default construct with above == -1.

Definition at line 139 of file UPstream.H.

◆ commsStruct() [2/3]

commsStruct ( const label  above,
labelList &&  below,
labelList &&  allBelow,
labelList &&  allNotBelow 
)

Move construct from components.

Definition at line 27 of file UPstreamCommsStruct.C.

◆ commsStruct() [3/3]

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.

Here is the call graph for this function:

Member Function Documentation

◆ printGraph()

void printGraph ( Ostream os,
const UList< UPstream::commsStruct > &  comms,
const label  proci = 0 
)
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().

Here is the call graph for this function:

◆ nProcs()

Foam::label nProcs ( ) const

The number of processors addressed by the structure.

Definition at line 154 of file UPstreamCommsStruct.C.

References UList< T >::size().

Here is the call graph for this function:

◆ above()

◆ below()

◆ allBelow()

const labelList& allBelow ( ) const
inlinenoexcept

The procIDs of all processors below (so not just directly below)

Definition at line 199 of file UPstream.H.

Referenced by Pstream::gatherList(), and Foam::operator<<().

Here is the caller graph for this function:

◆ allNotBelow()

const labelList& allNotBelow ( ) const
inlinenoexcept

The procIDs of all processors not below myProcNo. The inverse set of allBelow without myProcNo.

Definition at line 205 of file UPstream.H.

Referenced by Foam::operator<<(), and Pstream::scatterList().

Here is the caller graph for this function:

◆ reset() [1/2]

void reset ( )

Reset to default constructed state.

Definition at line 160 of file UPstreamCommsStruct.C.

◆ reset() [2/2]

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().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const commsStruct comm) const

Definition at line 292 of file UPstreamCommsStruct.C.

References UPstream::commsStruct::above(), and UPstream::commsStruct::below().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const commsStruct comm) const

Definition at line 304 of file UPstreamCommsStruct.C.

References Foam::operator==().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const commsStruct  
)
friend

The documentation for this class was generated from the following files: