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()
1060 is_contiguous<T>::value
1072 const auto* ppp = isA<processorPolyPatch>(
pp);
1074 if (ppp &&
pp.size())
1076 const auto& procPatch = *ppp;
1082 pp.start()-boundaryOffset
1088 procPatch.neighbProcNo(),
1098 const auto* ppp = isA<processorPolyPatch>(
pp);
1100 if (ppp &&
pp.size())
1102 const auto& procPatch = *ppp;
1104 const SubList<T>
fld 1108 pp.start()-boundaryOffset
1114 procPatch.neighbProcNo(),
1127 const auto* ppp = isA<processorPolyPatch>(
pp);
1129 if (ppp &&
pp.size())
1131 const auto& procPatch = *ppp;
1137 pp.start()-boundaryOffset
1139 const List<T>& fakeList = recvFld;
1140 top(procPatch,
const_cast<List<T>&
>(fakeList));
1142 SubList<T> patchValues
1146 pp.start()-boundaryOffset
1151 cop(patchValues[i], recvFld[i]);
1158 DynamicList<label> neighbProcs;
1159 PstreamBuffers pBufs;
1164 const auto* ppp = isA<processorPolyPatch>(
pp);
1166 if (ppp &&
pp.size())
1168 const auto& procPatch = *ppp;
1169 const label nbrProci = procPatch.neighbProcNo();
1174 const SubList<T>
fld 1178 pp.start()-boundaryOffset
1181 UOPstream toNbr(nbrProci, pBufs);
1187 pBufs.finishedNeighbourSends(neighbProcs);
1193 const auto* ppp = isA<processorPolyPatch>(
pp);
1195 if (ppp &&
pp.size())
1197 const auto& procPatch = *ppp;
1198 const label nbrProci = procPatch.neighbProcNo();
1202 UIPstream fromNbr(nbrProci, pBufs);
1206 top(procPatch, recvFld);
1208 SubList<T> patchValues
1212 pp.start()-boundaryOffset
1217 cop(patchValues[i], recvFld[i]);
1227 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1229 if (cpp && cpp->owner())
1233 const cyclicPolyPatch& cycPatch = *cpp;
1234 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1235 const label patchSize = cycPatch.size();
1237 SubList<T> ownPatchValues
1241 cycPatch.start()-boundaryOffset
1244 SubList<T> nbrPatchValues
1248 nbrPatch.start()-boundaryOffset
1252 List<T> ownVals(ownPatchValues);
1253 top(nbrPatch, ownVals);
1255 List<T> nbrVals(nbrPatchValues);
1256 top(cycPatch, nbrVals);
1258 forAll(ownPatchValues, i)
1260 cop(ownPatchValues[i], nbrVals[i]);
1263 forAll(nbrPatchValues, i)
1265 cop(nbrPatchValues[i], ownVals[i]);
1277 template<
unsigned W
idth,
class CombineOp>
1281 const bool isBoundaryOnly,
1283 const CombineOp& cop,
1294 <<
"Number of values " << faceValues.
size()
1296 << (isBoundaryOnly ?
"boundary" :
"mesh") <<
" faces " 1311 PtrList<PackedList<Width>> recvBufs(
patches.
size());
1316 const auto* ppp = isA<processorPolyPatch>(
pp);
1318 if (ppp &&
pp.size())
1320 const auto& procPatch = *ppp;
1321 const label patchi =
pp.index();
1323 auto& recvbuf = recvBufs.emplace_set(patchi,
pp.size());
1328 procPatch.neighbProcNo(),
1329 recvbuf.data_bytes(),
1330 recvbuf.size_bytes()
1336 PtrList<PackedList<Width>> sendBufs(
patches.
size());
1341 const auto* ppp = isA<processorPolyPatch>(
pp);
1343 if (ppp &&
pp.size())
1345 const auto& procPatch = *ppp;
1346 const label patchi =
pp.index();
1348 const labelRange
range(
pp.start()-boundaryOffset,
pp.size());
1350 auto& sendbuf = sendBufs.emplace_set(patchi, faceValues,
range);
1355 procPatch.neighbProcNo(),
1356 sendbuf.cdata_bytes(),
1357 sendbuf.size_bytes()
1368 const auto* ppp = isA<processorPolyPatch>(
pp);
1370 if (ppp &&
pp.size())
1372 const label patchi =
pp.index();
1373 const label patchSize =
pp.size();
1375 const auto& recvbuf = recvBufs[patchi];
1378 label bFacei =
pp.start()-boundaryOffset;
1379 for (label i = 0; i < patchSize; ++i)
1381 unsigned int recvVal = recvbuf[i];
1382 unsigned int faceVal = faceValues[bFacei];
1384 cop(faceVal, recvVal);
1385 faceValues.
set(bFacei, faceVal);
1397 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1399 if (cpp && cpp->owner())
1403 const cyclicPolyPatch& cycPatch = *cpp;
1404 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1405 const label patchSize = cycPatch.size();
1407 label face0 = cycPatch.start()-boundaryOffset;
1408 label face1 = nbrPatch.start()-boundaryOffset;
1409 for (label i = 0; i < patchSize; ++i)
1411 unsigned int val0 = faceValues[face0];
1412 unsigned int val1 = faceValues[face1];
1414 unsigned int t = val0;
1416 faceValues[face0] = t;
1419 faceValues[face1] = val1;
1444 <<
"Number of cell values " << cellData.
size()
1455 const auto& faceCells =
pp.faceCells();
1463 ) = UIndirectList<T>(cellData, faceCells);
1470 template<
unsigned W
idth,
class CombineOp>
1475 const CombineOp& cop,
1479 syncFaceList(
mesh,
false, faceValues, cop, parRun);
1483 template<
unsigned W
idth,
class CombineOp>
1488 const CombineOp& cop,
1492 syncFaceList(
mesh,
true, faceValues, cop, parRun);
1496 template<
unsigned W
idth>
1514 template<
unsigned W
idth>
1522 syncBoundaryFaceList
1532 template<
unsigned W
idth,
class CombineOp>
1537 const CombineOp& cop,
1538 const unsigned int nullValue
1544 <<
"Number of values " << pointValues.
size()
1550 const labelList& meshPoints = gd.coupledPatch().meshPoints();
1552 List<unsigned int> cppFld(gd.globalPointSlavesMap().constructSize());
1555 cppFld[i] = pointValues[meshPoints[i]];
1561 gd.globalPointSlaves(),
1562 gd.globalPointTransformedSlaves(),
1563 gd.globalPointSlavesMap(),
1570 pointValues[meshPoints[i]] = cppFld[i];
1575 template<
unsigned W
idth,
class CombineOp>
1578 const polyMesh&
mesh,
1579 PackedList<Width>& edgeValues,
1580 const CombineOp& cop,
1581 const unsigned int nullValue
1587 <<
"Number of values " << edgeValues.size()
1593 const labelList& meshEdges = gd.coupledPatchMeshEdges();
1595 List<unsigned int> cppFld(gd.globalEdgeSlavesMap().constructSize());
1598 cppFld[i] = edgeValues[meshEdges[i]];
1604 gd.globalEdgeSlaves(),
1605 gd.globalEdgeTransformedSlaves(),
1606 gd.globalEdgeSlavesMap(),
1613 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.
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.
static void broadcast(Type &value, const label comm=UPstream::worldComm)
Broadcast content (contiguous or non-contiguous) to all communicator ranks. Does nothing in non-paral...
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.
static void recv(Type &value, const int fromProcNo, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Receive and deserialize a value. Uses operator>> for de-serialization.
const dimensionedScalar e
Elementary charge.
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.
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 additional search methods and registered IO...
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
static bool write(const UPstream::commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Write buffer contents to given processor.
"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)
static std::streamsize read(const UPstream::commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr)
Read buffer contents from given processor.
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.