forAll(ptc, pointi) { const labelList& curFaces = pf[ptc[pointi]]; forAll(curFaces, facei) { if (!facesToRemoveMap.found(curFaces[facei])) { facesToModify.insert(curFaces[facei]); } } }
void bigParticleVoidFraction::buildLabelHashSet ( const scalar radius, const vector position, const label cellID, labelHashSet& hashSett )const { hashSett.insert(cellID); //Info<<"cell inserted"<<cellID<<endl; const labelList& nc = particleCloud_.mesh().cellCells()[cellID]; forAll(nc,i){ label neighbor=nc[i]; if(!hashSett.found(neighbor) && mag(position-particleCloud_.mesh().C()[neighbor])<radius){ buildLabelHashSet(radius,position,neighbor,hashSett); } }
// Step from faceI (on side cellI) to connected face & cell without crossing // fenceEdges. void Foam::regionSide::visitConnectedFaces ( const primitiveMesh& mesh, const labelHashSet& region, const labelHashSet& fenceEdges, const label cellI, const label faceI, labelHashSet& visitedFace ) { if (!visitedFace.found(faceI)) { if (debug) { Info<< "visitConnectedFaces : cellI:" << cellI << " faceI:" << faceI << " isOwner:" << (cellI == mesh.faceOwner()[faceI]) << endl; } // Mark as visited visitedFace.insert(faceI); // Mark which side of face was visited. if (cellI == mesh.faceOwner()[faceI]) { sideOwner_.insert(faceI); } // Visit all neighbouring faces on faceSet. Stay on this 'side' of // face by doing edge-face-cell walk. const labelList& fEdges = mesh.faceEdges()[faceI]; forAll(fEdges, fEdgeI) { label edgeI = fEdges[fEdgeI]; if (!fenceEdges.found(edgeI)) { // Step along faces on edge from cell to cell until // we hit face on faceSet. // Find face reachable from edge label otherFaceI = otherFace(mesh, cellI, faceI, edgeI); if (mesh.isInternalFace(otherFaceI)) { label otherCellI = cellI; // Keep on crossing faces/cells until back on face on // surface while (!region.found(otherFaceI)) { visitedFace.insert(otherFaceI); if (debug) { Info<< "visitConnectedFaces : cellI:" << cellI << " found insideEdgeFace:" << otherFaceI << endl; } // Cross otherFaceI into neighbouring cell otherCellI = meshTools::otherCell ( mesh, otherCellI, otherFaceI ); otherFaceI = otherFace ( mesh, otherCellI, otherFaceI, edgeI ); } visitConnectedFaces ( mesh, region, fenceEdges, otherCellI, otherFaceI, visitedFace ); } } } }