Go to the documentation of this file.
44 for (label i=0; i <
n; ++i)
46 for (
direction cmpt=0; cmpt < nCmpt; ++cmpt)
61 for (
const Type& val :
values)
68 template<
class Type,
unsigned N>
75 for (
const Type& val :
values)
90 for (
const label idx : addressing)
105 for (
const label idx : selected)
138 <<
"Contiguous data only" <<
endl
145 UPstream::listGatherValues<std::pair<label, Type>>
147 std::pair<label, Type>(
count, val)
151 if (Pstream::master())
153 for (
const auto& countVal : countValues)
156 vtk::write(fmt, countVal.first, countVal.second);
173 <<
"Contiguous data only" <<
endl
181 UPstream::listGatherValues<label>(
values.size()),
186 if (Pstream::master())
194 for (
const label proci : procAddr.
subProcs())
199 UPstream::commsTypes::scheduled,
201 recvData.data_bytes(),
202 recvData.size_bytes()
212 UPstream::commsTypes::scheduled,
233 <<
"Contiguous data only" <<
endl
239 if (!Pstream::master())
247 UPstream::listGatherValues<label>(sendData.size()),
252 if (Pstream::master())
260 for (
const label proci : procAddr.
subProcs())
265 UPstream::commsTypes::scheduled,
267 recvData.data_bytes(),
268 recvData.size_bytes()
277 UPstream::commsTypes::scheduled,
279 sendData.cdata_bytes(),
280 sendData.size_bytes()
298 <<
"Contiguous data only" <<
endl
304 if (!Pstream::master())
312 UPstream::listGatherValues<label>(sendData.size()),
317 if (Pstream::master())
325 for (
const label proci : procAddr.
subProcs())
330 UPstream::commsTypes::scheduled,
332 recvData.data_bytes(),
333 recvData.size_bytes()
342 UPstream::commsTypes::scheduled,
344 sendData.cdata_bytes(),
345 sendData.size_bytes()
363 <<
"Contiguous data only" <<
endl
371 UPstream::listGatherValues<label>(values1.
size()),
376 UPstream::listGatherValues<label>(values2.
size()),
381 if (Pstream::master())
393 for (
const label proci : procAddr1.
subProcs())
399 UPstream::commsTypes::scheduled,
401 recvData.data_bytes(),
402 recvData.size_bytes()
410 UPstream::commsTypes::scheduled,
412 recvData.data_bytes(),
413 recvData.size_bytes()
422 UPstream::commsTypes::scheduled,
430 UPstream::commsTypes::scheduled,
452 <<
"Contiguous data only" <<
endl
458 if (!Pstream::master())
467 UPstream::listGatherValues<label>(values1.
size()),
472 UPstream::listGatherValues<label>(sendData2.size()),
477 if (Pstream::master())
490 for (
const label proci : procAddr1.
subProcs())
496 UPstream::commsTypes::scheduled,
498 recvData.data_bytes(),
499 recvData.size_bytes()
507 UPstream::commsTypes::scheduled,
509 recvData.data_bytes(),
510 recvData.size_bytes()
519 UPstream::commsTypes::scheduled,
527 UPstream::commsTypes::scheduled,
529 sendData2.cdata_bytes(),
530 sendData2.size_bytes()
const char * cdata_bytes() const noexcept
Return pointer to the underlying array serving as data storage,.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
List< T > subset(const BoolListType &select, const UList< T > &input, const bool invert=false)
Extract elements of the input list when select is true.
label localSize() const
My local size.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeListsParallel(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2)
Write a list of values and another list of values.
void writeValueParallel(vtk::formatter &fmt, const Type &val, const label count=1)
Component-wise write of a value (N times) in parallel.
void writeList(vtk::formatter &fmt, const UList< uint8_t > &values)
Write a list of uint8_t values.
void writeLists(vtk::formatter &fmt, const UList< Type > &values1, const UList< Type > &values2, const labelUList &addressing)
Write a list of values and a list of values via indirect addressing.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
errorManipArg< error, int > exit(error &err, const int errNo=1)
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A traits class, which is primarily used for primitives.
A 1D vector of objects of type <T> with a fixed length <N>.
label maxNonLocalSize() const
The max of localSizes, excluding current processor.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
void resize_nocopy(const label len)
A List with indirect addressing.
Various functions to operate on Lists.
void size(const label n)
Older name for setAddressableSize.
void writeListParallel(vtk::formatter &fmt, const UList< Type > &values)
Write a list of values.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
A template class to specify that a data type can be considered as being contiguous in memory.