35template<
class Type,
class CombineOp,
class TransformOp>
44 const TransformOp& top
56 Type& elem = elems[i];
62 transformedSlaves.
empty()
64 : transformedSlaves[i]
69 for (
const label pointi : slavePoints)
71 cop(elem, elems[pointi]);
75 for (
const label pointi : transformSlavePoints)
77 cop(elem, elems[pointi]);
81 for (
const label pointi : slavePoints)
86 for (
const label pointi : transformSlavePoints)
106template<
class Type,
class CombineOp>
125 Type& elem = elems[i];
127 const labelList& slavePoints = slaves[i];
131 transformedSlaves.
empty()
133 : transformedSlaves[i]
138 for (
const label pointi : slavePoints)
140 cop(elem, elems[pointi]);
144 for (
const label pointi : transformSlavePoints)
146 cop(elem, elems[pointi]);
150 for (
const label pointi : slavePoints)
152 elems[pointi] = elem;
155 for (
const label pointi : transformSlavePoints)
157 elems[pointi] = elem;
169template<
class Type,
class CombineOp,
class TransformOp>
173 const CombineOp& cop,
174 const TransformOp& top
177 if (pointData.
size() != mesh_.nPoints())
180 <<
"Number of elements in data:" << pointData.
size()
181 <<
" differs from number of points in mesh:" << mesh_.nPoints()
187 List<Type> cppFld(UIndirectList<Type>(pointData, cpp.meshPoints()));
193 globalPointTransformedSlaves(),
194 globalPointSlavesMap(),
201 forAll(cpp.meshPoints(), i)
203 pointData[cpp.meshPoints()[i]] = cppFld[i];
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static const List< label > & null() noexcept
const labelList & meshPoints() const
Return labelList of mesh points in patch.
A List with indirect addressing. Like IndirectList but does not store addressing.
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
static int & msgType() noexcept
Message tag of standard messages.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
const mapDistribute & globalPointSlavesMap() const
static void syncData(List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.
const labelListList & globalPointSlaves() const
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
const labelListList & globalPointTransformedSlaves() const
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
Class containing processor-to-processor mapping information.
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define forAll(list, i)
Loop across all elements in list.