UPstream::commsStructList Class Reference

Collection of communication structures. More...

Public Member Functions

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

Static Public Member Functions

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

Friends

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

Detailed Description

Collection of communication structures.

Definition at line 386 of file UPstream.H.

Constructor & Destructor Documentation

◆ commsStructList() [1/2]

commsStructList ( )
inlinenoexcept

Construct empty with invalid communicator.

Definition at line 412 of file UPstream.H.

◆ commsStructList() [2/2]

commsStructList ( int  comm,
bool  flat = false 
)
inlineexplicitnoexcept

Construct empty with given communicator.

Definition at line 421 of file UPstream.H.

Member Function Documentation

◆ null()

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

An empty structure. Used for placeholders etc.

Definition at line 404 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 441 of file UPstream.H.

◆ comm()

int comm ( ) const
inlinenoexcept

The communicator internal index.

Definition at line 446 of file UPstream.H.

◆ linear() [1/2]

bool linear ( ) const
inlinenoexcept

Linear (flat) communication instead of tree communication.

Definition at line 451 of file UPstream.H.

◆ linear() [2/2]

void linear ( bool  on)

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

Definition at line 419 of file UPstreamCommsStruct.C.

◆ clear()

void clear ( )
inline

Clear the list.

Definition at line 462 of file UPstream.H.

References List< T >::clear().

Here is the call graph for this function:

◆ empty()

bool empty ( ) const
inlinenoexcept

True if the list is empty.

Definition at line 467 of file UPstream.H.

References UList< T >::empty().

Referenced by Foam::printGraph_impl().

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

◆ size()

label size ( ) const
inlinenoexcept

The number of entries.

Definition at line 472 of file UPstream.H.

References UList< T >::size().

Referenced by Foam::printGraph_impl().

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

References UPstream::nProcs().

Referenced by UPstream::linearCommunication(), and UPstream::treeCommunication().

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

◆ get()

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

Get existing or create (demand-driven) entry.

Definition at line 470 of file UPstreamCommsStruct.C.

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

Here is the call graph for this function:

◆ operator[]()

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

Get existing or create (demand-driven) entry.

Definition at line 504 of file UPstream.H.

◆ printGraph()

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

Print un-directed graph in graphviz dot format.

Definition at line 302 of file UPstreamCommsStruct.C.

References Foam::printGraph_impl().

Here is the call graph for this function:

◆ writeList()

Ostream& writeList ( Ostream os) const
inline

Write the communication tree.

Definition at line 517 of file UPstream.H.

References UList< T >::writeList().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

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

Write the communication tree.

Definition at line 529 of file UPstream.H.


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