36 void Foam::distributionMap::applyDummyTransforms(List<T>& field)
const
38 forAll(transformElements_, trafoI)
40 const labelList& elems = transformElements_[trafoI];
42 label n = transformStart_[trafoI];
46 field[
n++] = field[elems[i]];
53 void Foam::distributionMap::applyDummyInverseTransforms(List<T>& field)
const
55 forAll(transformElements_, trafoI)
57 const labelList& elems = transformElements_[trafoI];
58 label n = transformStart_[trafoI];
62 field[elems[i]] = field[
n++];
68 template<
class T,
class TransformOp>
69 void Foam::distributionMap::applyTransforms
71 const globalIndexAndTransform& globalTransforms,
73 const TransformOp& top
76 const List<transformer>& totalTransform =
77 globalTransforms.transformPermutations();
79 forAll(totalTransform, trafoI)
81 const transformer& vt = totalTransform[trafoI];
82 const labelList& elems = transformElements_[trafoI];
83 label n = transformStart_[trafoI];
86 List<T> transformFld(UIndirectList<T>(field, elems));
87 top(vt,
true, transformFld);
92 field[
n++] = transformFld[i];
98 template<
class T,
class TransformOp>
99 void Foam::distributionMap::applyInverseTransforms
101 const globalIndexAndTransform& globalTransforms,
103 const TransformOp& top
106 const List<transformer>& totalTransform =
107 globalTransforms.transformPermutations();
109 forAll(totalTransform, trafoI)
111 const transformer& vt = totalTransform[trafoI];
112 const labelList& elems = transformElements_[trafoI];
113 label n = transformStart_[trafoI];
116 List<T> transformFld(SubList<T>(field, elems.size(),
n));
117 top(vt,
false, transformFld);
122 field[elems[i]] = transformFld[i];
128 template<
class T,
class negateOp>
132 const negateOp& negOp,
142 applyDummyTransforms(
fld);
173 fld.setCapacity(fldList.
size());
180 const label constructSize,
188 applyDummyInverseTransforms(
fld);
198 const label constructSize,
207 applyDummyInverseTransforms(
fld);
214 template<
class T,
class TransformOp>
219 const TransformOp& top,
224 distribute(
fld,
false, tag);
226 applyTransforms(git,
fld, top);
230 template<
class T,
class TransformOp>
234 const label constructSize,
236 const TransformOp& top,
243 applyInverseTransforms(git,
fld, top);
246 reverseDistribute(constructSize,
fld,
false, tag);
250 template<
class T,
class TransformOp>
254 const label constructSize,
257 const TransformOp& top,
264 applyInverseTransforms(git,
fld, top);
267 reverseDistribute(constructSize, nullValue,
fld,
false, tag);
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
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.
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
static void distribute(const Pstream::commsTypes commsType, const List< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &, const negateOp &negOp, const int tag=UPstream::msgType())
Distribute data. Note:schedule only used for.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
Class containing functor to negate primitives. Dummy for all other types.
gmvFile<< "tracers "<< particles.size()<< nl;{ pointField positions(particles.size());label particlei=0;forAllConstIter(Cloud< passiveParticle >, particles, iter) { positions[particlei++]=iter().position(mesh);} for(i=0;i< pTraits< point >::nComponents;i++) { forAll(positions, particlei) { gmvFile<< component(positions[particlei], i)<< ' ';} gmvFile<< nl;}}forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)