diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C index aade46b54c..e48f7b48e3 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C +++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C @@ -88,10 +88,9 @@ int main(int argc, char *argv[]) forAllConstIter(dictionary, agglomDict, iter) { - labelList patchids = boundary.findIndices(iter().keyword()); - forAll(patchids, i) + labelList patchids = boundary.indices(iter().keyword()); + for (const label patchi : patchids) { - label patchi = patchids[i]; const polyPatch& pp = boundary[patchi]; if (!pp.coupled()) diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 30ec3a8c8d..7d575efa82 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -338,12 +338,11 @@ int main(int argc, char *argv[]) const polyBoundaryMesh& patches = mesh.boundaryMesh(); const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh(); - labelList viewFactorsPatches(patches.findIndices(viewFactorWall)); - forAll(viewFactorsPatches, i) + labelList viewFactorsPatches(patches.indices(viewFactorWall)); + for (const label patchi : viewFactorsPatches) { - label patchI = viewFactorsPatches[i]; - nCoarseFaces += coarsePatches[patchI].size(); - nFineFaces += patches[patchI].size(); + nCoarseFaces += coarsePatches[patchi].size(); + nFineFaces += patches[patchi].size(); } // total number of coarse faces @@ -370,10 +369,8 @@ int main(int argc, char *argv[]) DynamicList