2 labelHashSet selectedFaces;
4 const labelListList& edgeFaces = mesh.edgeFaces();
6 const scalarField& cohesiveZoneI = cohesiveZone.internalField();
8 forAll (crackPropagationPatches, patchI)
10 label curPatchID = crackPropagationPatches[patchI];
12 const labelList& patchEdges =
13 mesh.boundaryMesh()[curPatchID].meshEdges();
15 forAll(patchEdges, edgeI)
17 label curEdge = patchEdges[edgeI];
19 const labelList& curFaces = edgeFaces[curEdge];
21 forAll(curFaces, faceI)
23 if (curFaces[faceI] < mesh.nInternalFaces())
25 if (cohesiveZoneI[curFaces[faceI]] > (1.0 - SMALL))
27 if (!selectedFaces.found(curFaces[faceI]))
29 selectedFaces.insert(curFaces[faceI]);
38 // if (notchPatchID != -1)
40 // const labelList& notchPatchEdges =
41 // mesh.boundaryMesh()[notchPatchID].meshEdges();
43 // forAll(notchPatchEdges, edgeI)
45 // label curEdge = notchPatchEdges[edgeI];
47 // const labelList& curFaces = edgeFaces[curEdge];
49 // forAll(curFaces, faceI)
51 // if (curFaces[faceI] < mesh.nInternalFaces())
53 // if (cohesiveZoneI[curFaces[faceI]] > (1.0 - SMALL))
55 // selectedFaces.insert(curFaces[faceI]);
62 // if (mesh.boundary()[cohesivePatchID].size())
64 // const labelList& cohesivePatchEdges =
65 // mesh.boundaryMesh()[cohesivePatchID].meshEdges();
67 // forAll(cohesivePatchEdges, edgeI)
69 // label curEdge = cohesivePatchEdges[edgeI];
71 // const labelList& curFaces = edgeFaces[curEdge];
73 // forAll(curFaces, faceI)
75 // if (curFaces[faceI] < mesh.nInternalFaces())
77 // if (cohesiveZoneI[curFaces[faceI]] > (1.0 - SMALL))
79 // selectedFaces.insert(curFaces[faceI]);
86 crackPropagationPatchesInternalFaces = labelList(selectedFaces.toc());