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);
82 template<
class T,
class CombineOp,
class TransformOp>
88 const TransformOp& top
97 Map<T> sharedPointValues(0);
99 if (pd.nGlobalPoints() > 0)
102 const labelList& sharedPtLabels = pd.sharedPointLabels();
105 const labelList& sharedPtAddr = pd.sharedPointAddr();
107 sharedPointValues.reserve(sharedPtAddr.size());
112 const auto fnd = pointValues.cfind(sharedPtLabels[i]);
141 pBufs.initRegisterSend();
148 const auto* ppp = isA<processorPolyPatch>(
pp);
152 const auto& procPatch = *ppp;
153 const label nbrProci = procPatch.neighbProcNo();
156 const labelList& meshPts = procPatch.meshPoints();
157 const labelList& nbrPts = procPatch.neighbPoints();
161 Map<T> patchInfo(meshPts.size() / 20);
165 const auto iter = pointValues.cfind(meshPts[i]);
169 patchInfo.insert(nbrPts[i], iter.val());
174 neighbProcs.push_uniq(nbrProci);
178 UOPstream toNbr(nbrProci, pBufs);
182 pBufs.registerSend(nbrProci, !patchInfo.empty());
189 pBufs.finishedNeighbourSends(neighbProcs);
195 const auto* ppp = isA<processorPolyPatch>(
pp);
199 const auto& procPatch = *ppp;
200 const label nbrProci = procPatch.neighbProcNo();
202 if (!pBufs.recvDataCount(nbrProci))
208 Map<T> nbrPatchInfo(0);
210 UIPstream fromNbr(nbrProci, pBufs);
211 fromNbr >> nbrPatchInfo;
215 top(procPatch, nbrPatchInfo);
217 const labelList& meshPts = procPatch.meshPoints();
226 meshPts[nbrIter.key()],
237 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
239 if (cpp && cpp->owner())
243 const cyclicPolyPatch& cycPatch = *cpp;
244 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
246 const edgeList& coupledPoints = cycPatch.coupledPoints();
247 const labelList& meshPtsA = cycPatch.meshPoints();
248 const labelList& meshPtsB = nbrPatch.meshPoints();
251 Map<T> half0Values(meshPtsA.size() / 20);
252 Map<T> half1Values(half0Values.size());
256 const edge&
e = coupledPoints[i];
258 const auto point0Fnd = pointValues.cfind(meshPtsA[
e[0]]);
260 if (point0Fnd.good())
262 half0Values.insert(i, *point0Fnd);
265 const auto point1Fnd = pointValues.cfind(meshPtsB[
e[1]]);
267 if (point1Fnd.good())
269 half1Values.insert(i, *point1Fnd);
274 top(cycPatch, half1Values);
275 top(nbrPatch, half0Values);
279 const edge&
e = coupledPoints[i];
281 const auto half0Fnd = half0Values.cfind(i);
294 const auto half1Fnd = half1Values.cfind(i);
311 if (pd.nGlobalPoints() > 0)
314 const labelList& sharedPtLabels = pd.sharedPointLabels();
316 const labelList& sharedPtAddr = pd.sharedPointAddr();
328 Map<T> nbrValues(fromProc);
351 toMaster << sharedPointValues;
362 Map<label> sharedToMeshPoint(2*sharedPtAddr.size());
365 sharedToMeshPoint.insert(sharedPtAddr[i], sharedPtLabels[i]);
371 const auto sharedFnd = sharedPointValues.cfind(iter.key());
373 if (sharedFnd.good())
375 pointValues.set(iter.val(), sharedFnd.val());
382 template<
class T,
class CombineOp,
class TransformOp>
385 const polyMesh&
mesh,
386 EdgeMap<T>& edgeValues,
387 const CombineOp& cop,
388 const TransformOp& top
414 pBufs.initRegisterSend();
421 const auto* ppp = isA<processorPolyPatch>(
pp);
425 const auto& procPatch = *ppp;
426 const label nbrProci = procPatch.neighbProcNo();
429 const edgeList& edges = procPatch.edges();
430 const labelList& meshPts = procPatch.meshPoints();
431 const labelList& nbrPts = procPatch.neighbPoints();
433 EdgeMap<T> patchInfo(edges.size() / 20);
435 for (
const edge&
e : edges)
437 const edge meshEdge(meshPts,
e);
439 const auto iter = edgeValues.cfind(meshEdge);
443 const edge nbrEdge(nbrPts,
e);
444 patchInfo.insert(nbrEdge, iter.val());
450 neighbProcs.push_uniq(nbrProci);
454 UOPstream toNbr(nbrProci, pBufs);
458 pBufs.registerSend(nbrProci, !patchInfo.empty());
465 pBufs.finishedNeighbourSends(neighbProcs);
471 const auto* ppp = isA<processorPolyPatch>(
pp);
475 const auto& procPatch = *ppp;
476 const label nbrProci = procPatch.neighbProcNo();
478 if (!pBufs.recvDataCount(nbrProci))
484 EdgeMap<T> nbrPatchInfo(0);
486 UIPstream fromNbr(nbrProci, pBufs);
487 fromNbr >> nbrPatchInfo;
491 top(procPatch, nbrPatchInfo);
495 const labelList& meshPts = procPatch.meshPoints();
499 const edge&
e = nbrIter.key();
500 const edge meshEdge(meshPts[
e[0]], meshPts[
e[1]]);
520 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
522 if (cpp && cpp->owner())
526 const cyclicPolyPatch& cycPatch = *cpp;
527 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
529 const edgeList& coupledEdges = cycPatch.coupledEdges();
531 const labelList& meshPtsA = cycPatch.meshPoints();
532 const edgeList& edgesA = cycPatch.edges();
534 const labelList& meshPtsB = nbrPatch.meshPoints();
535 const edgeList& edgesB = nbrPatch.edges();
538 Map<T> half0Values(edgesA.size() / 20);
539 Map<T> half1Values(half0Values.size());
541 forAll(coupledEdges, edgei)
543 const edge& twoEdges = coupledEdges[edgei];
546 const edge& e0 = edgesA[twoEdges[0]];
547 const edge meshEdge0(meshPtsA[e0[0]], meshPtsA[e0[1]]);
549 const auto iter = edgeValues.cfind(meshEdge0);
553 half0Values.insert(edgei, iter.val());
557 const edge& e1 = edgesB[twoEdges[1]];
558 const edge meshEdge1(meshPtsB[e1[0]], meshPtsB[e1[1]]);
560 const auto iter = edgeValues.cfind(meshEdge1);
564 half1Values.insert(edgei, iter.val());
570 top(cycPatch, half1Values);
571 top(nbrPatch, half0Values);
576 forAll(coupledEdges, edgei)
578 const edge& twoEdges = coupledEdges[edgei];
580 const auto half1Fnd = half1Values.cfind(edgei);
584 const edge& e0 = edgesA[twoEdges[0]];
585 const edge meshEdge0(meshPtsA[e0[0]], meshPtsA[e0[1]]);
596 const auto half0Fnd = half0Values.cfind(edgei);
600 const edge& e1 = edgesB[twoEdges[1]];
601 const edge meshEdge1(meshPtsB[e1[0]], meshPtsB[e1[1]]);
621 const labelList& sharedPtAddr = pd.sharedPointAddr();
622 const labelList& sharedPtLabels = pd.sharedPointLabels();
625 Map<label> meshToShared(2*sharedPtLabels.size());
628 meshToShared.insert(sharedPtLabels[i], sharedPtAddr[i]);
632 EdgeMap<T> sharedEdgeValues(meshToShared.size());
635 EdgeMap<edge> potentialSharedEdge(meshToShared.size());
647 const label v0 =
f[fp];
650 const auto v0Fnd = meshToShared.cfind(v0);
654 const auto v1Fnd = meshToShared.cfind(v1);
658 const edge meshEdge(v0, v1);
661 const edge sharedEdge(*v0Fnd, *v1Fnd);
664 potentialSharedEdge.insert(sharedEdge, meshEdge);
666 const auto edgeFnd = edgeValues.cfind(meshEdge);
699 EdgeMap<T> nbrValues(fromProc);
723 toMaster << sharedEdgeValues;
738 const edge& sharedEdge = iter.key();
739 const edge& meshEdge = iter.val();
742 const auto sharedFnd = sharedEdgeValues.cfind(sharedEdge);
744 if (sharedFnd.good())
758 template<
class T,
class CombineOp,
class TransformOp>
761 const polyMesh&
mesh,
762 List<T>& pointValues,
763 const CombineOp& cop,
765 const TransformOp& top
771 <<
"Number of values " << pointValues.size()
772 <<
" is not equal to the number of points in the mesh " 780 template<
class T,
class CombineOp,
class TransformOp>
786 const CombineOp& cop,
788 const TransformOp& top
791 if (pointValues.
size() != meshPoints.
size())
794 <<
"Number of values " << pointValues.
size()
795 <<
" is not equal to the number of meshPoints " 800 const Map<label>& mpm = cpp.meshPointMap();
802 List<T> cppFld(cpp.nPoints(), nullValue);
806 const auto iter = mpm.cfind(meshPoints[i]);
810 cppFld[iter.val()] = pointValues[i];
817 gd.globalPointSlaves(),
818 gd.globalPointTransformedSlaves(),
819 gd.globalPointSlavesMap(),
820 gd.globalTransforms(),
827 const auto iter = mpm.cfind(meshPoints[i]);
831 pointValues[i] = cppFld[iter.val()];
837 template<
class T,
class CombineOp,
class TransformOp,
class FlipOp>
840 const polyMesh&
mesh,
842 const CombineOp& cop,
844 const TransformOp& top,
851 <<
"Number of values " << edgeValues.size()
852 <<
" is not equal to the number of edges in the mesh " 858 const labelList& meshEdges = gd.coupledPatchMeshEdges();
860 const edgeList& cppEdges = cpp.edges();
862 const globalIndexAndTransform& git = gd.globalTransforms();
863 const mapDistribute& edgeMap = gd.globalEdgeSlavesMap();
864 const bitSet& orientation = gd.globalEdgeOrientation();
866 List<T> cppFld(meshEdges.size());
869 const edge& cppE = cppEdges[i];
870 const label meshEdgei = meshEdges[i];
871 const edge& meshE = edges[meshEdgei];
881 <<
" coupled edge:" << cppE.line(cpp.localPoints())
885 const bool sameOrientation = ((dir == 1) == orientation[i]);
889 cppFld[i] = edgeValues[meshEdgei];
893 cppFld[i] = fop(edgeValues[meshEdgei]);
901 gd.globalEdgeSlaves(),
902 gd.globalEdgeTransformedSlaves(),
912 const edge& cppE = cppEdges[i];
913 const label meshEdgei = meshEdges[i];
914 const edge& meshE = edges[meshEdgei];
920 const bool sameOrientation = ((dir == 1) == orientation[i]);
924 edgeValues[meshEdges[i]] = cppFld[i];
928 edgeValues[meshEdges[i]] = fop(cppFld[i]);
934 template<
class T,
class CombineOp,
class TransformOp,
class FlipOp>
937 const polyMesh&
mesh,
940 const CombineOp& cop,
942 const TransformOp& top,
946 if (edgeValues.size() != meshEdges.size())
949 <<
"Number of values " << edgeValues.size()
950 <<
" is not equal to the number of meshEdges " 956 const edgeList& cppEdges = cpp.edges();
958 const Map<label>& mpm = gd.coupledPatchMeshEdgeMap();
959 const bitSet& orientation = gd.globalEdgeOrientation();
961 List<T> cppFld(cpp.nEdges(), nullValue);
965 const label meshEdgei = meshEdges[i];
966 const auto iter = mpm.cfind(meshEdgei);
969 const label cppEdgei = iter();
970 const edge& cppE = cppEdges[cppEdgei];
971 const edge& meshE = edges[meshEdgei];
981 <<
" coupled edge:" << cppE.line(cpp.localPoints())
985 const bool sameOrientation = ((dir == 1) == orientation[i]);
989 cppFld[cppEdgei] = edgeValues[i];
993 cppFld[cppEdgei] = fop(edgeValues[i]);
1001 gd.globalEdgeSlaves(),
1002 gd.globalEdgeTransformedSlaves(),
1003 gd.globalEdgeSlavesMap(),
1004 gd.globalTransforms(),
1011 label meshEdgei = meshEdges[i];
1012 const auto iter = mpm.cfind(meshEdgei);
1015 label cppEdgei = iter();
1016 const edge& cppE = cppEdges[cppEdgei];
1017 const edge& meshE = edges[meshEdgei];
1020 const bool sameOrientation = ((dir == 1) == orientation[i]);
1022 if (sameOrientation)
1024 edgeValues[i] = cppFld[cppEdgei];
1028 edgeValues[i] = fop(cppFld[cppEdgei]);
1035 template<
class T,
class CombineOp,
class TransformOp>
1038 const polyMesh&
mesh,
1039 UList<T>& faceValues,
1040 const CombineOp& cop,
1041 const TransformOp& top,
1051 <<
"Number of values " << faceValues.size()
1052 <<
" is not equal to the number of boundary faces in the mesh " 1065 is_contiguous<T>::value
1077 const auto* ppp = isA<processorPolyPatch>(
pp);
1079 if (ppp &&
pp.size())
1081 const auto& procPatch = *ppp;
1087 pp.start()-boundaryOffset
1093 procPatch.neighbProcNo(),
1103 const auto* ppp = isA<processorPolyPatch>(
pp);
1105 if (ppp &&
pp.size())
1107 const auto& procPatch = *ppp;
1109 const SubList<T>
fld 1113 pp.start()-boundaryOffset
1119 procPatch.neighbProcNo(),
1132 const auto* ppp = isA<processorPolyPatch>(
pp);
1134 if (ppp &&
pp.size())
1136 const auto& procPatch = *ppp;
1142 pp.start()-boundaryOffset
1144 const List<T>& fakeList = recvFld;
1145 top(procPatch,
const_cast<List<T>&
>(fakeList));
1147 SubList<T> patchValues
1151 pp.start()-boundaryOffset
1156 cop(patchValues[i], recvFld[i]);
1163 DynamicList<label> neighbProcs;
1169 const auto* ppp = isA<processorPolyPatch>(
pp);
1171 if (ppp &&
pp.size())
1173 const auto& procPatch = *ppp;
1174 const label nbrProci = procPatch.neighbProcNo();
1177 neighbProcs.push_uniq(nbrProci);
1179 const SubList<T>
fld 1183 pp.start()-boundaryOffset
1186 UOPstream toNbr(nbrProci, pBufs);
1192 pBufs.finishedNeighbourSends(neighbProcs);
1198 const auto* ppp = isA<processorPolyPatch>(
pp);
1200 if (ppp &&
pp.size())
1202 const auto& procPatch = *ppp;
1203 const label nbrProci = procPatch.neighbProcNo();
1207 UIPstream fromNbr(nbrProci, pBufs);
1211 top(procPatch, recvFld);
1213 SubList<T> patchValues
1217 pp.start()-boundaryOffset
1222 cop(patchValues[i], recvFld[i]);
1232 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1234 if (cpp && cpp->owner())
1238 const cyclicPolyPatch& cycPatch = *cpp;
1239 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1240 const label patchSize = cycPatch.size();
1242 SubList<T> ownPatchValues
1246 cycPatch.start()-boundaryOffset
1249 SubList<T> nbrPatchValues
1253 nbrPatch.start()-boundaryOffset
1257 List<T> ownVals(ownPatchValues);
1258 top(nbrPatch, ownVals);
1260 List<T> nbrVals(nbrPatchValues);
1261 top(cycPatch, nbrVals);
1263 forAll(ownPatchValues, i)
1265 cop(ownPatchValues[i], nbrVals[i]);
1268 forAll(nbrPatchValues, i)
1270 cop(nbrPatchValues[i], ownVals[i]);
1279 template<
unsigned W
idth,
class CombineOp>
1283 const bool isBoundaryOnly,
1285 const CombineOp& cop,
1296 <<
"Number of values " << faceValues.
size()
1297 <<
" is not equal to the number of " 1298 << (isBoundaryOnly ?
"boundary" :
"mesh") <<
" faces " 1310 PtrList<PackedList<Width>> recvInfos(
patches.
size());
1315 const auto* ppp = isA<processorPolyPatch>(
pp);
1317 if (ppp &&
pp.size())
1319 const auto& procPatch = *ppp;
1320 const label patchi =
pp.index();
1321 const label patchSize =
pp.size();
1323 recvInfos.set(patchi,
new PackedList<Width>(patchSize));
1324 PackedList<Width>& recvInfo = recvInfos[patchi];
1329 procPatch.neighbProcNo(),
1330 recvInfo.data_bytes(),
1331 recvInfo.size_bytes()
1337 PtrList<PackedList<Width>> sendInfos(
patches.
size());
1342 const auto* ppp = isA<processorPolyPatch>(
pp);
1344 if (ppp &&
pp.size())
1346 const auto& procPatch = *ppp;
1347 const label patchi =
pp.index();
1349 const labelRange
range 1351 pp.start()-boundaryOffset,
1357 new PackedList<Width>(faceValues,
range)
1359 PackedList<Width>& sendInfo = sendInfos[patchi];
1364 procPatch.neighbProcNo(),
1365 sendInfo.cdata_bytes(),
1366 sendInfo.size_bytes()
1377 const auto* ppp = isA<processorPolyPatch>(
pp);
1379 if (ppp &&
pp.size())
1381 const label patchi =
pp.index();
1382 const label patchSize =
pp.size();
1384 const PackedList<Width>& recvInfo = recvInfos[patchi];
1387 label bFacei =
pp.start()-boundaryOffset;
1388 for (label i = 0; i < patchSize; ++i)
1390 unsigned int recvVal = recvInfo[i];
1391 unsigned int faceVal = faceValues[bFacei];
1393 cop(faceVal, recvVal);
1394 faceValues.
set(bFacei, faceVal);
1406 const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(
pp);
1408 if (cpp && cpp->owner())
1412 const cyclicPolyPatch& cycPatch = *cpp;
1413 const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
1414 const label patchSize = cycPatch.size();
1416 label face0 = cycPatch.start()-boundaryOffset;
1417 label face1 = nbrPatch.start()-boundaryOffset;
1418 for (label i = 0; i < patchSize; ++i)
1420 unsigned int val0 = faceValues[face0];
1421 unsigned int val1 = faceValues[face1];
1423 unsigned int t = val0;
1425 faceValues[face0] = t;
1428 faceValues[face1] = val1;
1441 const polyMesh&
mesh,
1442 const UList<T>& cellData,
1443 List<T>& neighbourCellData
1449 <<
"Number of cell values " << cellData.size()
1450 <<
" is not equal to the number of cells in the mesh " 1460 label bFacei =
pp.offset();
1462 for (
const label celli :
pp.faceCells())
1464 neighbourCellData[bFacei] = cellData[celli];
1472 template<
unsigned W
idth,
class CombineOp>
1475 const polyMesh&
mesh,
1476 PackedList<Width>& faceValues,
1477 const CombineOp& cop,
1481 syncFaceList(
mesh,
false, faceValues, cop, parRun);
1485 template<
unsigned W
idth,
class CombineOp>
1490 const CombineOp& cop,
1494 syncFaceList(
mesh,
true, faceValues, cop, parRun);
1498 template<
unsigned W
idth>
1509 template<
unsigned W
idth>
1520 template<
unsigned W
idth,
class CombineOp>
1525 const CombineOp& cop,
1526 const unsigned int nullValue
1532 <<
"Number of values " << pointValues.
size()
1533 <<
" is not equal to the number of points in the mesh " 1538 const labelList& meshPoints = gd.coupledPatch().meshPoints();
1540 List<unsigned int> cppFld(gd.globalPointSlavesMap().constructSize());
1543 cppFld[i] = pointValues[meshPoints[i]];
1549 gd.globalPointSlaves(),
1550 gd.globalPointTransformedSlaves(),
1551 gd.globalPointSlavesMap(),
1558 pointValues[meshPoints[i]] = cppFld[i];
1563 template<
unsigned W
idth,
class CombineOp>
1566 const polyMesh&
mesh,
1567 PackedList<Width>& edgeValues,
1568 const CombineOp& cop,
1569 const unsigned int nullValue
1575 <<
"Number of values " << edgeValues.size()
1576 <<
" is not equal to the number of edges in the mesh " 1581 const labelList& meshEdges = gd.coupledPatchMeshEdges();
1583 List<unsigned int> cppFld(gd.globalEdgeSlavesMap().constructSize());
1586 cppFld[i] = edgeValues[meshEdges[i]];
1592 gd.globalEdgeSlaves(),
1593 gd.globalEdgeTransformedSlaves(),
1594 gd.globalEdgeSlavesMap(),
1601 edgeValues[meshEdges[i]] = cppFld[i];
label nPoints() const
Number of points supporting patch faces.
void size(const label n)
Older name for setAddressableSize.
static label 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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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.
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.
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.
const dimensionedScalar e
Elementary charge.
"scheduled" : (MPI_Send, MPI_Recv)
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
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.
label nEdges() const
Number of edges in patch.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void resize(const label newLen)
Adjust size of PtrList.
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))
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
static commsTypes defaultCommsType
Default commsType.
label nCells() const noexcept
Number of mesh cells.
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" : (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.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
label size() const noexcept
Number of entries.
const dimensionedScalar mp
Proton mass.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
forAllConstIters(mixture.phases(), phase)
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.