38void Foam::mapDistribute::applyDummyTransforms(UList<T>&
field)
const
40 forAll(transformElements_, trafoI)
42 const labelList& elems = transformElements_[trafoI];
43 label
n = transformStart_[trafoI];
54void Foam::mapDistribute::applyDummyInverseTransforms(
UList<T>&
field)
const
56 forAll(transformElements_, trafoI)
58 const labelList& elems = transformElements_[trafoI];
59 label
n = transformStart_[trafoI];
69template<
class T,
class TransformOp>
70void Foam::mapDistribute::applyTransforms
74 const TransformOp& top
78 globalTransforms.transformPermutations();
80 forAll(totalTransform, trafoI)
83 const labelList& elems = transformElements_[trafoI];
84 label
n = transformStart_[trafoI];
88 top(vt,
true, transformFld);
93 field[
n++] = transformFld[i];
99template<
class T,
class TransformOp>
100void Foam::mapDistribute::applyInverseTransforms
104 const TransformOp& top
108 globalTransforms.transformPermutations();
110 forAll(totalTransform, trafoI)
113 const labelList& elems = transformElements_[trafoI];
114 label
n = transformStart_[trafoI];
118 top(vt,
false, transformFld);
129template<
class T,
class NegateOp>
134 const NegateOp& negOp,
144 applyDummyTransforms(
fld);
149template<
class T,
class NegateOp>
153 const NegateOp& negOp,
154 const bool dummyTransform,
220 const label constructSize,
228 applyDummyInverseTransforms(
fld);
238 const label constructSize,
259 const label constructSize,
268 applyDummyInverseTransforms(
fld);
285 const label constructSize,
304template<
class T,
class TransformOp>
310 const TransformOp& top,
315 distribute(commsType,
fld,
false, tag);
318 applyTransforms(git,
fld, top);
322template<
class T,
class TransformOp>
327 const TransformOp& top,
336template<
class T,
class TransformOp>
341 const label constructSize,
343 const TransformOp& top,
350 applyInverseTransforms(git,
fld, top);
357template<
class T,
class TransformOp>
361 const label constructSize,
363 const TransformOp& top,
370 applyInverseTransforms(git,
fld, top);
377template<
class T,
class TransformOp>
382 const label constructSize,
385 const TransformOp& top,
392 applyInverseTransforms(git,
fld, top);
407template<
class T,
class TransformOp>
411 const label constructSize,
414 const TransformOp& top,
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
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...
A non-owning sub-view of a List (allocated or unallocated storage).
A List with indirect addressing. Like IndirectList but does not store addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
commsTypes
Communications types.
static commsTypes defaultCommsType
Default commsType.
void reverseDistribute(const label constructSize, List< T > &values, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType and the default flip/negate operator.
static void distribute(const UPstream::commsTypes commsType, const UList< labelPair > &schedule, const label constructSize, const labelListList &subMap, const bool subHasFlip, const labelListList &constructMap, const bool constructHasFlip, List< T > &field, const T &nullValue, const CombineOp &cop, const NegateOp &negOp, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Distribute combine data with specified combine operation and negate operator (for flips).
label constructSize() const noexcept
Constructed data size.
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute List data using default commsType, default flip/negate operator.
List< label > labelList
A List of labels.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define forAll(list, i)
Loop across all elements in list.
Functor to negate primitives. Dummy for most other types.