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,
133 const bool dummyTransform,
142 applyDummyTransforms(fld);
151 const bool dummyTransform,
163 const bool dummyTransform,
180 const label constructSize,
182 const bool dummyTransform,
188 applyDummyInverseTransforms(fld);
198 const label constructSize,
201 const bool dummyTransform,
207 applyDummyInverseTransforms(fld);
214 template<
class T,
class TransformOp>
219 const TransformOp& top,
226 applyTransforms(git, fld, top);
230 template<
class T,
class TransformOp>
234 const label constructSize,
236 const TransformOp& top,
243 applyInverseTransforms(git, fld, top);
250 template<
class T,
class TransformOp>
254 const label constructSize,
257 const TransformOp& top,
264 applyInverseTransforms(git, fld, top);
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.
Class containing functor to negate primitives. Dummy for all other types.
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void reverseDistribute(const label constructSize, List< T > &, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
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 distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
Combination-Reduction operation for a parallel run. The information from all nodes is collected on th...
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
void setCapacity(const label)
Alter the size of the underlying storage.
List< label > labelList
A List of labels.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)