36 const UList<Type>& values,
37 List<DynamicList<Type>>& trackValues
40 List<Type> allValues(cloudGather_.gather(values));
42 const label
nTracks = trackValues.size();
46 const label globalId =
49 if (globalId % stride_ == 0)
51 const label trackId = globalId/stride_;
56 && trackValues[trackId].size() < maxPositions_
59 trackValues[trackId].append(allValues[i]);
74 if (fieldTable.empty())
80 for (
const word& fieldName : fieldNames)
82 fieldTable(fieldName).resize(nTracks());
87 for (
const word& fieldName : fieldTable.sortedToc())
89 auto& output = fieldTable[fieldName];
93 this->createTrackField
100 return fieldTable.size();
Various functions to operate on Lists.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A HashTable similar to std::unordered_map.
A primitive field of type <T> with automated input and output.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static void combineReduce(T &value, CombineOp cop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) applying cop to inplace combine value from different processors.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const UList< T > & null() noexcept
Return a null UList (reference to a nullObject). Behaves like an empty UList.
Registry of regIOobjects.
labelField origProcIds_
The originating processor ids.
label nTracks() const noexcept
Number of tracks to generate.
void createTrackField(const UList< Type > &values, List< DynamicList< Type > > &trackValues) const
label setTrackFields(const objectRegistry &obr, HashTable< List< DynamicList< Type > > > &fieldTable) const
labelField origParcelIds_
The originating parcel ids.
A class for handling words, derived from Foam::string.
List< word > wordList
List of word.
#define forAll(list, i)
Loop across all elements in list.
List helper to append y unique elements onto the end of x.