32 template<
class Type,
class CombineOp,
class TransformOp>
41 const TransformOp& top
50 Type& elem = elems[i];
53 label nTransformSlavePoints =
55 transformedSlaves.
size() == 0
57 : transformedSlaves[i].
size()
60 if (slavePoints.
size()+nTransformSlavePoints > 0)
65 cop(elem, elems[slavePoints[j]]);
69 if (nTransformSlavePoints)
71 const labelList& transformSlavePoints = transformedSlaves[i];
72 forAll(transformSlavePoints, j)
74 cop(elem, elems[transformSlavePoints[j]]);
81 elems[slavePoints[j]] = elem;
83 if (nTransformSlavePoints)
85 const labelList& transformSlavePoints = transformedSlaves[i];
86 forAll(transformSlavePoints, j)
88 elems[transformSlavePoints[j]] = elem;
105 template<
class Type,
class CombineOp>
121 Type& elem = elems[i];
123 const labelList& slavePoints = slaves[i];
124 label nTransformSlavePoints =
126 transformedSlaves.
size() == 0
128 : transformedSlaves[i].
size()
131 if (slavePoints.
size()+nTransformSlavePoints > 0)
136 cop(elem, elems[slavePoints[j]]);
140 if (nTransformSlavePoints)
142 const labelList& transformSlavePoints = transformedSlaves[i];
143 forAll(transformSlavePoints, j)
145 cop(elem, elems[transformSlavePoints[j]]);
152 elems[slavePoints[j]] = elem;
154 if (nTransformSlavePoints)
156 const labelList& transformSlavePoints = transformedSlaves[i];
157 forAll(transformSlavePoints, j)
159 elems[transformSlavePoints[j]] = elem;
170 template<
class Type,
class CombineOp,
class TransformOp>
174 const CombineOp& cop,
175 const TransformOp& top
178 if (pointData.
size() != mesh_.nPoints())
181 <<
"Number of elements in data:" << pointData.
size()
182 <<
" differs from number of points in mesh:" << mesh_.nPoints()
194 globalPointTransformedSlaves(),
195 globalPointSlavesMap(),
#define forAll(list, i)
Loop across all elements in list.
void reverseDistribute(const label constructSize, List< T > &, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
const labelList & meshPoints() const
Return labelList of mesh points in patch. They are constructed.
A list of faces which address into the list of points.
errorManip< error > abort(error &err)
static void syncData(List< Type > &pointData, const labelListList &slaves, const labelListList &transformedSlaves, const distributionMap &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
Class containing processor-to-processor mapping information.
A List with indirect addressing.
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.