diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index be66f4cc53..79a06161d1 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -60,13 +60,10 @@ template void zeroCells ( GeometricField& vf, - const labelList& cells + const labelUList& cells ) { - forAll(cells, i) - { - vf[cells[i]] = Zero; - } + UIndirectList(vf.primitiveField(), cells) = Zero; } diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index 4d7b9d8811..3d19017f9d 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -103,8 +103,8 @@ dimensionedScalar alphaMax laminarTransport ); -const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); -//const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); +const labelUList& inletCells = mesh.boundary()["inlet"].faceCells(); +//const labelUList& outletCells = mesh.boundary()["outlet"].faceCells(); volScalarField alpha ( diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H index 8c692c1378..f5304eea58 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H @@ -55,7 +55,7 @@ if (mesh.changing()) dimensionedScalar rAUf("rAUf", dimTime, 1.0); const cellCellStencilObject& overlap = Stencil::New(mesh); - const labelList& cellTypes = overlap.cellTypes(); + const labelUList& cellTypes = overlap.cellTypes(); const labelIOList& zoneIDs = overlap.zoneID(); while (pimple.correctNonOrthogonal()) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C index b0c52f0f62..e3e2d7ee5f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C @@ -210,7 +210,7 @@ void VoFPatchTransfer::correct film().toRegion(patchi, Vp); const polyPatch& pp = pbm[patchi]; - const labelList& faceCells = pp.faceCells(); + const labelUList& faceCells = pp.faceCells(); // Accumulate the total mass removed from patch scalar dMassPatch = 0; diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H index 7df3631b04..9af4e28691 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H @@ -65,7 +65,7 @@ dimensionedScalar rAUf("rAUf", dimTime/rho.dimensions(), 1.0); const cellCellStencilObject& overlap = Stencil::New(mesh); - const labelList& cellTypes = overlap.cellTypes(); + const labelUList& cellTypes = overlap.cellTypes(); const labelIOList& zoneIDs = overlap.zoneID(); while (pimple.correctNonOrthogonal()) diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index d74f4ab01c..200a45becd 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -1674,10 +1674,9 @@ int main(int argc, char *argv[]) // Add cell zones to patch zone list forAll(bPatches, pI) { - const labelList& faceCells = bPatches[pI].faceCells(); - forAll(faceCells, fcI) + for (const label celli : bPatches[pI].faceCells()) { - if (zoneCell.test(faceCells[fcI])) + if (zoneCell.test(celli)) { boundaryZones[pI].append(name); break; diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C index f212aee72a..75ee48cccf 100644 --- a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C +++ b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C @@ -161,8 +161,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const { const faceUList& patchFaces = boundaryMesh()[patchi]; - const labelList& patchFaceCells = - boundaryMesh()[patchi].faceCells(); + const labelUList& patchFaceCells = boundaryMesh()[patchi].faceCells(); // The face group will be offset by 10 from the patch label diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 8e95e454a9..c91d9023bd 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -1506,7 +1506,7 @@ int main(int argc, char *argv[]) // Go through all the patchFaces and find corresponding face in pp. forAll(patchFaces, patchi) { - const DynamicList& pFaces = patchFaces[patchi]; + const auto& pFaces = patchFaces[patchi]; Info<< "Finding faces of patch " << patchi << endl; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 2c50d6c462..d0acdef622 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -42,7 +42,7 @@ template Foam::autoPtr Foam::DistributedDelaunayMesh::buildMap ( - const List