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]);
69 const objectRegistry& obr,
70 HashTable<List<DynamicList<Type>>>& fieldTable
74 if (fieldTable.empty())
76 wordList fieldNames = obr.names<IOField<Type>>();
84 for (
const word& fieldName : fieldNames)
86 fieldTable(fieldName).resize(nTracks());
91 for (
const word& fieldName : fieldTable.sortedToc())
93 auto&
output = fieldTable[fieldName];
95 const auto* ptr = obr.cfindObject<IOField<Type>>(fieldName);
97 this->createTrackField
99 ptr ?
static_cast<const UList<Type>&
>(*ptr) : UList<Type>::null(),
104 return fieldTable.size();
Various functions to operate on Lists.
static void combineGather(const List< commsStruct > &comms, T &value, const CombineOp &cop, const int tag, const label comm)
static void broadcast(Type &value, const label comm=UPstream::worldComm)
static bool & parRun() noexcept
Test if this a parallel run.
label toGlobal(const label i) const
From local to global index.
static void gather(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const UPstream::commsTypes=UPstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).
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.
List< word > wordList
A List of words.
static Ostream & output(Ostream &os, const IntRange< T > &range)
#define forAll(list, i)
Loop across all elements in list.