35 template<
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)
106 template<
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;
169 template<
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];
void size(const label n)
Older name for setAddressableSize.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
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)
static int & msgType() noexcept
Message tag of standard messages.
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.