diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index 905cf72f3eaa4c3095910c8767bf538b40846397..011417c29ecd92107e34ff596c9ba506a60cb50a 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -1388,11 +1388,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface } } - pointField localFaceCentres(pp.size()); - forAll(pp, i) - { - localFaceCentres[i] = mesh.faceCentres()[pp.addressing()[i]]; - } + pointField localFaceCentres(mesh.faceCentres(), pp.addressing()); // Get nearest surface and region labelList hitSurface; diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C index 24c7819d8d6b50ec92b4b8d6ccd97bc0356f7d1c..d42ac05b2233d1657f30a6511c825344c531924e 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C @@ -1242,7 +1242,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::refine // Do refinement of consistent set of cells followed by truncation and // load balancing. Foam::autoPtr<Foam::mapDistributePolyMesh> - Foam::meshRefinement::refineAndBalance +Foam::meshRefinement::refineAndBalance ( const string& msg, decompositionMethod& decomposer,