57 <<
"Size of list:" << Values.
size()
58 <<
" does not equal the number of processors:"
70 const labelList& belowLeaves = comms[belowID].allBelow();
80 reinterpret_cast<char*
>(receivedValues.
begin()),
86 Values[belowID] = receivedValues[0];
90 Values[belowLeaves[leafI]] = receivedValues[leafI + 1];
103 fromBelow >> Values[belowID];
107 Pout<<
" received through "
108 << belowID <<
" data from:" << belowID
109 <<
" data:" << Values[belowID] <<
endl;
113 forAll(belowLeaves, leafI)
115 label leafID = belowLeaves[leafI];
116 fromBelow >> Values[leafID];
120 Pout<<
" received through "
121 << belowID <<
" data from:" << leafID
122 <<
" data:" << Values[leafID] <<
endl;
131 if (myComm.
above() != -1)
147 forAll(belowLeaves, leafI)
149 sendingValues[leafI + 1] = Values[belowLeaves[leafI]];
156 reinterpret_cast<const char*
>(sendingValues.
begin()),
174 forAll(belowLeaves, leafI)
176 label leafID = belowLeaves[leafI];
180 Pout<<
" sending to "
181 << myComm.
above() <<
" data from:" << leafID
182 <<
" data:" << Values[leafID] <<
endl;
184 toAbove << Values[leafID];
220 <<
"Size of list:" << Values.
size()
221 <<
" does not equal the number of processors:"
230 if (myComm.
above() != -1)
242 reinterpret_cast<char*
>(receivedValues.
begin()),
248 forAll(notBelowLeaves, leafI)
250 Values[notBelowLeaves[leafI]] = receivedValues[leafI];
264 forAll(notBelowLeaves, leafI)
266 label leafID = notBelowLeaves[leafI];
267 fromAbove >> Values[leafID];
271 Pout<<
" received through "
272 << myComm.
above() <<
" data for:" << leafID
273 <<
" data:" << Values[leafID] <<
endl;
283 const labelList& notBelowLeaves = comms[belowID].allNotBelow();
289 forAll(notBelowLeaves, leafI)
291 sendingValues[leafI] = Values[notBelowLeaves[leafI]];
298 reinterpret_cast<const char*
>(sendingValues.
begin()),
316 forAll(notBelowLeaves, leafI)
318 label leafID = notBelowLeaves[leafI];
319 toBelow << Values[leafID];
323 Pout<<
" sent through "
324 << belowID <<
" data for:" << leafID
325 <<
" data:" << Values[leafID] <<
endl;
353 template<
class ListType>
356 typedef typename ListType::value_type Type;
364 list = ListListOps::combine<List<Type>>
#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 scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void concatenateList(ListType &list)
Gather the given list and concatenate on the master.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
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.
virtual Ostream & write(const token &)
Write token.
Structure for communicating between processors.
const labelList & allNotBelow() const
const labelList & allBelow() const
const labelList & below() const
static bool master(const label communicator=0)
Am I the master process.
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.
#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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
prefixOSstream Pout(cout, "Pout")