Loading...
Searching...
No Matches
UPstream::commsStruct Class Reference

Structure for communicating between processors. More...

#include <UPstream.H>

Public Member Functions

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

Constructor & Destructor Documentation

◆ commsStruct() [1/3]

commsStruct ( )
inlinenoexcept

Default construct with above == -1.

Definition at line 262 of file UPstream.H.

References Foam::noexcept.

Referenced by operator!=(), operator<<, and operator==().

Here is the caller graph for this function:

◆ commsStruct() [2/3]

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

Move construct from components.

Definition at line 239 of file UPstreamCommsStruct.C.

References above(), allBelow(), allNotBelow(), and below().

Here is the call graph for this function:

◆ 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 254 of file UPstreamCommsStruct.C.

References Foam::abort(), above(), allBelow(), below(), 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 295 of file UPstream.H.

References Foam::noexcept.

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

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 300 of file UPstream.H.

References Foam::noexcept.

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

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 306 of file UPstream.H.

References Foam::noexcept.

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

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 312 of file UPstream.H.

References Foam::noexcept.

Referenced by commsStruct(), and 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 Foam::noexcept.

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

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 334 of file UPstreamCommsStruct.C.

References above(), below(), and reset().

Referenced by reset().

Here is the call graph for this function:
Here is the caller 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 360 of file UPstreamCommsStruct.C.

References above(), allBelow(), below(), reset(), reset_linear(), 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 above(), below(), and commsStruct().

Here is the call graph for this function:

◆ operator!=()

bool operator!= ( const commsStruct & comm) const

Definition at line 513 of file UPstreamCommsStruct.C.

References commsStruct(), and Foam::operator==().

Here is the call graph for this function:

◆ operator<<

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

References commsStruct().


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