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

Collection of communication structures. More...

#include <UPstream.H>

Public Member Functions

 commsStructList () noexcept
 Construct empty with invalid communicator.
 commsStructList (int comm, bool flat=false) noexcept
 Construct empty with given communicator.
bool good () const noexcept
 True if communicator is non-negative (ie, was assigned).
int comm () const noexcept
 The communicator internal index.
bool linear () const noexcept
 Linear (flat) communication instead of tree communication.
void linear (bool on)
 Change communication type (linear vs tree communication). Resets existing structure.
void clear ()
 Clear the list.
bool empty () const noexcept
 True if the list is empty.
label size () const noexcept
 The number of entries.
void init (int communicator)
 Reset communicator index, fill tree with empty entries.
void init (int communicator, bool flat)
 Reset communicator index, fill tree with empty entries. Specify flat vs tree communication.
void reset (int communicator)
 Reset communicator index, clear tree entries.
void reset (int communicator, bool flat)
 Reset communicator index, clear tree entries. Specify flat vs tree communication.
const UPstream::commsStructget (int proci) const
 Get existing or create (demand-driven) entry.
const UPstream::commsStructoperator[] (int proci) const
 Get existing or create (demand-driven) entry.
void printGraph (Ostream &os, int proci=0) const
 Print un-directed graph in graphviz dot format.
OstreamwriteList (Ostream &os) const
 Write the communication tree.

Static Public Member Functions

static const commsStructListnull ()
 An empty structure. Used for placeholders etc.

Friends

Ostreamoperator<< (Ostream &os, const commsStructList &rhs)
 Write the communication tree.

Detailed Description

Collection of communication structures.

Definition at line 362 of file UPstream.H.

Constructor & Destructor Documentation

◆ commsStructList() [1/2]

commsStructList ( )
inlinenoexcept

Construct empty with invalid communicator.

Definition at line 388 of file UPstream.H.

References Foam::noexcept.

Referenced by operator<<.

Here is the caller graph for this function:

◆ commsStructList() [2/2]

commsStructList ( int comm,
bool flat = false )
inlineexplicitnoexcept

Construct empty with given communicator.

Definition at line 397 of file UPstream.H.

References comm(), and Foam::noexcept.

Here is the call graph for this function:

Member Function Documentation

◆ null()

const Foam::UPstream::commsStructList & null ( )
static

An empty structure. Used for placeholders etc.

Definition at line 403 of file UPstreamCommsStruct.C.

Referenced by UPstream::whichCommunication().

Here is the caller graph for this function:

◆ good()

bool good ( ) const
inlinenoexcept

True if communicator is non-negative (ie, was assigned).

Definition at line 417 of file UPstream.H.

References Foam::noexcept.

◆ comm()

int comm ( ) const
inlinenoexcept

The communicator internal index.

Definition at line 422 of file UPstream.H.

References Foam::noexcept.

Referenced by commsStructList().

Here is the caller graph for this function:

◆ linear() [1/2]

bool linear ( ) const
inlinenoexcept

Linear (flat) communication instead of tree communication.

Definition at line 427 of file UPstream.H.

References Foam::noexcept.

◆ linear() [2/2]

void linear ( bool on)

Change communication type (linear vs tree communication). Resets existing structure.

Definition at line 418 of file UPstreamCommsStruct.C.

◆ clear()

void clear ( )
inline

Clear the list.

Definition at line 438 of file UPstream.H.

◆ empty()

bool empty ( ) const
inlinenoexcept

True if the list is empty.

Definition at line 443 of file UPstream.H.

References Foam::noexcept.

Referenced by Foam::printGraph_impl().

Here is the caller graph for this function:

◆ size()

label size ( ) const
inlinenoexcept

The number of entries.

Definition at line 448 of file UPstream.H.

References Foam::noexcept.

Referenced by printGraph(), and Foam::printGraph_impl().

Here is the caller graph for this function:

◆ init() [1/2]

void init ( int communicator)

Reset communicator index, fill tree with empty entries.

Definition at line 450 of file UPstreamCommsStruct.C.

References UPstream::nProcs().

Here is the call graph for this function:

◆ init() [2/2]

void init ( int communicator,
bool flat )

Reset communicator index, fill tree with empty entries. Specify flat vs tree communication.

Definition at line 461 of file UPstreamCommsStruct.C.

References UPstream::init().

Here is the call graph for this function:

◆ reset() [1/2]

void reset ( int communicator)

Reset communicator index, clear tree entries.

Definition at line 435 of file UPstreamCommsStruct.C.

◆ reset() [2/2]

void reset ( int communicator,
bool flat )

Reset communicator index, clear tree entries. Specify flat vs tree communication.

Definition at line 442 of file UPstreamCommsStruct.C.

◆ get()

const Foam::UPstream::commsStruct & get ( int proci) const

Get existing or create (demand-driven) entry.

Definition at line 469 of file UPstreamCommsStruct.C.

References UPstream::nProcs(), reset(), and resize().

Referenced by operator[]().

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

◆ operator[]()

const UPstream::commsStruct & operator[] ( int proci) const
inline

Get existing or create (demand-driven) entry.

Definition at line 480 of file UPstream.H.

References get().

Here is the call graph for this function:

◆ printGraph()

void printGraph ( Ostream & os,
int proci = 0 ) const

Print un-directed graph in graphviz dot format.

Definition at line 300 of file UPstreamCommsStruct.C.

References os(), Foam::printGraph_impl(), and size().

Here is the call graph for this function:

◆ writeList()

Ostream & writeList ( Ostream & os) const
inline

Write the communication tree.

Definition at line 493 of file UPstream.H.

References os().

Here is the call graph for this function:

◆ operator<<

Ostream & operator<< ( Ostream & os,
const commsStructList & rhs )
friend

Write the communication tree.

Definition at line 504 of file UPstream.H.

References commsStructList(), os(), and Foam::rhs().


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