37 namespace faceSelections
43 searchableSurfaceSelection,
56 const dictionary&
dict
62 searchableSurface::
New
67 dict.lookupOrDefault(
"name",
mesh.objectRegistry::db().
name()),
70 mesh.objectRegistry::db(),
101 for (
label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
103 start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]];
104 end[faceI] = mesh_.cellCentres()[mesh_.faceNeighbour()[faceI]];
116 const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
120 const polyPatch& pp = pbm[patchI];
126 label faceI = pp.start()+i;
127 start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]];
128 end[faceI] = neighbourCellCentres[faceI-mesh_.nInternalFaces()];
135 label faceI = pp.start()+i;
136 start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]];
137 end[faceI] = mesh_.faceCentres()[faceI];
143 surfacePtr_().findLine(start, end, hits);
145 surfacePtr_().getNormal(hits, normals);
149 for (
label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
151 if (hits[faceI].hit())
153 faceToZoneID[faceI] = zoneID;
154 vector d = end[faceI]-start[faceI];
155 faceToFlip[faceI] = ((normals[faceI] & d) < 0);
160 const polyPatch& pp = pbm[patchI];
166 label faceI = pp.start()+i;
167 if (hits[faceI].hit())
169 faceToZoneID[faceI] = zoneID;
170 vector d = end[faceI]-start[faceI];
171 faceToFlip[faceI] = ((normals[faceI] & d) < 0);