Go to the documentation of this file.
48 template<
class T,
class CombineOp>
75 reinterpret_cast<char*
>(&value),
83 Pout<<
" received from "
84 << belowID <<
" data:" << value <<
endl;
96 Pout<<
" received from "
97 << belowID <<
" data:" << value <<
endl;
105 if (myComm.
above() != -1)
110 <<
" data:" << Value <<
endl;
119 reinterpret_cast<const char*
>(&Value),
142 template <
class T,
class CombineOp>
146 const CombineOp& cop,
191 if (myComm.
above() != -1)
199 reinterpret_cast<char*
>(&Value),
215 Value =
T(fromAbove);
220 Pout<<
" received from "
221 << myComm.
above() <<
" data:" << Value <<
endl;
232 Pout<<
" sending to " << belowID <<
" data:" << Value <<
endl;
241 reinterpret_cast<const char*
>(&Value),
280 template<
class T,
class CombineOp>
285 const CombineOp& cop,
308 reinterpret_cast<char*
>(receivedValues.begin()),
309 receivedValues.byteSize(),
316 Pout<<
" received from "
317 << belowID <<
" data:" << receivedValues <<
endl;
322 cop(Values[i], receivedValues[i]);
328 List<T> receivedValues(fromBelow);
332 Pout<<
" received from "
333 << belowID <<
" data:" << receivedValues <<
endl;
338 cop(Values[i], receivedValues[i]);
344 if (myComm.
above() != -1)
349 <<
" data:" << Values <<
endl;
358 reinterpret_cast<const char*
>(Values.begin()),
381 template<
class T,
class CombineOp>
385 const CombineOp& cop,
430 if (myComm.
above() != -1)
438 reinterpret_cast<char*
>(Values.begin()),
459 Pout<<
" received from "
460 << myComm.
above() <<
" data:" << Values <<
endl;
471 Pout<<
" sending to " << belowID <<
" data:" << Values <<
endl;
480 reinterpret_cast<const char*
>(Values.begin()),
533 template<
class Container,
class CombineOp>
538 const CombineOp& cop,
554 Container receivedValues(fromBelow);
558 Pout<<
" received from "
559 << belowID <<
" data:" << receivedValues <<
endl;
564 typename Container::const_iterator slaveIter =
565 receivedValues.begin();
566 slaveIter != receivedValues.end();
570 typename Container::iterator
571 masterIter = Values.find(slaveIter.key());
573 if (masterIter != Values.end())
575 cop(masterIter(), slaveIter());
579 Values.insert(slaveIter.key(), slaveIter());
585 if (myComm.
above() != -1)
590 <<
" data:" << Values <<
endl;
600 template<
class Container,
class CombineOp>
604 const CombineOp& cop,
634 template<
class Container>
649 if (myComm.
above() != -1)
663 Pout<<
" received from "
664 << myComm.
above() <<
" data:" << Values <<
endl;
675 Pout<<
" sending to " << belowID <<
" data:" << Values <<
endl;
685 template <
class Container>
static void mapCombineGather(const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm)
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.
Output inter-processor communications stream.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
static void combineGather(const List< commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm)
Structure for communicating between processors.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static int nProcsSimpleSum
Number of processors at which the sum algorithm changes from linear.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void mapCombineScatter(const List< commsStruct > &comms, Container &Values, const int tag, const label comm)
Scatter data. Reverse of combineGather.
prefixOSstream Pout(cout, "Pout")
Template function to specify if the data of a type are contiguous.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Input inter-processor communications stream.
void size(const label)
Override size to be inconsistent with allocated storage.
static const List< commsStruct > & linearCommunication(const label communicator=0)
Communication schedule for linear all-to-master (proc 0)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
static void combineScatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
const labelList & below() const
static const List< commsStruct > & treeCommunication(const label communicator=0)
Communication schedule for tree all-to-master (proc 0)