7 viewFactorDict.lookupOrDefault<
label>(
"maxDynListLength", 100000)
10 for (
label procI = 0; procI < Pstream::nProcs(); procI++)
15 DynamicField<point> start(coarseMesh.nFaces());
16 DynamicField<point> end(start.size());
17 DynamicList<label> startIndex(start.size());
18 DynamicList<label> endIndex(start.size());
20 DynamicList<label> startAgg(start.size());
21 DynamicList<label> endAgg(start.size());
24 const pointField& myFc = remoteCoarseCf[Pstream::myProcNo()];
25 const vectorField& myArea = remoteCoarseSf[Pstream::myProcNo()];
26 const labelField& myAgg = remoteCoarseAgg[Pstream::myProcNo()];
28 const pointField& remoteArea = remoteCoarseSf[procI];
29 const pointField& remoteFc = remoteCoarseCf[procI];
30 const labelField& remoteAgg = remoteCoarseAgg[procI];
36 for (; i < myFc.size(); i++)
38 const point& fc = myFc[i];
39 const vector& fA = myArea[i];
40 const label& fAgg = myAgg[i];
42 for (; j < remoteFc.size(); j++)
44 if (procI != Pstream::myProcNo() || i != j)
46 const point& remFc = remoteFc[j];
47 const vector& remA = remoteArea[j];
48 const label& remAgg = remoteAgg[j];
50 const vector& d = remFc - fc;
52 if (((d & fA) < 0.) && ((d & remA) > 0))
54 start.append(fc + 0.001*d);
56 startAgg.append(globalNumbering.toGlobal(procI, fAgg));
57 end.append(fc + 0.999*d);
58 label globalI = globalNumbering.toGlobal(procI, j);
59 endIndex.append(globalI);
60 endAgg.append(globalNumbering.toGlobal(procI, remAgg));
64 <<
"Dynamic list need from capacity."
65 <<
"Actual size maxDynListLength : "
73 if (j == remoteFc.size())
88 DynamicList<label> dRayIs;
94 if (!hitInfo[rayI].hit())
96 rayStartFace.append(startIndex[rayI]);
97 rayEndFace.append(endIndex[rayI]);
99 else if (aggHitIndex[rayI] == startAgg[rayI])
111 bool firstLoop =
true;
112 DynamicField<point> startHitItself;
113 DynamicField<point> endHitItself;
119 rayIs.transfer(dRayIs);
123 const label rayID = rayIs[rayI];
128 hitIndex = rayIs[rayI];
135 if (hitInfo[hitIndex].hit())
137 if (aggHitIndex[hitIndex] == startAgg[rayID])
139 const vector& endP = end[rayID];
140 const vector& startP = hitInfo[hitIndex].hitPoint();
141 const vector& d = endP - startP;
143 startHitItself.append(startP + 0.01*d);
144 endHitItself.append(startP + 1.01*d);
146 dRayIs.append(rayID);
148 else if (aggHitIndex[hitIndex] == endAgg[rayID])
150 rayStartFace.append(startIndex[rayID]);
151 rayEndFace.append(endIndex[rayID]);
158 hitInfo.resize(dRayIs.size());
160 surfacesMesh.findLine(startHitItself, endHitItself, hitInfo);
165 endHitItself.clear();
166 startHitItself.clear();
170 }
while (
returnReduce(hitInfo.size(), orOp<bool>()) > 0 && iter < 10);