36 template<
class Container,
class T>
56 <<
"Size of list " << sendBufs.
size()
57 <<
" does not equal the number of processors "
73 label nRecv = recvSizes[proci];
82 reinterpret_cast<char*
>(recvBufs[proci].begin()),
104 reinterpret_cast<const char*
>(sendBufs[proci].begin()),
105 sendBufs[proci].size()*
sizeof(
T),
112 <<
"Cannot send outgoing message. "
113 <<
"to:" << proci <<
" nBytes:"
114 <<
label(sendBufs[proci].size()*
sizeof(
T))
135 template<
class Container>
138 const Container& sendBufs,
146 <<
"Size of container " << sendBufs.size()
147 <<
" does not equal the number of processors "
155 sendSizes[proci] = sendBufs[proci].
size();
158 allToAll(sendSizes, recvSizes, comm);
162 template<
class Container,
class T>
173 exchangeSizes(sendBufs, recvSizes, comm);
175 exchange<Container, T>(sendBufs, recvSizes, recvBufs, tag, comm,
block);
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
#define forAll(list, i)
Loop across all elements in list.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
static void exchangeSizes(const Container &sendData, labelList &sizes, const label comm=UPstream::worldComm)
Helper: exchange sizes of sendData. sendData is the data per.
static void exchange(const UList< Container > &sendData, const labelUList &recvSizes, List< Container > &recvData, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool block=true)
Helper: exchange contiguous data. Sends sendData, receives into.
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Read into given buffer from given processor and return the.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const
Return the number of elements in the UList.
static bool write(const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Write given buffer to given processor.
static label nRequests()
Get number of outstanding requests.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
Template function to specify if the data of a type are contiguous.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)