1 Info << nl << "Building list of direct interaction neighbours" << endl;
3 forAll (mesh_.points(), p)
5 forAll(mesh_.faces(), f)
7 if(testPointFaceDistance(p, f))
9 const labelList& pCells(mesh_.pointCells()[p]);
11 const label cellO(mesh_.faceOwner()[f]);
15 const label cellI(pCells[pC]);
17 // cells are not added to their own DIL
21 if (findIndex(directInteractionList[cellI], cellO) == -1)
23 directInteractionList[cellI].append(cellO);
29 if (findIndex(directInteractionList[cellO], cellI) == -1)
31 directInteractionList[cellO].append(cellI);
35 if (mesh_.isInternalFace(f))
37 // boundary faces will not have neighbour information
38 const label cellN(mesh_.faceNeighbour()[f]);
44 findIndex(directInteractionList[cellI], cellN)
48 directInteractionList[cellI].append(cellN);
56 findIndex(directInteractionList[cellN], cellI)
60 directInteractionList[cellN].append(cellI);
71 forAll (mesh_.edges(), edgeIIndex)
73 const edge& eI(mesh_.edges()[edgeIIndex]);
77 edgeJIndex = edgeIIndex + 1;
78 edgeJIndex != mesh_.edges().size();
82 const edge& eJ(mesh_.edges()[edgeJIndex]);
84 if (testEdgeEdgeDistance(eI, eJ))
86 const labelList& eICells(mesh_.edgeCells()[edgeIIndex]);
88 const labelList& eJCells(mesh_.edgeCells()[edgeJIndex]);
92 const label cellI(eICells[eIC]);
96 const label cellJ(eJCells[eJC]);
102 findIndex(directInteractionList[cellI], cellJ)
106 directInteractionList[cellI].append(cellJ);
114 findIndex(directInteractionList[cellJ], cellI)
118 directInteractionList[cellJ].append(cellI);
128 // label pointJIndex;
130 // forAll (mesh_.points(), pointIIndex)
134 // mesh_.points()[pointIIndex]
139 // pointJIndex = pointIIndex;
140 // pointJIndex != mesh_.points().size();
146 // mesh_.points()[pointJIndex]
149 // if (magSqr(ptI - ptJ) <= rCutMaxSqr)
151 // const labelList& ptICells
153 // mesh_.pointCells()[pointIIndex]
156 // const labelList& ptJCells
158 // mesh_.pointCells()[pointJIndex]
161 // forAll(ptICells, pIC)
163 // const label cellI(ptICells[pIC]);
165 // forAll(ptJCells, pJC)
167 // const label cellJ(ptJCells[pJC]);
169 // if (cellJ > cellI)
171 // if(findIndex(directInteractionList[cellI], cellJ) == -1)
173 // directInteractionList[cellI].append(cellJ);
177 // if (cellI > cellJ)
179 // if(findIndex(directInteractionList[cellJ], cellI) == -1)
181 // directInteractionList[cellJ].append(cellI);