From 6b99fea4e76751861e2ad9871560b2907f98bfce Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 19 Jan 2022 10:30:01 +0100 Subject: [PATCH] ENH: use nBoundaryFaces() in more places (less clutter, more clarity) - noexcept for some methods - add std:: qualifier to unique_ptr for additional clarity --- .../polyMeshTetDecomposition.C | 10 +++++----- src/conversion/polyDualMesh/polyDualMesh.C | 9 +++++---- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 4 ++-- src/functionObjects/field/fluxSummary/fluxSummary.C | 4 ++-- .../sources/derived/rotorDiskSource/rotorDiskSource.C | 4 ++-- src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C | 4 ++-- .../snappyHexMesh/meshRefinement/meshRefinementBlock.C | 8 ++++---- .../meshRefinement/meshRefinementRefine.C | 4 ++-- src/meshTools/sets/faceSources/cellToFace/cellToFace.C | 4 ++-- 9 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C index b912f96cd9..3a67f06950 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2019 OpenFOAM Foundation - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -236,14 +236,14 @@ Foam::labelList Foam::polyMeshTetDecomposition::findFaceBasePts labelList tetBasePtIs(mesh.nFaces(), -1); - label nInternalFaces = mesh.nInternalFaces(); + const label nInternalFaces = mesh.nInternalFaces(); for (label fI = 0; fI < nInternalFaces; ++fI) { tetBasePtIs[fI] = findSharedBasePoint(mesh, fI, tol, report); } - pointField neighbourCellCentres(mesh.nFaces() - nInternalFaces); + pointField neighbourCellCentres(mesh.nBoundaryFaces()); for (label facei = nInternalFaces; facei < mesh.nFaces(); ++facei) { @@ -257,8 +257,8 @@ Foam::labelList Foam::polyMeshTetDecomposition::findFaceBasePts SubList