43 template<
class T,
class CombineOp>
70 reinterpret_cast<char*
>(&value),
78 Pout<<
" received from "
79 << belowID <<
" data:" << value <<
endl;
98 Pout<<
" received from "
99 << belowID <<
" data:" << value <<
endl;
107 if (myComm.
above() != -1)
112 <<
" data:" << Value <<
endl;
121 reinterpret_cast<const char*
>(&Value),
144 template<
class T,
class CombineOp>
148 const CombineOp& cop,
193 if (myComm.
above() != -1)
201 reinterpret_cast<char*
>(&Value),
217 Value =
T(fromAbove);
222 Pout<<
" received from "
223 << myComm.
above() <<
" data:" << Value <<
endl;
234 Pout<<
" sending to " << belowID <<
" data:" << Value <<
endl;
243 reinterpret_cast<const char*
>(&Value),
285 template<
class T,
class CombineOp>
290 const CombineOp& cop,
313 reinterpret_cast<char*
>(receivedValues.
begin()),
321 Pout<<
" received from "
322 << belowID <<
" data:" << receivedValues <<
endl;
327 cop(Values[i], receivedValues[i]);
340 List<T> receivedValues(fromBelow);
344 Pout<<
" received from "
345 << belowID <<
" data:" << receivedValues <<
endl;
350 cop(Values[i], receivedValues[i]);
356 if (myComm.
above() != -1)
361 <<
" data:" << Values <<
endl;
370 reinterpret_cast<const char*
>(Values.
begin()),
393 template<
class T,
class CombineOp>
397 const CombineOp& cop,
442 if (myComm.
above() != -1)
450 reinterpret_cast<char*
>(Values.
begin()),
471 Pout<<
" received from "
472 << myComm.
above() <<
" data:" << Values <<
endl;
483 Pout<<
" sending to " << belowID <<
" data:" << Values <<
endl;
492 reinterpret_cast<const char*
>(Values.
begin()),
546 template<
class Container,
class CombineOp>
551 const CombineOp& cop,
574 Container receivedValues(fromBelow);
578 Pout<<
" received from "
579 << belowID <<
" data:" << receivedValues <<
endl;
584 typename Container::const_iterator slaveIter =
585 receivedValues.begin();
586 slaveIter != receivedValues.end();
590 typename Container::iterator
591 masterIter = Values.find(slaveIter.key());
593 if (masterIter != Values.end())
595 cop(masterIter(), slaveIter());
599 Values.insert(slaveIter.key(), slaveIter());
605 if (myComm.
above() != -1)
610 <<
" data:" << Values <<
endl;
627 template<
class Container,
class CombineOp>
631 const CombineOp& cop,
661 template<
class Container>
676 if (myComm.
above() != -1)
690 Pout<<
" received from "
691 << myComm.
above() <<
" data:" << Values <<
endl;
702 Pout<<
" sending to " << belowID <<
" data:" << Values <<
endl;
719 template<
class Container>
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Input inter-processor communications stream.
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.
Output inter-processor communications stream.
static void combineScatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void mapCombineScatter(const List< commsStruct > &comms, Container &Values, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void mapCombineGather(const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void combineGather(const List< commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
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.
iterator begin()
Return an iterator to begin traversing the UList.
std::streamsize byteSize() const
Return the binary size in number of characters of 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.
Structure for communicating between processors.
const labelList & below() const
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Template function to specify if the data of a type are contiguous.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout(cout, "Pout")
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)