35 UPstream::Communicator(MPI_COMM_NULL)
41Foam::UPstream::Communicator
44 MPI_Comm mpiComm = MPI_COMM_NULL;
60 <<
"Should be within range [-1,"
65 return UPstream::Communicator(mpiComm);
79 *
this = UPstream::Communicator(MPI_COMM_NULL);
89 if (MPI_COMM_SELF == comm)
95 (MPI_COMM_NULL == comm)
96 || (MPI_SUCCESS != MPI_Comm_size(comm, &val))
void reset() noexcept
Reset to default constructed value (MPI_COMM_NULL).
bool good() const noexcept
True if not equal to MPI_COMM_NULL.
Communicator() noexcept
Default construct as MPI_COMM_NULL.
int size() const
The number of ranks associated with the communicator.
static Communicator lookup(int communicator=-1)
Transcribe internally indexed communicator to wrapped value.
Wrapper for internally indexed communicator label. Always invokes UPstream::allocateCommunicatorCompo...
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
#define WarningInFunction
Report a warning using Foam::Warning.
DynamicList< MPI_Comm > MPICommunicators_
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).
static Type to_mpi(UPstream::Communicator arg) noexcept
Cast UPstream::Communicator to MPI_Comm.