35 template<
class CloudType>
38 template<
class CloudType>
45 template<
class CloudType>
49 for (
typename CloudType::parcelType&
p : this->owner())
58 template<
class CloudType>
61 PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
63 label startOfRequests = Pstream::nRequests();
67 realRealInteraction();
69 il_.receiveReferredData(pBufs, startOfRequests);
71 realReferredInteraction();
75 template<
class CloudType>
81 typename CloudType::parcelType* pA_ptr =
nullptr;
82 typename CloudType::parcelType* pB_ptr =
nullptr;
84 List<DynamicList<typename CloudType::parcelType*>>&
cellOccupancy =
94 forAll(dil[realCelli], interactingCells)
96 List<typename CloudType::parcelType*> cellBParcels =
102 pB_ptr = cellBParcels[
b];
104 evaluatePair(*pA_ptr, *pB_ptr);
117 evaluatePair(*pA_ptr, *pB_ptr);
125 template<
class CloudType>
131 List<IDLList<typename CloudType::parcelType>>& referredParticles =
132 il_.referredParticles();
134 List<DynamicList<typename CloudType::parcelType*>>&
cellOccupancy =
140 IDLList<typename CloudType::parcelType>& refCellRefParticles =
141 referredParticles[refCelli];
143 const labelList& realCells = ril[refCelli];
149 typename CloudType::parcelType& referredParcel
150 : refCellRefParticles
156 forAll(realCells, realCelli)
158 List<typename CloudType::parcelType*> realCellParcels =
161 forAll(realCellParcels, realParcelI)
165 *realCellParcels[realParcelI],
175 template<
class CloudType>
178 const polyMesh&
mesh = this->owner().
mesh();
188 List<DynamicList<typename CloudType::parcelType*>>&
cellOccupancy =
192 DynamicList<point> flatSitePoints;
193 DynamicList<scalar> flatSiteExclusionDistancesSqr;
194 DynamicList<WallSiteData<vector>> flatSiteData;
195 DynamicList<point> otherSitePoints;
196 DynamicList<scalar> otherSiteDistances;
197 DynamicList<WallSiteData<vector>> otherSiteData;
198 DynamicList<point> sharpSitePoints;
199 DynamicList<scalar> sharpSiteExclusionDistancesSqr;
200 DynamicList<WallSiteData<vector>> sharpSiteData;
205 const labelList& realWallFaces = directWallFaces[realCelli];
210 flatSitePoints.clear();
211 flatSiteExclusionDistancesSqr.clear();
212 flatSiteData.clear();
213 otherSitePoints.clear();
214 otherSiteDistances.clear();
215 otherSiteData.clear();
216 sharpSitePoints.clear();
217 sharpSiteExclusionDistancesSqr.clear();
218 sharpSiteData.clear();
220 typename CloudType::parcelType&
p =
225 scalar r = wallModel_->pREff(
p);
229 forAll(realWallFaces, realWallFacei)
231 label realFacei = realWallFaces[realWallFacei];
239 if (nearest.distance() < r)
244 const vector& nearPt = nearest.rawPoint();
248 const scalar normalAlignment = normal & pW;
251 label patchi =
patchID[realFacei -
mesh.nInternalFaces()];
254 realFacei -
mesh.boundaryMesh()[patchi].start();
256 WallSiteData<vector> wSD
259 U.boundaryField()[patchi][patchFacei]
262 if (normalAlignment > cosPhiMinFlatWall)
270 !duplicatePointInList
274 sqr(r*flatWallDuplicateExclusion)
278 flatSitePoints.append(nearPt);
280 flatSiteExclusionDistancesSqr.append
282 sqr(r) -
sqr(nearest.distance())
285 flatSiteData.append(wSD);
290 otherSitePoints.append(nearPt);
292 otherSiteDistances.append(nearest.distance());
294 otherSiteData.append(wSD);
302 const labelList& cellRefWallFaces = il_.rwfilInverse()[realCelli];
304 forAll(cellRefWallFaces, rWFI)
306 label refWallFacei = cellRefWallFaces[rWFI];
308 const referredWallFace& rwf =
309 il_.referredWallFaces()[refWallFacei];
315 if (nearest.distance() < r)
317 const vector normal = rwf.unitNormal(pts);
319 const vector& nearPt = nearest.rawPoint();
323 const scalar normalAlignment = normal & pW;
327 WallSiteData<vector> wSD
330 il_.referredWallData()[refWallFacei]
333 if (normalAlignment > cosPhiMinFlatWall)
341 !duplicatePointInList
345 sqr(r*flatWallDuplicateExclusion)
349 flatSitePoints.append(nearPt);
351 flatSiteExclusionDistancesSqr.append
353 sqr(r) -
sqr(nearest.distance())
356 flatSiteData.append(wSD);
361 otherSitePoints.append(nearPt);
363 otherSiteDistances.append(nearest.distance());
365 otherSiteData.append(wSD);
384 for (
const label orderedIndex : sortedOtherSiteIndices)
386 const point& otherPt = otherSitePoints[orderedIndex];
390 !duplicatePointInList
394 flatSiteExclusionDistancesSqr
403 !duplicatePointInList
407 sharpSiteExclusionDistancesSqr
411 sharpSitePoints.append(otherPt);
413 sharpSiteExclusionDistancesSqr.append
415 sqr(r) -
sqr(otherSiteDistances[orderedIndex])
418 sharpSiteData.append(otherSiteData[orderedIndex]);
436 template<
class CloudType>
439 const DynamicList<point>& existingPoints,
440 const point& pointToTest,
441 scalar duplicateRangeSqr
446 if (
magSqr(existingPoints[i] - pointToTest) < duplicateRangeSqr)
456 template<
class CloudType>
459 const DynamicList<point>& existingPoints,
460 const point& pointToTest,
466 if (
magSqr(existingPoints[i] - pointToTest) < duplicateRangeSqr[i])
476 template<
class CloudType>
481 for (
typename CloudType::parcelType&
p : this->owner())
483 p.collisionRecords().update();
488 template<
class CloudType>
491 typename CloudType::parcelType& pA,
492 typename CloudType::parcelType& pB
495 pairModel_->evaluatePair(pA, pB);
499 template<
class CloudType>
502 typename CloudType::parcelType&
p,
503 const List<point>& flatSitePoints,
504 const List<WallSiteData<vector>>& flatSiteData,
505 const List<point>& sharpSitePoints,
506 const List<WallSiteData<vector>>& sharpSiteData
509 wallModel_->evaluateWall
522 template<
class CloudType>
549 this->coeffDict().getScalar(
"maxInteractionDistance"),
550 this->coeffDict().getOrDefault
552 "writeReferredParticleCloud",
555 this->coeffDict().template getOrDefault<
word>(
"U",
"U")
560 template<
class CloudType>
569 il_(cm.owner().
mesh())
578 template<
class CloudType>
585 template<
class CloudType>
588 label nSubCycles = 1;
590 if (pairModel_->controlsTimestep())
597 nSubCycles =
max(nSubCycles, nPairSubCycles);
600 if (wallModel_->controlsTimestep())
604 wallModel_->nSubCycles(), maxOp<label>()
607 nSubCycles =
max(nSubCycles, nWallSubCycles);
614 template<
class CloudType>