32 #ifndef PstreamReduceOps_H
33 #define PstreamReduceOps_H
47 template<
class T,
class BinaryOp>
59 Pout<<
"** reducing:" << Value <<
" with comm:" << comm
69 template<
class T,
class BinaryOp>
90 template<
class T,
class BinaryOp>
144 template<
class T,
class BinaryOp>
162 const sumOp<scalar>& bop,
170 const minOp<scalar>& bop,
178 const sumOp<vector2D>& bop,
194 const sumOp<scalar>& bop,
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
static void gather(const List< commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Gather data. Apply bop to combine Value.
static label warnComm
Debugging: warn for use of any communicator differing from warnComm.
static label worldComm
Default communicator (all processors)
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 int & msgType()
Message tag of standard messages.
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 void printStack(Ostream &)
Helper function to print a stack.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
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.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
prefixOSstream Pout(cout, "Pout")
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void sumReduce(T &Value, label &Count, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Combination-Reduction operation for a parallel run.