38 template<
class T,
class CombineOp>
39 void Foam::syncTools::combine
47 auto iter = pointValues.find(index);
55 pointValues.insert(index, val);
60 template<
class T,
class CombineOp>
61 void Foam::syncTools::combine
63 EdgeMap<T>& edgeValues,
69 auto iter = edgeValues.find(index);
77 edgeValues.insert(index, val);
84 template<
class T,
class CombineOp,
class TransformOp>
90 const TransformOp& top
117 const auto fnd = pointValues.
cfind(sharedPtLabels[i]);
138 PstreamBuffers pBufs;
146 pBufs.initRegisterSend();
153 const auto* ppp = isA<processorPolyPatch>(
pp);
157 const auto& procPatch = *ppp;
158 const label nbrProci = procPatch.neighbProcNo();
161 const labelList& meshPts = procPatch.meshPoints();
162 const labelList& nbrPts = procPatch.neighbPoints();
166 Map<T> patchInfo(meshPts.size() / 20);
170 const auto iter = pointValues.
cfind(meshPts[i]);
174 patchInfo.insert(nbrPts[i], iter.val());
179 neighbProcs.push_uniq(nbrProci);
183 UOPstream toNbr(nbrProci, pBufs);
187 pBufs.registerSend(nbrProci, !patchInfo.empty());
194 pBufs.finishedNeighbourSends(neighbProcs);
200 const auto* ppp = isA<processorPolyPatch>(
pp);
204 const auto& procPatch = *ppp;
205 const label nbrProci = procPatch.neighbProcNo();
207 if (!pBufs.recvDataCount(nbrProci))
215 UIPstream fromNbr(nbrProci, pBufs);
216 fromNbr >> nbrPatchInfo;
220 top(procPatch, nbrPatchInfo);
222 const labelList& meshPts = procPatch.meshPoints();
231 meshPts[nbrIter.key()],
242 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
244 if (cpp && cpp->owner())
248 const cyclicPolyPatch& cycPatch = *cpp;
249 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
251 const edgeList& coupledPoints = cycPatch.coupledPoints();
252 const labelList& meshPtsA = cycPatch.meshPoints();
253 const labelList& meshPtsB = nbrPatch.meshPoints();
256 Map<T> half0Values(meshPtsA.size() / 20);
257 Map<T> half1Values(half0Values.size());
261 const edge&
e = coupledPoints[i];
263 const auto point0Fnd = pointValues.
cfind(meshPtsA[
e[0]]);
265 if (point0Fnd.good())
267 half0Values.insert(i, *point0Fnd);
270 const auto point1Fnd = pointValues.
cfind(meshPtsB[
e[1]]);
272 if (point1Fnd.good())
274 half1Values.insert(i, *point1Fnd);
279 top(cycPatch, half1Values);
280 top(nbrPatch, half0Values);
284 const edge&
e = coupledPoints[i];
286 const auto half0Fnd = half0Values.cfind(i);
299 const auto half1Fnd = half1Values.cfind(i);
362 Map<label> sharedToMeshPoint(sharedPtAddr, sharedPtLabels);
367 const auto sharedFnd = sharedPointValues.
cfind(iter.key());
369 if (sharedFnd.good())
371 pointValues.
set(iter.val(), sharedFnd.val());
381 template<
class T,
class CombineOp,
class TransformOp>
386 const CombineOp& cop,
387 const TransformOp& top
415 pBufs.initRegisterSend();
422 const auto* ppp = isA<processorPolyPatch>(
pp);
426 const auto& procPatch = *ppp;
427 const label nbrProci = procPatch.neighbProcNo();
430 const edgeList& edges = procPatch.edges();
431 const labelList& meshPts = procPatch.meshPoints();
432 const labelList& nbrPts = procPatch.neighbPoints();
436 for (
const edge&
e : edges)
438 const edge meshEdge(meshPts,
e);
440 const auto iter = edgeValues.
cfind(meshEdge);
444 const edge nbrEdge(nbrPts,
e);
445 patchInfo.insert(nbrEdge, iter.val());
451 neighbProcs.push_uniq(nbrProci);
455 UOPstream toNbr(nbrProci, pBufs);
459 pBufs.registerSend(nbrProci, !patchInfo.empty());
466 pBufs.finishedNeighbourSends(neighbProcs);
472 const auto* ppp = isA<processorPolyPatch>(
pp);
476 const auto& procPatch = *ppp;
477 const label nbrProci = procPatch.neighbProcNo();
479 if (!pBufs.recvDataCount(nbrProci))
485 EdgeMap<T> nbrPatchInfo;
487 UIPstream fromNbr(nbrProci, pBufs);
488 fromNbr >> nbrPatchInfo;
492 top(procPatch, nbrPatchInfo);
496 const labelList& meshPts = procPatch.meshPoints();
500 const edge&
e = nbrIter.key();
501 const edge meshEdge(meshPts,
e);
521 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
523 if (cpp && cpp->owner())
527 const cyclicPolyPatch& cycPatch = *cpp;
528 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
530 const edgeList& coupledEdges = cycPatch.coupledEdges();
532 const labelList& meshPtsA = cycPatch.meshPoints();
533 const edgeList& edgesA = cycPatch.edges();
535 const labelList& meshPtsB = nbrPatch.meshPoints();
536 const edgeList& edgesB = nbrPatch.edges();
539 Map<T> half0Values(edgesA.size() / 20);
540 Map<T> half1Values(half0Values.size());
542 forAll(coupledEdges, edgei)
544 const edge& twoEdges = coupledEdges[edgei];
547 const edge& e0 = edgesA[twoEdges[0]];
548 const edge meshEdge0(meshPtsA, e0);
550 const auto iter = edgeValues.
cfind(meshEdge0);
554 half0Values.insert(edgei, iter.val());
558 const edge& e1 = edgesB[twoEdges[1]];
559 const edge meshEdge1(meshPtsB, e1);
561 const auto iter = edgeValues.
cfind(meshEdge1);
565 half1Values.insert(edgei, iter.val());
571 top(cycPatch, half1Values);
572 top(nbrPatch, half0Values);
577 forAll(coupledEdges, edgei)
579 const edge& twoEdges = coupledEdges[edgei];
581 const auto half1Fnd = half1Values.cfind(edgei);
585 const edge& e0 = edgesA[twoEdges[0]];
586 const edge meshEdge0(meshPtsA, e0);
597 const auto half0Fnd = half0Values.cfind(edgei);
601 const edge& e1 = edgesB[twoEdges[1]];
602 const edge meshEdge1(meshPtsB, e1);
622 const labelList& sharedPtAddr = pd.sharedPointAddr();
623 const labelList& sharedPtLabels = pd.sharedPointLabels();
626 Map<label> meshToShared(sharedPtLabels, sharedPtAddr);
629 EdgeMap<T> sharedEdgeValues(meshToShared.size());
632 EdgeMap<edge> potentialSharedEdge(meshToShared.size());
644 const label v0 =
f[fp];
647 const auto v0Fnd = meshToShared.cfind(v0);
651 const auto v1Fnd = meshToShared.cfind(v1);
655 const edge meshEdge(v0, v1);
658 const edge sharedEdge(*v0Fnd, *v1Fnd);
661 potentialSharedEdge.insert(sharedEdge, meshEdge);
663 const auto edgeFnd = edgeValues.
cfind(meshEdge);
695 EdgeMap<T> nbrValues;
728 const edge& sharedEdge = iter.key();
729 const edge& meshEdge = iter.val();
732 const auto sharedFnd = sharedEdgeValues.cfind(sharedEdge);
734 if (sharedFnd.good())
751 template<
class T,
class CombineOp,
class TransformOp>
756 const CombineOp& cop,
758 const TransformOp& top
764 <<
"Number of values " << pointValues.
size()
773 template<
class T,
class CombineOp,
class TransformOp>
779 const CombineOp& cop,
781 const TransformOp& top
784 if (pointValues.
size() != meshPoints.
size())
787 <<
"Number of values " << pointValues.
size()
788 <<
" != number of meshPoints " << meshPoints.
size() <<
nl 793 const Map<label>& mpm = cpp.meshPointMap();
795 List<T> cppFld(cpp.nPoints(), nullValue);
799 const auto iter = mpm.cfind(meshPoints[i]);
803 cppFld[iter.val()] = pointValues[i];
810 gd.globalPointSlaves(),
811 gd.globalPointTransformedSlaves(),
812 gd.globalPointSlavesMap(),
813 gd.globalTransforms(),
820 const auto iter = mpm.cfind(meshPoints[i]);
824 pointValues[i] = cppFld[iter.val()];
830 template<
class T,
class CombineOp,
class TransformOp,
class FlipOp>
833 const polyMesh&
mesh,
835 const CombineOp& cop,
837 const TransformOp& top,
844 <<
"Number of values " << edgeValues.size()
851 const labelList& meshEdges = gd.coupledPatchMeshEdges();
853 const edgeList& cppEdges = cpp.edges();
855 const globalIndexAndTransform& git = gd.globalTransforms();
856 const mapDistribute& edgeMap = gd.globalEdgeSlavesMap();
857 const bitSet& orientation = gd.globalEdgeOrientation();
859 List<T> cppFld(meshEdges.size());
862 const edge& cppE = cppEdges[i];
863 const label meshEdgei = meshEdges[i];
864 const edge& meshE = edges[meshEdgei];
874 <<
" coupled edge:" << cppE.line(cpp.localPoints())
878 const bool sameOrientation = ((dir == 1) == orientation[i]);
882 cppFld[i] = edgeValues[meshEdgei];
886 cppFld[i] = fop(edgeValues[meshEdgei]);
894 gd.globalEdgeSlaves(),
895 gd.globalEdgeTransformedSlaves(),
905 const edge& cppE = cppEdges[i];
906 const label meshEdgei = meshEdges[i];
907 const edge& meshE = edges[meshEdgei];
913 const bool sameOrientation = ((dir == 1) == orientation[i]);
917 edgeValues[meshEdges[i]] = cppFld[i];
921 edgeValues[meshEdges[i]] = fop(cppFld[i]);
927 template<
class T,
class CombineOp,
class TransformOp,
class FlipOp>
930 const polyMesh&
mesh,
933 const CombineOp& cop,
935 const TransformOp& top,
939 if (edgeValues.size() != meshEdges.size())
942 <<
"Number of values " << edgeValues.size()
943 <<
" != number of meshEdges " << meshEdges.size() <<
nl 949 const edgeList& cppEdges = cpp.edges();
951 const Map<label>& mpm = gd.coupledPatchMeshEdgeMap();
952 const bitSet& orientation = gd.globalEdgeOrientation();
954 List<T> cppFld(cpp.nEdges(), nullValue);
958 const label meshEdgei = meshEdges[i];
959 const auto iter = mpm.cfind(meshEdgei);
962 const label cppEdgei = iter.val();
963 const edge& cppE = cppEdges[cppEdgei];
964 const edge& meshE = edges[meshEdgei];
974 <<
" coupled edge:" << cppE.line(cpp.localPoints())
978 const bool sameOrientation = ((dir == 1) == orientation[i]);
982 cppFld[cppEdgei] = edgeValues[i];
986 cppFld[cppEdgei] = fop(edgeValues[i]);
994 gd.globalEdgeSlaves(),
995 gd.globalEdgeTransformedSlaves(),
996 gd.globalEdgeSlavesMap(),
997 gd.globalTransforms(),
1004 label meshEdgei = meshEdges[i];
1005 const auto iter = mpm.cfind(meshEdgei);
1008 label cppEdgei = iter.val();
1009 const edge& cppE = cppEdges[cppEdgei];
1010 const edge& meshE = edges[meshEdgei];
1013 const bool sameOrientation = ((dir == 1) == orientation[i]);
1015 if (sameOrientation)
1017 edgeValues[i] = cppFld[cppEdgei];
1021 edgeValues[i] = fop(cppFld[cppEdgei]);
1028 template<
class T,
class CombineOp,
class TransformOp>
1031 const polyMesh&
mesh,
1032 UList<T>& faceValues,
1033 const CombineOp& cop,
1034 const TransformOp& top,
1044 <<
"Number of values " << faceValues.size()
1072 const auto* ppp = isA<processorPolyPatch>(
pp);
1074 if (ppp &&
pp.size())
1076 const auto& procPatch = *ppp;
1082 pp.start()-boundaryOffset
1088 procPatch.neighbProcNo(),
1097 const auto* ppp = isA<processorPolyPatch>(
pp);
1099 if (ppp &&
pp.size())
1101 const auto& procPatch = *ppp;
1103 const SubList<T>
fld 1107 pp.start()-boundaryOffset
1113 procPatch.neighbProcNo(),
1125 const auto* ppp = isA<processorPolyPatch>(
pp);
1127 if (ppp &&
pp.size())
1129 const auto& procPatch = *ppp;
1135 pp.start()-boundaryOffset
1138 top(procPatch, recvFld);
1140 SubList<T> patchValues
1144 pp.start()-boundaryOffset
1149 cop(patchValues[i], recvFld[i]);
1156 DynamicList<label> neighbProcs;
1157 PstreamBuffers pBufs;
1162 const auto* ppp = isA<processorPolyPatch>(
pp);
1164 if (ppp &&
pp.size())
1166 const auto& procPatch = *ppp;
1167 const label nbrProci = procPatch.neighbProcNo();
1172 const SubList<T>
fld 1176 pp.start()-boundaryOffset
1179 UOPstream toNbr(nbrProci, pBufs);
1185 pBufs.finishedNeighbourSends(neighbProcs);
1191 const auto* ppp = isA<processorPolyPatch>(
pp);
1193 if (ppp &&
pp.size())
1195 const auto& procPatch = *ppp;
1196 const label nbrProci = procPatch.neighbProcNo();
1200 UIPstream fromNbr(nbrProci, pBufs);
1204 top(procPatch, recvFld);
1206 SubList<T> patchValues
1210 pp.start()-boundaryOffset
1215 cop(patchValues[i], recvFld[i]);
1225 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1227 if (cpp && cpp->owner())
1231 const cyclicPolyPatch& cycPatch = *cpp;
1232 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1233 const label patchSize = cycPatch.size();
1235 SubList<T> ownPatchValues
1239 cycPatch.start()-boundaryOffset
1242 SubList<T> nbrPatchValues
1246 nbrPatch.start()-boundaryOffset
1250 List<T> ownVals(ownPatchValues);
1251 top(nbrPatch, ownVals);
1253 List<T> nbrVals(nbrPatchValues);
1254 top(cycPatch, nbrVals);
1256 forAll(ownPatchValues, i)
1258 cop(ownPatchValues[i], nbrVals[i]);
1261 forAll(nbrPatchValues, i)
1263 cop(nbrPatchValues[i], ownVals[i]);
1275 template<
unsigned W
idth,
class CombineOp>
1279 const bool isBoundaryOnly,
1281 const CombineOp& cop,
1292 <<
"Number of values " << faceValues.
size()
1294 << (isBoundaryOnly ?
"boundary" :
"mesh") <<
" faces " 1309 PtrList<PackedList<Width>> recvBufs(
patches.
size());
1314 const auto* ppp = isA<processorPolyPatch>(
pp);
1316 if (ppp &&
pp.size())
1318 const auto& procPatch = *ppp;
1319 const label patchi =
pp.index();
1321 auto& recvbuf = recvBufs.emplace_set(patchi,
pp.size());
1326 procPatch.neighbProcNo(),
1327 recvbuf.data_bytes(),
1328 recvbuf.size_bytes()
1334 PtrList<PackedList<Width>> sendBufs(
patches.
size());
1339 const auto* ppp = isA<processorPolyPatch>(
pp);
1341 if (ppp &&
pp.size())
1343 const auto& procPatch = *ppp;
1344 const label patchi =
pp.index();
1346 const labelRange
range(
pp.start()-boundaryOffset,
pp.size());
1348 auto& sendbuf = sendBufs.emplace_set(patchi, faceValues,
range);
1353 procPatch.neighbProcNo(),
1354 sendbuf.cdata_bytes(),
1355 sendbuf.size_bytes()
1366 const auto* ppp = isA<processorPolyPatch>(
pp);
1368 if (ppp &&
pp.size())
1370 const label patchi =
pp.index();
1371 const label patchSize =
pp.size();
1373 const auto& recvbuf = recvBufs[patchi];
1376 label bFacei =
pp.start()-boundaryOffset;
1377 for (label i = 0; i < patchSize; ++i)
1379 unsigned int recvVal = recvbuf[i];
1380 unsigned int faceVal = faceValues[bFacei];
1382 cop(faceVal, recvVal);
1383 faceValues.
set(bFacei, faceVal);
1395 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1397 if (cpp && cpp->owner())
1401 const cyclicPolyPatch& cycPatch = *cpp;
1402 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1403 const label patchSize = cycPatch.size();
1405 label face0 = cycPatch.start()-boundaryOffset;
1406 label face1 = nbrPatch.start()-boundaryOffset;
1407 for (label i = 0; i < patchSize; ++i)
1409 unsigned int val0 = faceValues[face0];
1410 unsigned int val1 = faceValues[face1];
1412 unsigned int t = val0;
1414 faceValues[face0] = t;
1417 faceValues[face1] = val1;
1442 <<
"Number of cell values " << cellData.
size()
1453 const auto& faceCells =
pp.faceCells();
1461 ) = UIndirectList<T>(cellData, faceCells);
1468 template<
unsigned W
idth,
class CombineOp>
1473 const CombineOp& cop,
1477 syncFaceList(
mesh,
false, faceValues, cop, parRun);
1481 template<
unsigned W
idth,
class CombineOp>
1486 const CombineOp& cop,
1490 syncFaceList(
mesh,
true, faceValues, cop, parRun);
1494 template<
unsigned W
idth>
1512 template<
unsigned W
idth>
1520 syncBoundaryFaceList
1530 template<
unsigned W
idth,
class CombineOp>
1535 const CombineOp& cop,
1536 const unsigned int nullValue
1542 <<
"Number of values " << pointValues.
size()
1548 const labelList& meshPoints = gd.coupledPatch().meshPoints();
1550 List<unsigned int> cppFld(gd.globalPointSlavesMap().constructSize());
1553 cppFld[i] = pointValues[meshPoints[i]];
1559 gd.globalPointSlaves(),
1560 gd.globalPointTransformedSlaves(),
1561 gd.globalPointSlavesMap(),
1568 pointValues[meshPoints[i]] = cppFld[i];
1573 template<
unsigned W
idth,
class CombineOp>
1576 const polyMesh&
mesh,
1577 PackedList<Width>& edgeValues,
1578 const CombineOp& cop,
1579 const unsigned int nullValue
1585 <<
"Number of values " << edgeValues.size()
1591 const labelList& meshEdges = gd.coupledPatchMeshEdges();
1593 List<unsigned int> cppFld(gd.globalEdgeSlavesMap().constructSize());
1596 cppFld[i] = edgeValues[meshEdges[i]];
1602 gd.globalEdgeSlaves(),
1603 gd.globalEdgeTransformedSlaves(),
1604 gd.globalEdgeSlavesMap(),
1611 edgeValues[meshEdges[i]] = cppFld[i];
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
label nPoints() const
Number of points supporting patch faces.
void size(const label n)
Older name for setAddressableSize.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
void resize(const label len)
Adjust allocated size of list.
label nPoints() const noexcept
Number of mesh points.
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.
List< edge > edgeList
List of edge.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
constexpr char nl
The newline '\n' character (0x0a)
static bool & parRun() noexcept
Test if this a parallel run.
static int & msgType() noexcept
Message tag of standard messages.
static std::streamsize read(const UPstream::commsTypes commsType, const int fromProcNo, Type *buffer, std::streamsize count, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, UPstream::Request *req=nullptr)
Receive buffer contents (contiguous types) from given processor.
static void broadcast(Type &value, const int communicator=UPstream::worldComm)
Broadcast content (contiguous or non-contiguous) to all communicator ranks. Does nothing in non-paral...
label nFaces() const noexcept
Number of mesh faces.
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field...
static void waitRequests()
Wait for all requests to finish.
UList< label > labelUList
A UList of labels.
label nProcessorPatches() const
The number of processorPolyPatch patches.
virtual const pointField & points() const
Return raw points.
#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.
label fcIndex(const label i) const noexcept
The forward circular index. The next index in the list which returns to the first at the end of the l...
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
label nGlobalPoints() const
Return number of globally shared points.
const dimensionedScalar e
Elementary charge.
static void recv(Type &value, const int fromProcNo, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Receive and deserialize a value. Uses operator>> for de-serialization.
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
const_iterator cfind(const label &key) const
Find and return an const_iterator set at the hashed entry.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
label size() const noexcept
The number of entries in the list.
static bool write(const UPstream::commsTypes commsType, const int toProcNo, const Type *buffer, std::streamsize count, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Write buffer contents (contiguous types only) to given processor.
const globalMeshData & globalData() const
Return parallel info (demand-driven)
label nInternalFaces() const noexcept
Number of internal faces.
virtual const faceList & faces() const
Return raw faces.
bool set(const label i, unsigned int val=~0u)
Set value at index i, default value set is the max_value.
errorManip< error > abort(error &err)
label nEdges() const
Number of mesh edges.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh...
label nEdges() const
Number of edges in patch.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
label push_uniq(const T &val)
Append an element if not already in the list.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
static commsTypes defaultCommsType
Default commsType.
label nCells() const noexcept
Number of mesh cells.
void reserve(label numEntries)
Reserve space for at least the specified number of elements (not the number of buckets) and regenerat...
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
const polyBoundaryMesh & patches
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
Mesh consisting of general polyhedral cells.
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
List< label > labelList
A List of labels.
A patch is a list of labels that address the faces in the global face list.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
bool send()
Send buffer contents now and not in destructor [advanced usage]. Returns true on success.
label size() const noexcept
Number of entries.
const dimensionedScalar mp
Proton mass.
bool set(const label &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
forAllConstIters(mixture.phases(), phase)
A HashTable to objects of type <T> with a label key.
static int compare(const edge &a, const edge &b)
Compare edges.
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.