UPstream::commsStruct Class Reference

Structure for communicating between processors. More...

Public Member Functions

 commsStruct () noexcept
 Default construct with above == -1. More...
 
 commsStruct (const int above, List< int > &&below, List< int > &&allBelow, List< int > &&allNotBelow)
 Move construct from components. More...
 
 commsStruct (const int numProcs, const int myProcID, const int above, const UList< int > &below, const UList< int > &allBelow)
 Copy construct from below, allBelow components. More...
 
int above () const noexcept
 The procID of the processor directly above. More...
 
const List< int > & below () const noexcept
 The procIDs of the processors directly below. More...
 
const List< int > & allBelow () const noexcept
 The procIDs of all processors below (so not just directly below) More...
 
const List< int > & allNotBelow () const noexcept
 The procIDs of all processors not below myProcNo. The inverse set of allBelow without myProcNo. More...
 
int nProcs () const noexcept
 The number of processors addressed by the structure. More...
 
void reset ()
 Reset to default constructed state. More...
 
void reset_linear (const int myProci, const int numProcs)
 Reset to linear (flat) communication. More...
 
void reset (const int myProci, const int numProcs, const int communicator)
 Reset to tree selection (linear when very small), possibly with communicator-specific adjustments. More...
 
bool operator== (const commsStruct &) const
 
bool operator!= (const commsStruct &) const
 

Friends

Ostreamoperator<< (Ostream &, const commsStruct &)
 

Detailed Description

Structure for communicating between processors.

Definition at line 220 of file UPstream.H.

Constructor & Destructor Documentation

◆ commsStruct() [1/3]

commsStruct ( )
inlinenoexcept

Default construct with above == -1.

Definition at line 254 of file UPstream.H.

◆ commsStruct() [2/3]

commsStruct ( const int  above,
List< int > &&  below,
List< int > &&  allBelow,
List< int > &&  allNotBelow 
)

Move construct from components.

Definition at line 240 of file UPstreamCommsStruct.C.

◆ commsStruct() [3/3]

commsStruct ( const int  numProcs,
const int  myProcID,
const int  above,
const UList< int > &  below,
const UList< int > &  allBelow 
)

Copy construct from below, allBelow components.

Definition at line 255 of file UPstreamCommsStruct.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

Member Function Documentation

◆ above()

int above ( ) const
inlinenoexcept

The procID of the processor directly above.

Definition at line 287 of file UPstream.H.

Referenced by Foam::operator<<(), and UPstream::commsStruct::operator==().

Here is the caller graph for this function:

◆ below()

const List<int>& below ( ) const
inlinenoexcept

The procIDs of the processors directly below.

Definition at line 292 of file UPstream.H.

Referenced by Foam::operator<<(), and UPstream::commsStruct::operator==().

Here is the caller graph for this function:

◆ allBelow()

const List<int>& allBelow ( ) const
inlinenoexcept

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

Definition at line 298 of file UPstream.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ allNotBelow()

const List<int>& allNotBelow ( ) const
inlinenoexcept

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

Definition at line 304 of file UPstream.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nProcs()

int nProcs ( ) const
noexcept

The number of processors addressed by the structure.

Definition at line 319 of file UPstreamCommsStruct.C.

References UList< T >::size().

Referenced by UPstream::allProcs(), UPstream::is_parallel(), UPstream::subProcs(), and UPstream::whichCommunication().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset() [1/2]

void reset ( )

Reset to default constructed state.

Definition at line 325 of file UPstreamCommsStruct.C.

◆ reset_linear()

void reset_linear ( const int  myProci,
const int  numProcs 
)

Reset to linear (flat) communication.

Definition at line 335 of file UPstreamCommsStruct.C.

References UList< T >::begin(), UList< T >::end(), reset(), and List< T >::resize().

Here is the call graph for this function:

◆ reset() [2/2]

void reset ( const int  myProci,
const int  numProcs,
const int  communicator 
)

Reset to tree selection (linear when very small), possibly with communicator-specific adjustments.

Definition at line 361 of file UPstreamCommsStruct.C.

References reset(), Foam::simpleTree(), and UPstream::usingNodeComms().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const commsStruct comm) const

Definition at line 503 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 513 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: