35 template<
class Type,
class CombineOp,
class TransformOp>
44 const TransformOp& top
53 Type& elem = elems[i];
59 transformedSlaves.
empty()
61 : transformedSlaves[i]
66 for (
const label pointi : slavePoints)
68 cop(elem, elems[pointi]);
72 for (
const label pointi : transformSlavePoints)
74 cop(elem, elems[pointi]);
78 for (
const label pointi : slavePoints)
83 for (
const label pointi : transformSlavePoints)
100 template<
class Type,
class CombineOp>
116 Type& elem = elems[i];
118 const labelList& slavePoints = slaves[i];
122 transformedSlaves.
empty()
124 : transformedSlaves[i]
129 for (
const label pointi : slavePoints)
131 cop(elem, elems[pointi]);
135 for (
const label pointi : transformSlavePoints)
137 cop(elem, elems[pointi]);
141 for (
const label pointi : slavePoints)
143 elems[pointi] = elem;
146 for (
const label pointi : transformSlavePoints)
148 elems[pointi] = elem;
157 template<
class Type,
class CombineOp,
class TransformOp>
161 const CombineOp& cop,
162 const TransformOp& top
165 if (pointData.
size() != mesh_.nPoints())
168 <<
"Number of elements in data:" << pointData.
size()
169 <<
" differs from number of points in mesh:" << mesh_.nPoints()
175 List<Type> cppFld(UIndirectList<Type>(pointData, cpp.meshPoints()));
181 globalPointTransformedSlaves(),
182 globalPointSlavesMap(),
189 forAll(cpp.meshPoints(), i)
191 pointData[cpp.meshPoints()[i]] = cppFld[i];
void size(const label n)
Older name for setAddressableSize.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field...
#define forAll(list, i)
Loop across all elements in list.
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.
errorManip< error > abort(error &err)
void reverseDistribute(const label constructSize, List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Reverse distribute data using default commsType.
Class containing processor-to-processor mapping information.
static const List< label > & null() noexcept
Return a null List (reference to a nullObject). Behaves like an empty List.
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.