diff --git a/applications/test/globalMeshData/Test-globalMeshData.C b/applications/test/globalMeshData/Test-globalMeshData.C
index 56a285ae0266af066af92b55d84cbc6db866c1c5..8d3f2c24e6ac8ab2a2fa065a1dfe94632e3c7f20 100644
--- a/applications/test/globalMeshData/Test-globalMeshData.C
+++ b/applications/test/globalMeshData/Test-globalMeshData.C
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
         const labelListList& transformedSlaves =
             globalData.globalPointTransformedBoundaryFaces();
 
-        label nBnd = mesh.nFaces()-mesh.nInternalFaces();
+        const label nBnd = mesh.nBoundaryFaces();
 
         pointField fc(globalPointBoundaryFacesMap.constructSize());
         SubList<point>(fc, nBnd) =
diff --git a/applications/test/syncTools/Test-syncTools.C b/applications/test/syncTools/Test-syncTools.C
index 5dfef2fcf2d74cf894f5506511c58b7b0b1ce254..5fca906370b88b16248e0dcacfeb44998a03c1e2 100644
--- a/applications/test/syncTools/Test-syncTools.C
+++ b/applications/test/syncTools/Test-syncTools.C
@@ -195,7 +195,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
         SubList<face>
         (
             mesh.faces(),
-            mesh.nFaces()-mesh.nInternalFaces(),
+            mesh.nBoundaryFaces(),
             mesh.nInternalFaces()
         ),
         mesh.points()
diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
index ce2ee164f20819b14f0e1475f78628a832cf7daa..c522d8f48ab64861232280ecad54e2c70809156d 100644
--- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
+++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
@@ -413,7 +413,7 @@ int main(int argc, char *argv[])
     const SubList<face> outsideFaces
     (
         mesh.faces(),
-        mesh.nFaces() - mesh.nInternalFaces(),
+        mesh.nBoundaryFaces(),
         mesh.nInternalFaces()
     );
 
diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
index 064395df05a03d5889688130f8e96c743411943d..e029457d425f7ee13d6e66502c0987aa7c428f0c 100644
--- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
@@ -1386,7 +1386,7 @@ int main(int argc, char *argv[])
     DynamicList<polyPatch*> newPatches(nPatches);
 
     // For every boundary face the old patch.
-    labelList facePatchID(pShapeMesh.nFaces()-pShapeMesh.nInternalFaces(), -1);
+    labelList facePatchID(pShapeMesh.nBoundaryFaces(), -1);
     label cMeshFace = pShapeMesh.nInternalFaces();
     label nBoundaries = 0;
 
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
index ce5f0bc1916abbfed89a2f4f00ab00d7e834b347..3ab96dd6b05e7595de34f258f04ee6b12f15c74b 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C
@@ -468,7 +468,7 @@ void Foam::backgroundMeshDecomposition::printMeshData
 
     // // Print stats
 
-    // globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
+    // globalIndex globalBoundaryFaces(mesh.nBoundaryFaces());
 
     for (label proci = 0; proci < Pstream::nProcs(); proci++)
     {
@@ -671,7 +671,7 @@ void Foam::backgroundMeshDecomposition::buildPatchAndTree()
         SubList<face>
         (
             mesh_.faces(),
-            mesh_.nFaces() - mesh_.nInternalFaces(),
+            mesh_.nBoundaryFaces(),
             mesh_.nInternalFaces()
         ),
         mesh_.points()
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C
index 2a37049388999a8024defbb3a211357de420c2ff..7f2ecf8c81e848fecf0981dfb79a6931083704b7 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C
@@ -39,7 +39,7 @@ void Foam::conformalVoronoiMesh::calcNeighbourCellCentres
     pointField& neiCc
 ) const
 {
-    label nBoundaryFaces = mesh.nFaces() - mesh.nInternalFaces();
+    const label nBoundaryFaces = mesh.nBoundaryFaces();
 
     if (neiCc.size() != nBoundaryFaces)
     {
@@ -319,7 +319,7 @@ void Foam::conformalVoronoiMesh::calcFaceZones
     const labelList& faceOwner = mesh.faceOwner();
     const labelList& faceNeighbour = mesh.faceNeighbour();
 
-    labelList neiFaceOwner(mesh.nFaces() - mesh.nInternalFaces(), label(-1));
+    labelList neiFaceOwner(mesh.nBoundaryFaces(), label(-1));
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
@@ -421,7 +421,7 @@ void Foam::conformalVoronoiMesh::calcFaceZones
         )
     );
 
-    pointField neiCc(mesh.nFaces() - mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
     calcNeighbourCellCentres
     (
         mesh,
@@ -498,7 +498,7 @@ void Foam::conformalVoronoiMesh::calcFaceZones
     }
 
 
-//    labelList neiCellSurface(mesh.nFaces()-mesh.nInternalFaces());
+//    labelList neiCellSurface(mesh.nBoundaryFaces());
 //
 //    forAll(patches, patchi)
 //    {
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
index 578731132f934259aa90c0aa69c408045d19833a..0364c1777494c48cea6e22222ad39a9c25f88970 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
@@ -119,7 +119,7 @@ void printMeshData(const polyMesh& mesh)
 
     // Print stats
 
-    globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
+    globalIndex globalBoundaryFaces(mesh.nBoundaryFaces());
 
     label maxProcCells = 0;
     label totProcFaces = 0;
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C
index d3d785343619d2fb1d6cded68af3affddcc37520..e230e03990eb2ed38a41c97c5cd31d539b51e306 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C
@@ -314,7 +314,7 @@ void Foam::mergeAndWrite
     }
 
 
-    boolList bndInSet(mesh.nFaces()-mesh.nInternalFaces());
+    boolList bndInSet(mesh.nBoundaryFaces());
     forAll(pbm, patchi)
     {
         const polyPatch& pp = pbm[patchi];
diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C
index 5422183a3f32725a33211eb3fa67b989aa7a6085..d6c7160f5d5b4ade04d1a7ad194e01d7d055bb25 100644
--- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C
+++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C
@@ -249,7 +249,7 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
         (
             mesh,
             "duplicateFaces",
-            (mesh.nFaces() - mesh.nInternalFaces())/256
+            mesh.nBoundaryFaces()/256
         );
 
         forAll(duplicates, bFacei)
diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
index 2a05649e771ff854b9f6696588841e3630ca2e2b..972503c9ec8d04f04027d28d884d4c3090c38fa2 100644
--- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
+++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
@@ -295,11 +295,7 @@ int main(int argc, char *argv[])
     {
         const polyBoundaryMesh& bm = mesh.boundaryMesh();
 
-        labelList neiStatus
-        (
-            mesh.nFaces()-mesh.nInternalFaces(),
-            orientedSurface::UNVISITED
-        );
+        labelList neiStatus(mesh.nBoundaryFaces(), orientedSurface::UNVISITED);
 
         forAll(faceLabels, i)
         {
diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C
index 88f949782d3b3ff1652c721eed96c72a457ff4e9..a1cbb287f6b40633938dbdbee5421db92b6b6fbc 100644
--- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C
+++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C
@@ -140,7 +140,7 @@ void simpleMarkFeatures
         SubList<face>
         (
             mesh.faces(),
-            mesh.nFaces()-mesh.nInternalFaces(),
+            mesh.nBoundaryFaces(),
             mesh.nInternalFaces()
         ),
         mesh.points()
@@ -238,7 +238,7 @@ void simpleMarkFeatures
     // ~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // Face centres that need inclusion in the dual mesh
-    labelHashSet featureFaceSet(mesh.nFaces()-mesh.nInternalFaces());
+    labelHashSet featureFaceSet(mesh.nBoundaryFaces());
     // A. boundary faces.
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
index fe0a60070fb728c284d5e1ba6e41e5e0d22aa202..2b9ff9c3b85f02bcba471d26a1f9708e232500a7 100644
--- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
+++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
@@ -353,7 +353,7 @@ void getInterfaceSizes
     // ~~~~~~~~~~~~~~
 
     // Neighbour cellRegion.
-    labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces());
+    labelList coupledRegion(mesh.nBoundaryFaces());
 
     forAll(coupledRegion, i)
     {
@@ -641,7 +641,7 @@ autoPtr<mapPolyMesh> createRegionMesh
 
 
     // Neighbour cellRegion.
-    labelList coupledRegion(mesh.nFaces()-mesh.nInternalFaces());
+    labelList coupledRegion(mesh.nBoundaryFaces());
 
     forAll(coupledRegion, i)
     {
@@ -1232,7 +1232,7 @@ void getZoneID
     }
 
     // Neighbour zoneID.
-    neiZoneID.setSize(mesh.nFaces()-mesh.nInternalFaces());
+    neiZoneID.setSize(mesh.nBoundaryFaces());
 
     forAll(neiZoneID, i)
     {
@@ -1263,7 +1263,7 @@ void matchRegions
 
     // Get current per cell zoneID
     labelList zoneID(mesh.nCells(), -1);
-    labelList neiZoneID(mesh.nFaces()-mesh.nInternalFaces());
+    labelList neiZoneID(mesh.nBoundaryFaces());
     getZoneID(mesh, cellZones, zoneID, neiZoneID);
 
     // Sizes per cellzone
@@ -1552,7 +1552,7 @@ int main(int argc, char *argv[])
     // Existing zoneID
     labelList zoneID(mesh.nCells(), -1);
     // Neighbour zoneID.
-    labelList neiZoneID(mesh.nFaces()-mesh.nInternalFaces());
+    labelList neiZoneID(mesh.nBoundaryFaces());
     getZoneID(mesh, cellZones, zoneID, neiZoneID);
 
 
@@ -1622,7 +1622,7 @@ int main(int argc, char *argv[])
         );
 
         labelList newZoneID(mesh.nCells(), -1);
-        labelList newNeiZoneID(mesh.nFaces()-mesh.nInternalFaces());
+        labelList newNeiZoneID(mesh.nBoundaryFaces());
         getZoneID(mesh, newCellZones, newZoneID, newNeiZoneID);
 
         label unzonedCelli = newZoneID.find(-1);
diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
index 133161fcc7a141eddb38a484c51926a06c68df27..e01205428b329e29026cb621e22fcfd24b2a575f 100644
--- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
+++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
@@ -172,7 +172,7 @@ void printMeshData(const polyMesh& mesh)
 
     // Print stats
 
-    globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces());
+    globalIndex globalBoundaryFaces(mesh.nBoundaryFaces());
 
     label maxProcCells = 0;
     label totProcFaces = 0;
diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C
index b90e4cefea2759a9416cdf2e456233b46fd8b638..ddefd7f7ee4945a6357bb977bb300f039db6cbd4 100644
--- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C
+++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C
@@ -55,7 +55,7 @@ void Foam::channelIndex::walkOppositeFaces
 {
     const cellList& cells = mesh.cells();
     const faceList& faces = mesh.faces();
-    label nBnd = mesh.nFaces() - mesh.nInternalFaces();
+    const label nBnd = mesh.nBoundaryFaces();
 
     DynamicList<label> frontFaces(startFaces);
     forAll(frontFaces, i)
diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C
index e48f7b48e34b3ada7db12ba15605df8a7f5e23c7..ff77af6bb6290d2b7981449ee0c12f807253b10d 100644
--- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C
+++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
     }
 
     // Sync agglomeration across coupled patches
-    labelList nbrAgglom(mesh.nFaces() - mesh.nInternalFaces(), -1);
+    labelList nbrAgglom(mesh.nBoundaryFaces(), -1);
 
     forAll(boundary, patchi)
     {
diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C
index f7578ee9de09e655e6edef6ebaca7227f7edab8f..554f8e1ac9c558553b86751a07a78cee9f6b3828 100644
--- a/applications/utilities/preProcessing/setFields/setFields.C
+++ b/applications/utilities/preProcessing/setFields/setFields.C
@@ -239,7 +239,7 @@ bool setFaceFieldType
         const Type& value = pTraits<Type>(fieldValueStream);
 
         // Create flat list of selected faces and their value.
-        Field<Type> allBoundaryValues(mesh.nFaces()-mesh.nInternalFaces());
+        Field<Type> allBoundaryValues(mesh.nBoundaryFaces());
         forAll(field.boundaryField(), patchi)
         {
             SubField<Type>
@@ -447,7 +447,7 @@ int main(int argc, char *argv[])
             (
                 mesh,
                 "faceSet",
-                (mesh.nFaces()-mesh.nInternalFaces())/10+1
+                mesh.nBoundaryFaces()/10+1
             );
 
             source->applyToSet
diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
index 7d575efa820d501cc9d13907a142f70ab4937f1a..3670eceab1177999421b3ca25bd3fba2252cdebb 100644
--- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
+++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
@@ -82,10 +82,7 @@ triSurface triangulate
     const polyMesh& mesh = bMesh.mesh();
 
     // Storage for surfaceMesh. Size estimate.
-    DynamicList<labelledTri> triangles
-    (
-        mesh.nFaces() - mesh.nInternalFaces()
-    );
+    DynamicList<labelledTri> triangles(mesh.nBoundaryFaces());
 
     label newPatchI = 0;
     label localTriFaceI = 0;
diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
index ae6d7f28a2f4bedb910973c28c3aec1c47ac8e2c..feb7781a19622a64e9a66a796c2e6c9fa0b3c299 100644
--- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
+++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C
@@ -1325,7 +1325,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const
     // Global indices for boundary faces
     globalBoundaryFaceNumberingPtr_.reset
     (
-        new globalIndex(mesh_.nFaces()-mesh_.nInternalFaces())
+        new globalIndex(mesh_.nBoundaryFaces())
     );
     globalIndex& globalIndices = globalBoundaryFaceNumberingPtr_();
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
index 9182fb5a907dee045f350e61319ad42f97a20989..741aeef3e81c4561aa578c1495e5f4a6b1ad02e1 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
@@ -450,10 +450,7 @@ const Foam::labelList& Foam::polyBoundaryMesh::patchID() const
 {
     if (!patchIDPtr_.valid())
     {
-        patchIDPtr_.reset
-        (
-            new labelList(mesh_.nFaces() - mesh_.nInternalFaces())
-        );
+        patchIDPtr_.reset(new labelList(mesh_.nBoundaryFaces()));
         labelList& list = *patchIDPtr_;
 
         const polyPatchList& patches = *this;
@@ -613,13 +610,21 @@ Foam::wordList Foam::polyBoundaryMesh::physicalTypes() const
 }
 
 
+Foam::label Foam::polyBoundaryMesh::start() const
+{
+    return mesh_.nInternalFaces();
+}
+
+
+Foam::label Foam::polyBoundaryMesh::nFaces() const
+{
+    return mesh_.nBoundaryFaces();
+}
+
+
 Foam::labelRange Foam::polyBoundaryMesh::range() const
 {
-    return labelRange
-    (
-        mesh_.nInternalFaces(),
-        mesh_.nFaces() - mesh_.nInternalFaces()
-    );
+    return labelRange(mesh_.nInternalFaces(), mesh_.nBoundaryFaces());
 }
 
 
diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
index 0947df807d62b7c29917942f3b71e247bfce28c7..c97da3db7bc2618973f7db544fb8acaec7ae679e 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H
@@ -153,7 +153,7 @@ public:
         //  polyBoundaryMesh and not parallel
         const List<labelPairList>& neighbourEdges() const;
 
-        //- Return the number of non-processor patches
+        //- The number of patches before the first processor patch.
         label nNonProcessor() const;
 
         //- Return a list of patch names
@@ -165,8 +165,16 @@ public:
         //- Return a list of physical types
         wordList physicalTypes() const;
 
-        //- Return the range used for all boundary faces
-        //  Spans [nInternalFaces, nFaces)
+        //- The start label of the boundary faces in the polyMesh face list
+        //  Same as mesh.nInternalFaces()
+        label start() const;
+
+        //- The number of boundary faces in the underlying mesh
+        //  Same as mesh.nBoundaryFaces()
+        label nFaces() const;
+
+        //- The face range for all boundary faces
+        //  Spans [nInternalFaces, nFaces) of the underlying mesh
         labelRange range() const;
 
         //- Return the range used for boundary faces on patchi.
diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C
index f2389857d986463586b837cd75cf805624f691eb..a84f56d5d7dcff89b17f5d38b377c1fb5efec6cb 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C
@@ -377,7 +377,7 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets
     const vectorField& fc = mesh.faceCentres();
 
     // Calculate coupled cell centre
-    pointField neiCc(mesh.nFaces() - mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); ++facei)
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
index d48d7e30caa155e175ce6991c8fac798e2cb2a23..24bc155db030ee48c764113fa43a711b6f917cdb 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.C
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2018 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -293,6 +293,12 @@ Foam::wordList Foam::polyPatch::constraintTypes()
 }
 
 
+Foam::label Foam::polyPatch::offset() const
+{
+    return start_ - boundaryMesh().start();
+}
+
+
 const Foam::polyBoundaryMesh& Foam::polyPatch::boundaryMesh() const
 {
     return boundaryMesh_;
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H
index a43c9e9844bee0405ed4e270a114ef8fa61e2cf5..9de2d07b6ad5229fea42781c14d2e8b6d48940bf 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
-     \\/     M anipulation  | Copyright (C) 2015 OpenCFD Ltd.
+     \\/     M anipulation  | Copyright (C) 2015-2018 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -49,10 +49,7 @@ SourceFiles
 namespace Foam
 {
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// Forward declaration of friend functions and operators
-
+// Forward declarations
 class polyBoundaryMesh;
 class polyPatch;
 class PstreamBuffers;
@@ -304,6 +301,10 @@ public:
 
     // Member Functions
 
+        //- The offset where this patch starts in the boundary face list
+        //  The value is the same as  patch.start() - mesh.nInternalFaces()
+        label offset() const;
+
         //- Return start label of this patch in the polyMesh face list
         label start() const
         {
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
index 99bf41e4c35f176feaba6f0a806b0dd17252d0d7..1437834a46e68b78146a55429080bb0618a1825d 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C
@@ -44,7 +44,7 @@ void Foam::syncTools::swapBoundaryCellPositions
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    neighbourCellData.resize(mesh.nFaces()-mesh.nInternalFaces());
+    neighbourCellData.resize(mesh.nBoundaryFaces());
 
     for (const polyPatch& pp : patches)
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
index 68f47b1494e953228eb2072343fa8bec41a916a0..7f32972586efff8c2ffe751f55c83e82e5064f73 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H
@@ -395,7 +395,7 @@ public:
                 SubList<T> bndValues
                 (
                     faceValues,
-                    mesh.nFaces()-mesh.nInternalFaces(),
+                    mesh.nBoundaryFaces(),
                     mesh.nInternalFaces()
                 );
 
@@ -420,7 +420,7 @@ public:
                 SubList<point> bndValues
                 (
                     positions,
-                    mesh.nFaces()-mesh.nInternalFaces(),
+                    mesh.nBoundaryFaces(),
                     mesh.nInternalFaces()
                 );
                 syncBoundaryFaceList
@@ -476,7 +476,7 @@ public:
                 SubList<T> bndValues
                 (
                     faceValues,
-                    mesh.nFaces()-mesh.nInternalFaces(),
+                    mesh.nBoundaryFaces(),
                     mesh.nInternalFaces()
                 );
                 syncBoundaryFaceList
diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
index e96be7fe10d29eb72648e41005674d34687ad3f3..c0b15c78dae0641f585260163d77216490ef0126 100644
--- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
+++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C
@@ -929,7 +929,7 @@ void Foam::syncTools::syncBoundaryFaceList
     const bool parRun
 )
 {
-    const label nBFaces = mesh.nFaces() - mesh.nInternalFaces();
+    const label nBFaces = mesh.nBoundaryFaces();
 
     if (faceValues.size() != nBFaces)
     {
@@ -1160,7 +1160,7 @@ void Foam::syncTools::swapBoundaryCellList
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    neighbourCellData.resize(mesh.nFaces()-mesh.nInternalFaces());
+    neighbourCellData.resize(mesh.nBoundaryFaces());
 
     for (const polyPatch& pp : patches)
     {
diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
index 8bf7480557cbe5b9ba5b790a894ee0f2b9d2bc32..d7543f4fd52b3f95b8c78be64dc062e78a3fc4ea 100644
--- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
+++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C
@@ -537,8 +537,8 @@ bool Foam::faceZone::checkParallelSync(const bool report) const
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     {
-        boolList neiZoneFace(mesh.nFaces()-mesh.nInternalFaces(), false);
-        boolList neiZoneFlip(mesh.nFaces()-mesh.nInternalFaces(), false);
+        boolList neiZoneFace(mesh.nBoundaryFaces(), false);
+        boolList neiZoneFlip(mesh.nBoundaryFaces(), false);
         forAll(*this, i)
         {
             const label facei = operator[](i);
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
index 5e1f71275aa5530c5ffc31d4efcf73675821fe78..cbd7df5f90230de80f590180cde09d84d1f6390f 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2018 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -91,7 +91,7 @@ class primitiveMesh
             //- Number of internal edges using 0 or 1 boundary points
             mutable label nInternal1Edges_;
 
-            //- Number of internal edges using 0,1 or 2boundary points
+            //- Number of internal edges using 0,1 or 2 boundary points
             mutable label nInternalEdges_;
 
             //- Number of edges
@@ -478,24 +478,39 @@ public:
 
             // Mesh size parameters
 
+                //- Number of mesh points
                 inline label nPoints() const;
+
+                //- Number of mesh edges
                 inline label nEdges() const;
-                inline label nInternalFaces() const;
+
+                //- Number of mesh faces
                 inline label nFaces() const;
+
+                //- Number of mesh cells
                 inline label nCells() const;
 
-                // If points are ordered (nInternalPoints != -1):
+                //- Number of internal faces
+                inline label nInternalFaces() const;
+
+                //- Number of boundary faces (== nFaces - nInternalFaces)
+                inline label nBoundaryFaces() const;
+
+
+            // If points are ordered (nInternalPoints != -1):
+
+                //- Points not on boundary
+                inline label nInternalPoints() const;
+
+                //- Internal edges (i.e. not on boundary face) using
+                //- no boundary point
+                inline label nInternal0Edges() const;
 
-                    //- Points not on boundary
-                    inline label nInternalPoints() const;
+                //- Internal edges using 0 or 1 boundary point
+                inline label nInternal1Edges() const;
 
-                    //- Internal edges (i.e. not on boundary face) using
-                    //  no boundary point
-                    inline label nInternal0Edges() const;
-                    //- Internal edges using 0 or 1 boundary point
-                    inline label nInternal1Edges() const;
-                    //- Internal edges using 0,1 or 2 boundary points
-                    inline label nInternalEdges() const;
+                //- Internal edges using 0,1 or 2 boundary points
+                inline label nInternalEdges() const;
 
 
             // Primitive mesh data
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H
index 42ad4c268706b11e29efd3cf7ee5133fd1c2b8af..df14e3c3624de69c789166e19de43fdef985d021 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshI.H
@@ -3,7 +3,7 @@
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
-     \\/     M anipulation  |
+     \\/     M anipulation  | Copyright (C) 2018 OpenCFD Ltd.
 -------------------------------------------------------------------------------
 License
     This file is part of OpenFOAM.
@@ -21,30 +21,23 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-Description
-
 \*---------------------------------------------------------------------------*/
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-namespace Foam
-{
-
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
-inline label primitiveMesh::nInternalPoints() const
+inline Foam::label Foam::primitiveMesh::nInternalPoints() const
 {
     return nInternalPoints_;
 }
 
 
-inline label primitiveMesh::nPoints() const
+inline Foam::label Foam::primitiveMesh::nPoints() const
 {
     return nPoints_;
 }
 
 
-inline label primitiveMesh::nInternal0Edges() const
+inline Foam::label Foam::primitiveMesh::nInternal0Edges() const
 {
     // Force edge calculation
     (void)nEdges();
@@ -52,7 +45,7 @@ inline label primitiveMesh::nInternal0Edges() const
 }
 
 
-inline label primitiveMesh::nInternal1Edges() const
+inline Foam::label Foam::primitiveMesh::nInternal1Edges() const
 {
     // Force edge calculation
     (void)nEdges();
@@ -60,7 +53,7 @@ inline label primitiveMesh::nInternal1Edges() const
 }
 
 
-inline label primitiveMesh::nInternalEdges() const
+inline Foam::label Foam::primitiveMesh::nInternalEdges() const
 {
     // Force edge calculation
     (void)nEdges();
@@ -68,7 +61,7 @@ inline label primitiveMesh::nInternalEdges() const
 }
 
 
-inline label primitiveMesh::nEdges() const
+inline Foam::label Foam::primitiveMesh::nEdges() const
 {
     if (nEdges_ < 0)
     {
@@ -79,134 +72,136 @@ inline label primitiveMesh::nEdges() const
 }
 
 
-inline label primitiveMesh::nInternalFaces() const
+inline Foam::label Foam::primitiveMesh::nInternalFaces() const
 {
     return nInternalFaces_;
 }
 
 
-inline label primitiveMesh::nFaces() const
+inline Foam::label Foam::primitiveMesh::nBoundaryFaces() const
+{
+    return (nFaces_ - nInternalFaces_);
+}
+
+
+inline Foam::label Foam::primitiveMesh::nFaces() const
 {
     return nFaces_;
 }
 
 
-inline label primitiveMesh::nCells() const
+inline Foam::label Foam::primitiveMesh::nCells() const
 {
     return nCells_;
 }
 
 
-inline bool primitiveMesh::isInternalFace(const label faceIndex) const
+inline bool Foam::primitiveMesh::isInternalFace(const label faceIndex) const
 {
-    return faceIndex < nInternalFaces();
+    return faceIndex < nInternalFaces_;
 }
 
 
-inline bool primitiveMesh::hasCellShapes() const
+inline bool Foam::primitiveMesh::hasCellShapes() const
 {
     return cellShapesPtr_;
 }
 
 
-inline bool primitiveMesh::hasEdges() const
+inline bool Foam::primitiveMesh::hasEdges() const
 {
     return edgesPtr_;
 }
 
 
-inline bool primitiveMesh::hasCellCells() const
+inline bool Foam::primitiveMesh::hasCellCells() const
 {
     return ccPtr_;
 }
 
 
-inline bool primitiveMesh::hasEdgeCells() const
+inline bool Foam::primitiveMesh::hasEdgeCells() const
 {
     return ecPtr_;
 }
 
 
-inline bool primitiveMesh::hasPointCells() const
+inline bool Foam::primitiveMesh::hasPointCells() const
 {
     return pcPtr_;
 }
 
 
-inline bool primitiveMesh::hasCells() const
+inline bool Foam::primitiveMesh::hasCells() const
 {
     return cfPtr_;
 }
 
 
-inline bool primitiveMesh::hasEdgeFaces() const
+inline bool Foam::primitiveMesh::hasEdgeFaces() const
 {
     return efPtr_;
 }
 
 
-inline bool primitiveMesh::hasPointFaces() const
+inline bool Foam::primitiveMesh::hasPointFaces() const
 {
     return pfPtr_;
 }
 
 
-inline bool primitiveMesh::hasCellEdges() const
+inline bool Foam::primitiveMesh::hasCellEdges() const
 {
     return cePtr_;
 }
 
 
-inline bool primitiveMesh::hasFaceEdges() const
+inline bool Foam::primitiveMesh::hasFaceEdges() const
 {
     return fePtr_;
 }
 
 
-inline bool primitiveMesh::hasPointEdges() const
+inline bool Foam::primitiveMesh::hasPointEdges() const
 {
     return pePtr_;
 }
 
 
-inline bool primitiveMesh::hasPointPoints() const
+inline bool Foam::primitiveMesh::hasPointPoints() const
 {
     return ppPtr_;
 }
 
 
-inline bool primitiveMesh::hasCellPoints() const
+inline bool Foam::primitiveMesh::hasCellPoints() const
 {
     return cpPtr_;
 }
 
 
-inline bool primitiveMesh::hasCellCentres() const
+inline bool Foam::primitiveMesh::hasCellCentres() const
 {
     return cellCentresPtr_;
 }
 
 
-inline bool primitiveMesh::hasFaceCentres() const
+inline bool Foam::primitiveMesh::hasFaceCentres() const
 {
     return faceCentresPtr_;
 }
 
 
-inline bool primitiveMesh::hasCellVolumes() const
+inline bool Foam::primitiveMesh::hasCellVolumes() const
 {
     return cellVolumesPtr_;
 }
 
 
-inline bool primitiveMesh::hasFaceAreas() const
+inline bool Foam::primitiveMesh::hasFaceAreas() const
 {
     return faceAreasPtr_;
 }
 
 
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-} // End namespace Foam
-
 // ************************************************************************* //
diff --git a/src/conversion/ensight/output/ensightOutputTemplates.C b/src/conversion/ensight/output/ensightOutputTemplates.C
index a29fa3ea58452ba4b914904fb1d1b5c4461bc436..3ffb0661498a18c70a72400afed499b11b886a9e 100644
--- a/src/conversion/ensight/output/ensightOutputTemplates.C
+++ b/src/conversion/ensight/output/ensightOutputTemplates.C
@@ -261,7 +261,7 @@ bool Foam::ensightOutput::writeField
         // flat boundary field
         // as per volPointInterpolation::flatBoundaryField()
 
-        Field<Type> flat(mesh.nFaces() - mesh.nInternalFaces());
+        Field<Type> flat(mesh.nBoundaryFaces());
 
         const fvBoundaryMesh& bm = mesh.boundary();
         forAll(vf.boundaryField(), patchI)
diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C
index 9b325c94157f8c1672cb026b57e1b86a9e0e6d8e..382ae4d4451f5d6ffc34780f566619a278107cad 100644
--- a/src/conversion/polyDualMesh/polyDualMesh.C
+++ b/src/conversion/polyDualMesh/polyDualMesh.C
@@ -1407,7 +1407,7 @@ Foam::polyDualMesh::polyDualMesh
             IOobject::NO_READ,
             IOobject::AUTO_WRITE
         ),
-        labelList(mesh.nFaces() - mesh.nInternalFaces())
+        labelList(mesh.nBoundaryFaces(), -1)
     )
 {
     calcDual(mesh, featureEdges, featurePoints);
@@ -1446,7 +1446,7 @@ Foam::polyDualMesh::polyDualMesh
             IOobject::NO_READ,
             IOobject::AUTO_WRITE
         ),
-        labelList(mesh.nFaces() - mesh.nInternalFaces(), -1)
+        labelList(mesh.nBoundaryFaces(), -1)
     )
 {
     labelList featureEdges, featurePoints;
@@ -1470,7 +1470,7 @@ void Foam::polyDualMesh::calcFeatures
         SubList<face>
         (
             mesh.faces(),
-            mesh.nFaces() - mesh.nInternalFaces(),
+            mesh.nBoundaryFaces(),
             mesh.nInternalFaces()
         ),
         mesh.points()
diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
index 25dc0c9687f20bc7b1f7746531c29712e9001914..266d2c3dbff11037ab24aa8ddfb059c63c3aee24 100644
--- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
+++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C
@@ -86,7 +86,7 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells
     unrefineableCell = protectedCell_;
 
     // Get neighbouring cell level
-    labelList neiLevel(nFaces()-nInternalFaces());
+    labelList neiLevel(nBoundaryFaces());
 
     for (label facei = nInternalFaces(); facei < nFaces(); facei++)
     {
diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
index a26a431330064e63c201fb4dfc64ce1f035bbdb0..1d3a1ec3805081be041df707b26a4b4ee2b3fbd3 100644
--- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C
+++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
@@ -476,7 +476,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh)
     patches_.setSize(mesh.boundaryMesh().size());
 
     // Number of boundary faces
-    label nBFaces = mesh.nFaces() - mesh.nInternalFaces();
+    const label nBFaces = mesh.nBoundaryFaces();
 
     faceList bFaces(nBFaces);
 
@@ -976,7 +976,7 @@ Foam::labelList Foam::boundaryMesh::getNearest
     // Search nearest triangle centre for every polyMesh boundary face
     //
 
-    labelList nearestBFacei(pMesh.nFaces() - pMesh.nInternalFaces());
+    labelList nearestBFacei(pMesh.nBoundaryFaces());
 
     treeBoundBox tightest;
 
@@ -1168,7 +1168,7 @@ void Foam::boundaryMesh::patchify
     label meshFacei = newMesh.nInternalFaces();
 
     // First patch gets all non-coupled faces
-    label facesToBeDone = newMesh.nFaces() - newMesh.nInternalFaces();
+    label facesToBeDone = newMesh.nBoundaryFaces();
 
     forAll(patches_, bPatchi)
     {
@@ -1262,9 +1262,7 @@ void Foam::boundaryMesh::patchify
         List<DynamicList<label>> patchFaces(nNewPatches);
 
         // Give reasonable estimate for size of patches
-        label nAvgFaces =
-            (newMesh.nFaces() - newMesh.nInternalFaces())
-          / nNewPatches;
+        label nAvgFaces = newMesh.nBoundaryFaces() / nNewPatches;
 
         forAll(patchFaces, newPatchi)
         {
diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
index d6c18d1cb89acc33f307a118e92b005cec03c688..02ef7638ea842282d2f984f4f23de8088d287667 100644
--- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
+++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C
@@ -500,7 +500,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches
 
     // New patchID per boundary faces to be repatched. Is -1 (no change)
     // or new patchID
-    labelList newPatchID(mesh_.nFaces() - mesh_.nInternalFaces(), -1);
+    labelList newPatchID(mesh_.nBoundaryFaces(), -1);
 
     label nProcPatches = 0;
 
@@ -791,7 +791,7 @@ void Foam::fvMeshDistribute::getCouplingData
     // Construct the coupling information for all (boundary) faces and
     // points
 
-    label nBnd = mesh_.nFaces() - mesh_.nInternalFaces();
+    const label nBnd = mesh_.nBoundaryFaces();
     sourceFace.setSize(nBnd);
     sourceProc.setSize(nBnd);
     sourcePatch.setSize(nBnd);
@@ -998,10 +998,10 @@ void Foam::fvMeshDistribute::subsetCouplingData
     labelList& subPointMaster
 )
 {
-    subFace.setSize(mesh.nFaces() - mesh.nInternalFaces());
-    subProc.setSize(mesh.nFaces() - mesh.nInternalFaces());
-    subPatch.setSize(mesh.nFaces() - mesh.nInternalFaces());
-    subNewNbrProc.setSize(mesh.nFaces() - mesh.nInternalFaces());
+    subFace.setSize(mesh.nBoundaryFaces());
+    subProc.setSize(mesh.nBoundaryFaces());
+    subPatch.setSize(mesh.nBoundaryFaces());
+    subNewNbrProc.setSize(mesh.nBoundaryFaces());
 
     forAll(subFace, newBFacei)
     {
@@ -1132,7 +1132,7 @@ Foam::labelList Foam::fvMeshDistribute::mapBoundaryData
     const labelList& boundaryData1  // on added mesh
 )
 {
-    labelList newBoundaryData(mesh.nFaces() - mesh.nInternalFaces());
+    labelList newBoundaryData(mesh.nBoundaryFaces());
 
     forAll(boundaryData0, oldBFacei)
     {
@@ -1932,7 +1932,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
             SubList<label>
             (
                 repatchMap().reverseFaceMap(),
-                mesh_.nFaces() - mesh_.nInternalFaces(),
+                mesh_.nBoundaryFaces(),
                 mesh_.nInternalFaces()
             )
           - mesh_.nInternalFaces()
@@ -2685,7 +2685,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
             {
                 // Find out if any faces of domain mesh were flipped (boundary
                 // faces becoming internal)
-                label nBnd = domainMesh.nFaces()-domainMesh.nInternalFaces();
+                const label nBnd = domainMesh.nBoundaryFaces();
                 flippedAddedFaces.resize(nBnd/4);
 
                 for
diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
index edb8209d6f5f4e9a43a1cb7fa98b0f342d040d43..97b23b8bf79c0ee44545e1c512334d580b0975d1 100644
--- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
+++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C
@@ -139,7 +139,7 @@ void Foam::cellCuts::syncProc()
     syncTools::syncEdgeList(mesh(), edgeWeight_, maxEqOp<scalar>(), -GREAT);
 
     {
-        const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+        const label nBnd = mesh().nBoundaryFaces();
 
         // Convert faceSplitCut into face-local data: vertex and edge w.r.t.
         // vertex 0: (since this is same on both sides)
diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
index 2a0b294eba0bb5b39ae38621e5341f04ffc84382..46500f13999b126dd6d5479239c04bce1d9df9e0 100644
--- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
+++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C
@@ -385,7 +385,7 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct
     const scalar severeNonorthogonalityThreshold = ::cos(degToRad(orthWarn));
 
     // Calculate coupled cell centre
-    pointField neiCc(mesh.nFaces() - mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
@@ -745,7 +745,7 @@ bool Foam::polyMeshGeometry::checkFaceTets
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
     // Calculate coupled cell centre
-    pointField neiCc(mesh.nFaces() - mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
@@ -1187,7 +1187,7 @@ bool Foam::polyMeshGeometry::checkFaceWeights
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
     // Calculate coupled cell centre
-    pointField neiCc(mesh.nFaces()-mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
@@ -1340,7 +1340,7 @@ bool Foam::polyMeshGeometry::checkVolRatio
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
     // Calculate coupled cell vol
-    scalarField neiVols(mesh.nFaces()-mesh.nInternalFaces());
+    scalarField neiVols(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
@@ -1671,7 +1671,7 @@ bool Foam::polyMeshGeometry::checkFaceTwist
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
     // Calculate coupled cell centre
-    pointField neiCc(mesh.nFaces()-mesh.nInternalFaces());
+    pointField neiCc(mesh.nBoundaryFaces());
 
     for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
     {
diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
index be4b283afd7a4463020b530ff51759aa95e99572..a7135b9f4f94d2b3aa7eb465ae5d6f453577bd35 100644
--- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
+++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
@@ -908,7 +908,7 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces
             mesh0.faces(),
             mesh0.points(),
             mesh0.nInternalFaces(),
-            mesh0.nFaces() - mesh0.nInternalFaces()
+            mesh0.nBoundaryFaces()
         )
     );
 
@@ -919,7 +919,7 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces
             mesh1.faces(),
             mesh1.points(),
             mesh1.nInternalFaces(),
-            mesh1.nFaces() - mesh1.nInternalFaces()
+            mesh1.nBoundaryFaces()
         )
     );
 
@@ -984,11 +984,10 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
 )
 {
     // Construct octree from all mesh0 boundary faces
-    labelList bndFaces(mesh0.nFaces()-mesh0.nInternalFaces());
-    forAll(bndFaces, i)
-    {
-        bndFaces[i] = mesh0.nInternalFaces() + i;
-    }
+    labelList bndFaces
+    (
+        identity(mesh0.nBoundaryFaces(), mesh0.nInternalFaces())
+    );
 
     treeBoundBox overallBb(mesh0.points());
 
@@ -1016,8 +1015,8 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster
 
     // Search nearest face for every mesh1 boundary face.
 
-    labelHashSet mesh0Set(mesh0.nFaces() - mesh0.nInternalFaces());
-    labelHashSet mesh1Set(mesh1.nFaces() - mesh1.nInternalFaces());
+    labelHashSet mesh0Set(mesh0.nBoundaryFaces());
+    labelHashSet mesh1Set(mesh1.nBoundaryFaces());
 
     for
     (
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C
index 44c3ca0afce090a18ee6eaa42a242f34622edee4..34ad10fde8e215160c94a61548e906b609599215 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C
@@ -384,7 +384,7 @@ Foam::labelListList Foam::combineFaces::getMergeSets
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
     // Pick up all cells on boundary
-    labelHashSet boundaryCells(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelHashSet boundaryCells(mesh_.nBoundaryFaces());
 
     forAll(patches, patchi)
     {
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
index 0608d45f7b3239a5a3aa826ffff5922ff0f869bd..dae24bc06772513f8096b39c30d7c0ffe2ac8970 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
@@ -462,7 +462,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const
     const labelList& cellOwner = mesh_.faceOwner();
     const labelList& cellNeighbour = mesh_.faceNeighbour();
 
-    const label nBoundaryFaces = mesh_.nFaces() - mesh_.nInternalFaces();
+    const label nBoundaryFaces = mesh_.nBoundaryFaces();
 
     // Calculate face size from cell volumes for internal faces
     for (label intFacei = 0; intFacei < mesh_.nInternalFaces(); ++intFacei)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
index 8d1b96c318499668457b4aa963d92125ced6d1a9..fa3797e2f7d4c6f8f4dca2afd18abb16b754f8ff 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C
@@ -1608,7 +1608,7 @@ Foam::label Foam::hexRef8::faceConsistentRefinement
 
     // Coupled faces. Swap owner level to get neighbouring cell level.
     // (only boundary faces of neiLevel used)
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
 
     forAll(neiLevel, i)
     {
@@ -1685,7 +1685,7 @@ void Foam::hexRef8::checkWantedRefinementLevels
 
     // Coupled faces. Swap owner level to get neighbouring cell level.
     // (only boundary faces of neiLevel used)
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
 
     forAll(neiLevel, i)
     {
@@ -2696,9 +2696,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
         // Coupled faces. Swap owner level to get neighbouring cell level.
         // (only boundary faces of neiLevel used)
 
-        labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-        labelList neiCount(mesh_.nFaces()-mesh_.nInternalFaces());
-        labelList neiRefCount(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList neiLevel(mesh_.nBoundaryFaces());
+        labelList neiCount(mesh_.nBoundaryFaces());
+        labelList neiRefCount(mesh_.nBoundaryFaces());
 
         forAll(neiLevel, i)
         {
@@ -3471,7 +3471,7 @@ Foam::labelListList Foam::hexRef8::setRefinement
     //  refinining and subsetting)
 
     {
-        labelList newNeiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList newNeiLevel(mesh_.nBoundaryFaces());
 
         forAll(newNeiLevel, i)
         {
@@ -3528,7 +3528,7 @@ Foam::labelListList Foam::hexRef8::setRefinement
         // above
         pointField bFaceMids
         (
-            mesh_.nFaces()-mesh_.nInternalFaces(),
+            mesh_.nBoundaryFaces(),
             point(-GREAT, -GREAT, -GREAT)
         );
 
@@ -4562,7 +4562,7 @@ void Foam::hexRef8::checkMesh() const
     // otherwise mesh redistribution might cause multiple faces between two
     // cells
     {
-        labelList nei(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList nei(mesh_.nBoundaryFaces());
         forAll(nei, i)
         {
             nei[i] = mesh_.faceOwner()[i+mesh_.nInternalFaces()];
@@ -4616,7 +4616,7 @@ void Foam::hexRef8::checkMesh() const
     // ~~~~~~~~~~~~~~~~~
 
     {
-        scalarField neiFaceAreas(mesh_.nFaces()-mesh_.nInternalFaces());
+        scalarField neiFaceAreas(mesh_.nBoundaryFaces());
         forAll(neiFaceAreas, i)
         {
             neiFaceAreas[i] = mag(mesh_.faceAreas()[i+mesh_.nInternalFaces()]);
@@ -4658,7 +4658,7 @@ void Foam::hexRef8::checkMesh() const
     // Check number of points on faces.
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-        labelList nVerts(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList nVerts(mesh_.nBoundaryFaces());
 
         forAll(nVerts, i)
         {
@@ -4700,7 +4700,7 @@ void Foam::hexRef8::checkMesh() const
     // ~~~~~~~~~~~~~~~~~~~~
     {
         // Anchor points.
-        pointField anchorPoints(mesh_.nFaces()-mesh_.nInternalFaces());
+        pointField anchorPoints(mesh_.nBoundaryFaces());
 
         forAll(anchorPoints, i)
         {
@@ -4808,7 +4808,7 @@ void Foam::hexRef8::checkRefinementLevels
         }
 
         // Coupled faces. Get neighbouring value
-        labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList neiLevel(mesh_.nBoundaryFaces());
 
         forAll(neiLevel, i)
         {
@@ -5379,7 +5379,7 @@ Foam::labelList Foam::hexRef8::consistentUnrefinement
 
 
         // Coupled faces. Swap owner level to get neighbouring cell level.
-        labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList neiLevel(mesh_.nBoundaryFaces());
 
         forAll(neiLevel, i)
         {
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C
index 38269d63a660d38142a0db096298404359b5eda5..2e6244fe371e161ae1383ed884f6e44b4fb784c9 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C
@@ -133,7 +133,7 @@ Foam::labelList Foam::removeCells::getExposedFaces
         SubList<label> bndValues
         (
             nCellsUsingFace,
-            mesh_.nFaces()-mesh_.nInternalFaces(),
+            mesh_.nBoundaryFaces(),
             mesh_.nInternalFaces()
         );
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
index 4cd0f0e0ae754f162da251008cfe5d483218a704..30c1382e82fd83f85f0846813bd0857c027c25f3 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C
@@ -638,7 +638,7 @@ void Foam::removePoints::getUnrefimentSet
         // restoring. Note that this is over all saved faces, not just over
         // the ones in undoFaces.
 
-        boolListList faceVertexRestore(mesh_.nFaces()-mesh_.nInternalFaces());
+        boolListList faceVertexRestore(mesh_.nBoundaryFaces());
 
         // Populate with my local points-to-restore.
         forAll(savedFaces_, saveI)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C
index dea8299a49faca7e2e7c502b4af675f7f22258ad..dde8008349d9d988b133232cee4c2be7408c089f 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C
@@ -222,7 +222,7 @@ void Foam::tetDecomposer::setRefinement
             }
         }
 
-        boolList neiDecomposeCell(mesh_.nFaces()-mesh_.nInternalFaces());
+        boolList neiDecomposeCell(mesh_.nBoundaryFaces());
         forAll(neiDecomposeCell, bFacei)
         {
             label facei = mesh_.nInternalFaces()+bFacei;
diff --git a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C
index de29f2e4a092ef0505f804b49f9397432cc7124f..0b772daad9bfcd23862fb3c9160bc1e05c6ba146 100644
--- a/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C
+++ b/src/finiteArea/faMesh/faMeshMapper/faAreaMapper.C
@@ -63,18 +63,10 @@ void Foam::faAreaMapper::calcAddressing() const
 
     // Prepare a list of new face labels and (preliminary) addressing
     // Note: dimensioned to number of boundary faces of polyMesh
-    newFaceLabelsPtr_ = new labelList
-    (
-        mesh_().nFaces() - mesh_().nInternalFaces(),
-        -1
-    );
+    newFaceLabelsPtr_ = new labelList(mesh_().nBoundaryFaces(), -1);
     labelList& newFaceLabels = *newFaceLabelsPtr_;
 
-    newFaceLabelsMapPtr_ = new labelList
-    (
-        mesh_().nFaces() - mesh_().nInternalFaces(),
-        -1
-    );
+    newFaceLabelsMapPtr_ = new labelList(mesh_().nBoundaryFaces(), -1);
     labelList& newFaceLabelsMap = *newFaceLabelsMapPtr_;
     label nNewFaces = 0;
 
diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C
index deb3b89bd186853afad33b63f0152e1304360617..f722a5578e1c2c21c2a27a0822ef1b3701cca2a5 100644
--- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C
+++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C
@@ -92,7 +92,7 @@ Foam::isoAdvection::isoAdvection
     isoCutFace_(mesh_, ap_),
     cellIsBounded_(mesh_.nCells(), false),
     checkBounding_(mesh_.nCells(), false),
-    bsFaces_(label(0.2*(mesh_.nFaces() - mesh_.nInternalFaces()))),
+    bsFaces_(label(0.2*mesh_.nBoundaryFaces())),
     bsx0_(bsFaces_.size()),
     bsn0_(bsFaces_.size()),
     bsUn0_(bsFaces_.size()),
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
index f7ed9ce24bdc8bf808054d225a4b93f937ca4411..853842ee9c1f1af4c0d5574cace5e74aa54e9a94 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C
@@ -36,7 +36,7 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData
 ) const
 {
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
     const labelList& own = mesh().faceOwner();
 
     neiGlobal.setSize(nBnd);
@@ -86,7 +86,7 @@ void Foam::CFCCellToCellStencil::calcCellStencil
     labelListList& globalCellCells
 ) const
 {
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
     const labelList& own = mesh().faceOwner();
     const labelList& nei = mesh().faceNeighbour();
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
index d4b051c8454cbfc3afaae0d48646886c78d2b738..e79969b6f0c48c96ca941b6c1ad00af6116b2ca4 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C
@@ -169,7 +169,7 @@ void Foam::cellToCellStencil::validBoundaryFaces(boolList& isValidBFace) const
 {
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
 
-    isValidBFace.setSize(mesh().nFaces()-mesh().nInternalFaces(), true);
+    isValidBFace.setSize(mesh().nBoundaryFaces(), true);
 
     for (const polyPatch& pp : patches)
     {
@@ -328,7 +328,7 @@ Foam::labelList Foam::cellToCellStencil::calcFaceCells
 Foam::cellToCellStencil::cellToCellStencil(const polyMesh& mesh)
 :
     mesh_(mesh),
-    globalNumbering_(mesh_.nCells()+mesh_.nFaces()-mesh_.nInternalFaces())
+    globalNumbering_(mesh_.nCells()+mesh_.nBoundaryFaces())
 {}
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
index edd4da2e1e03e7a576e3229f495430dc431d02fc..eb724d3fe36fadff16f9b9231cf35bcc4bc48562 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C
@@ -205,7 +205,7 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils
 )
 {
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
-    const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
+    const label nBnd = mesh_.nBoundaryFaces();
     const labelList& own = mesh_.faceOwner();
     const labelList& nei = mesh_.faceNeighbour();
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
index 801248524436257c976851de8c315c0ff52539e7..ea303e304711ad3aed667de49b4c27e49dd81186 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C
@@ -65,7 +65,7 @@ void Foam::FECCellToFaceStencil::calcFaceStencil
 ) const
 {
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
     const labelList& own = mesh().faceOwner();
     const labelList& nei = mesh().faceNeighbour();
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
index 7106ebfae5ab0e8e5507ebdf3e5e19098bcbf291..270047bfaa3a0f0130708e0b3c316d2dcfd0fa66 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C
@@ -164,7 +164,7 @@ void Foam::cellToFaceStencil::validBoundaryFaces(boolList& isValidBFace) const
 {
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
 
-    isValidBFace.setSize(mesh().nFaces()-mesh().nInternalFaces(), true);
+    isValidBFace.setSize(mesh().nBoundaryFaces(), true);
 
     forAll(patches, patchi)
     {
@@ -333,7 +333,7 @@ void Foam::cellToFaceStencil::calcFaceStencil
     // Calculates per face a list of global cell/face indices.
 
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
-    const label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
+    const label nBnd = mesh_.nBoundaryFaces();
     const labelList& own = mesh_.faceOwner();
     const labelList& nei = mesh_.faceNeighbour();
 
@@ -482,7 +482,7 @@ void Foam::cellToFaceStencil::calcFaceStencil
 Foam::cellToFaceStencil::cellToFaceStencil(const polyMesh& mesh)
 :
     mesh_(mesh),
-    globalNumbering_(mesh_.nCells()+mesh_.nFaces()-mesh_.nInternalFaces())
+    globalNumbering_(mesh_.nCells()+mesh_.nBoundaryFaces())
 {}
 
 
diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
index 78b2b90247e639199da5350757970f0a428494cf..efdaaaac149e12a89291d179e583850d7df4950a 100644
--- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
+++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C
@@ -36,7 +36,7 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData
 ) const
 {
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
     const labelList& own = mesh().faceOwner();
 
     neiGlobal.setSize(nBnd);
@@ -93,7 +93,7 @@ void Foam::CFCFaceToCellStencil::calcCellStencil
     labelListList& globalCellFaces
 ) const
 {
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
     const labelList& own = mesh().faceOwner();
     const labelList& nei = mesh().faceNeighbour();
 
@@ -107,7 +107,7 @@ void Foam::CFCFaceToCellStencil::calcCellStencil
 
 
     // Non-empty boundary faces
-    boolList validBFace(mesh().nFaces()-mesh().nInternalFaces(), true);
+    boolList validBFace(mesh().nBoundaryFaces(), true);
 
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
     forAll(patches, patchi)
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
index 1fadf245ef2dba29089cb407d5a9d00c5663a757..d8d5b72fa5641532b4914cb528365972063f30e3 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C
@@ -68,7 +68,7 @@ void Foam::singleCellFvMesh::agglomerateMesh
     // Check agglomeration is sync
     {
         // Get neighbouring agglomeration
-        labelList nbrAgglom(mesh.nFaces()-mesh.nInternalFaces());
+        labelList nbrAgglom(mesh.nBoundaryFaces());
         forAll(oldPatches, patchi)
         {
             const polyPatch& pp = oldPatches[patchi];
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
index a278005fda83f3516667260cf507f2e85036eb35..3a2c6e12a62a5ff2b031cffea3f72562e1dcd686 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C
@@ -231,7 +231,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField
 
     tmp<Field<Type>> tboundaryVals
     (
-        new Field<Type>(mesh.nFaces()-mesh.nInternalFaces())
+        new Field<Type>(mesh.nBoundaryFaces())
     );
     Field<Type>& boundaryVals = tboundaryVals.ref();
 
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
index 7b0ea37758eee67a9562e6e4e908d0fe01a2c1bb..a36399f07577fe4ed94654b2b813e18ab82c4d42 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C
@@ -57,7 +57,7 @@ void Foam::volPointInterpolation::calcBoundaryAddressing()
             SubList<face>
             (
                 mesh().faces(),
-                mesh().nFaces()-mesh().nInternalFaces(),
+                mesh().nBoundaryFaces(),
                 mesh().nInternalFaces()
             ),
             mesh().points()
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
index da0ea0bee73d3decf77ae499a7d44a99c3f02933..a54f1e4fa20ba1e167f3c545a56e4bdfa9333926 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C
@@ -130,7 +130,7 @@ void Foam::meshRefinement::calcNeighbourData
     const labelList& cellLevel = meshCutter_.cellLevel();
     const pointField& cellCentres = mesh_.cellCentres();
 
-    label nBoundaryFaces = mesh_.nFaces() - mesh_.nInternalFaces();
+    const label nBoundaryFaces = mesh_.nBoundaryFaces();
 
     if (neiLevel.size() != nBoundaryFaces || neiCc.size() != nBoundaryFaces)
     {
@@ -297,8 +297,8 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces)
 
 
     // Get boundary face centre and level. Coupled aware.
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
     // Collect segments we want to test for
@@ -458,7 +458,7 @@ void Foam::meshRefinement::checkData()
     meshCutter_.checkRefinementLevels(1, labelList(0));
 
 
-    label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
+    const label nBnd = mesh_.nBoundaryFaces();
 
     Pout<< "meshRefinement::checkData() : Checking synchronization."
         << endl;
@@ -597,7 +597,7 @@ void Foam::meshRefinement::checkData()
         labelList::subList boundarySurface
         (
             surfaceIndex_,
-            mesh_.nFaces()-mesh_.nInternalFaces(),
+            mesh_.nBoundaryFaces(),
             mesh_.nInternalFaces()
         );
 
@@ -628,11 +628,7 @@ void Foam::meshRefinement::checkData()
         localPointRegion::findDuplicateFaces
         (
             mesh_,
-            identity
-            (
-                mesh_.nFaces() - mesh_.nInternalFaces(),
-                mesh_.nInternalFaces()
-            )
+            identity(mesh_.nBoundaryFaces(), mesh_.nInternalFaces())
         )
     );
 
@@ -998,12 +994,7 @@ Foam::label Foam::meshRefinement::splitFacesUndo
         // Check mesh for errors
         // ~~~~~~~~~~~~~~~~~~~~~
 
-        faceSet errorFaces
-        (
-            mesh_,
-            "errorFaces",
-            mesh_.nFaces()-mesh_.nInternalFaces()
-        );
+        faceSet errorFaces(mesh_, "errorFaces", mesh_.nBoundaryFaces());
         bool hasErrors = motionSmoother::checkMesh
         (
             false,  // report
@@ -1405,7 +1396,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance
 
             if (keepBaffles)
             {
-                label nBnd = mesh_.nFaces()-mesh_.nInternalFaces();
+                const label nBnd = mesh_.nBoundaryFaces();
 
                 labelList coupledFace(mesh_.nFaces(), -1);
                 {
@@ -1752,7 +1743,7 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh)
 
     // Check that coupled faces are present on both sides.
 
-    labelList faceToZone(mesh.nFaces()-mesh.nInternalFaces(), -1);
+    labelList faceToZone(mesh.nBoundaryFaces(), -1);
 
     forAll(fZones, zonei)
     {
@@ -2891,8 +2882,8 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const
         // ~~~~~~~~~~~~~~~~~~~~~~
 
         // Get boundary face centre and level. Coupled aware.
-        labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-        pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+        labelList neiLevel(mesh_.nBoundaryFaces());
+        pointField neiCc(mesh_.nBoundaryFaces());
         calcNeighbourData(neiLevel, neiCc);
 
         labelList intersectionFaces(intersectedFaces());
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
index 5ca36811c73a440b3494d41dec8d623a2c102a39..2fe2cbdd7a758126ffd063139a156c2feac00683 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C
@@ -2413,8 +2413,8 @@ void Foam::meshRefinement::zonify
     const PtrList<surfaceZonesInfo>& surfZones = surfaces_.surfZones();
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
 
@@ -3268,7 +3268,7 @@ void Foam::meshRefinement::consistentOrientation
     {
         labelList neiStatus
         (
-            mesh_.nFaces()-mesh_.nInternalFaces(),
+            mesh_.nBoundaryFaces(),
             orientedSurface::UNVISITED
         );
 
@@ -3575,8 +3575,8 @@ void Foam::meshRefinement::baffleAndSplitMesh
         << " faces that are intersected by the surface." << nl << endl;
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
     labelList ownPatch, neiPatch;
@@ -3646,8 +3646,8 @@ void Foam::meshRefinement::baffleAndSplitMesh
         // so re-do the surface intersections
         {
             // Swap neighbouring cell centres and cell level
-            neiLevel.setSize(mesh_.nFaces()-mesh_.nInternalFaces());
-            neiCc.setSize(mesh_.nFaces()-mesh_.nInternalFaces());
+            neiLevel.setSize(mesh_.nBoundaryFaces());
+            neiCc.setSize(mesh_.nBoundaryFaces());
             calcNeighbourData(neiLevel, neiCc);
 
             labelList ownPatch, neiPatch;
@@ -3834,8 +3834,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
     // Find intersections with all unnamed(!) surfaces
@@ -4133,8 +4133,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::removeLimitShells
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
     // Find intersections with all unnamed(!) surfaces
@@ -4459,8 +4459,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
 
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
 
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
index cda200b52b362bff990212ab54c4f6df00503fa4..5e76cd63cc513393a5c7799c33218efa7e4b302d 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C
@@ -90,7 +90,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
 
         // Collect cells to test for inside/outside in shell
         labelList cellToCompact(mesh_.nCells(), -1);
-        labelList bFaceToCompact(mesh_.nFaces()-mesh_.nInternalFaces(), -1);
+        labelList bFaceToCompact(mesh_.nBoundaryFaces(), -1);
         List<FixedList<label, 3>> shellGapInfo;
         List<volumeType> shellGapMode;
         {
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C
index 739bff247f598144c4cb4ccf3b14db24e1788e38..a7cc9e377e14d350d418a6ddb9ff2f283b8bb271 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C
@@ -49,7 +49,7 @@ Foam::label Foam::meshRefinement::mergePatchFaces
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
     // Pick up all candidate cells on boundary
-    labelHashSet boundaryCells(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelHashSet boundaryCells(mesh_.nBoundaryFaces());
 
     for (const label patchi : patchIDs)
     {
@@ -254,16 +254,14 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
     combineFaces faceCombiner(mesh_, true);
 
     // Pick up all candidate cells on boundary
-    labelHashSet boundaryCells(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelHashSet boundaryCells(mesh_.nBoundaryFaces());
 
     {
         const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
-        forAll(patchIDs, i)
+        for (const label patchi : patchIDs)
         {
-            label patchI = patchIDs[i];
-
-            const polyPatch& patch = patches[patchI];
+            const polyPatch& patch = patches[patchi];
 
             if (!patch.coupled())
             {
@@ -410,12 +408,7 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo
             // Check mesh for errors
             // ~~~~~~~~~~~~~~~~~~~~~
 
-            faceSet errorFaces
-            (
-                mesh_,
-                "errorFaces",
-                mesh_.nFaces()-mesh_.nInternalFaces()
-            );
+            faceSet errorFaces(mesh_, "errorFaces", mesh_.nBoundaryFaces());
             bool hasErrors = motionSmoother::checkMesh
             (
                 false,  // report
@@ -899,12 +892,7 @@ Foam::label Foam::meshRefinement::mergeEdgesUndo
             // Check mesh for errors
             // ~~~~~~~~~~~~~~~~~~~~~
 
-            faceSet errorFaces
-            (
-                mesh_,
-                "errorFaces",
-                mesh_.nFaces()-mesh_.nInternalFaces()
-            );
+            faceSet errorFaces(mesh_, "errorFaces", mesh_.nBoundaryFaces());
             bool hasErrors = motionSmoother::checkMesh
             (
                 false,  // report
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
index 8b147255b8259c6e247f9e33e98eabf3a4a8456f..1bd63cc13c252082d09c5121c79eb3a961735b49 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C
@@ -520,8 +520,8 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells
     labelList facePatch(mesh_.nFaces(), -1);
 
     // Swap neighbouring cell centres and cell level
-    labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiLevel(mesh_.nBoundaryFaces());
+    pointField neiCc(mesh_.nBoundaryFaces());
     calcNeighbourData(neiLevel, neiCc);
 
 
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
index 7643ab1822c93e07b363927b6698c29fb400339f..182be2ee222b918052f9393468340738dfec28c1 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C
@@ -176,7 +176,7 @@ Foam::labelList Foam::meshRefinement::getChangedFaces
 
         // 2. Boundary faces
 
-        boolList refinedBoundaryFace(mesh.nFaces()-nInternalFaces, false);
+        boolList refinedBoundaryFace(mesh.nBoundaryFaces(), false);
 
         forAll(mesh.boundaryMesh(), patchI)
         {
@@ -1871,9 +1871,9 @@ Foam::label Foam::meshRefinement::markProximityRefinement
     // 2. Find out a measure of surface curvature and region edges.
     // Send over surface region and surface normal to neighbour cell.
 
-    labelList neiBndMaxLevel(mesh_.nFaces()-mesh_.nInternalFaces());
-    pointField neiBndMaxLocation(mesh_.nFaces()-mesh_.nInternalFaces());
-    vectorField neiBndMaxNormal(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList neiBndMaxLevel(mesh_.nBoundaryFaces());
+    pointField neiBndMaxLocation(mesh_.nBoundaryFaces());
+    vectorField neiBndMaxNormal(mesh_.nBoundaryFaces());
 
     for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++)
     {
diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
index f28db75b4a5b4081f96a16855dbccf4c306f8f0e..9cba909231d50105be04a6ddd9d62000a06cc16b 100644
--- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
+++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C
@@ -106,7 +106,7 @@ void Foam::meshRefinement::testSyncBoundaryFaceList
     const UList<T>& syncedFaceData
 ) const
 {
-    label nBFaces = mesh_.nFaces() - mesh_.nInternalFaces();
+    const label nBFaces = mesh_.nBoundaryFaces();
 
     if (faceData.size() != nBFaces || syncedFaceData.size() != nBFaces)
     {
diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
index 53b66abd604d094a582071aca91f601839af8f91..87bb6389d4cf01ed41999182bae4986c80d1f0ed 100644
--- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
+++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C
@@ -165,12 +165,10 @@ void Foam::snappyLayerDriver::checkMeshManifold() const
     Info<< nl << "Checking mesh manifoldness ..." << endl;
 
     // Get all outside faces
-    labelList outsideFaces(mesh.nFaces() - mesh.nInternalFaces());
-
-    for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
-    {
-         outsideFaces[facei - mesh.nInternalFaces()] = facei;
-    }
+    labelList outsideFaces
+    (
+        identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
+    );
 
     pointSet nonManifoldPoints
     (
diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H
index 9a42db9dfa31bd852116344cb2b3852d6156310a..0fbdbd5e638583af8da94a6e83c40117edcf9bbe 100644
--- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H
+++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBaseI.H
@@ -111,7 +111,7 @@ inline Foam::label Foam::mappedPatchBase::sampleSize() const
         case NEARESTFACE:
         {
             const polyMesh& mesh = sampleMesh();
-            return mesh.nFaces() - mesh.nInternalFaces();
+            return mesh.nBoundaryFaces();
         }
         default:
         {
diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C
index 9a9c7a2fd101b18a716dc1e91c91250e5f5bf91d..a14b3e841ab70ba71df5101269f92ae7bf30ea3b 100644
--- a/src/meshTools/meshSearch/meshSearch.C
+++ b/src/meshTools/meshSearch/meshSearch.C
@@ -566,12 +566,11 @@ Foam::meshSearch::boundaryTree() const
             overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
         }
 
-        // all boundary faces (not just walls)
-        labelList bndFaces(mesh_.nFaces()-mesh_.nInternalFaces());
-        forAll(bndFaces, i)
-        {
-            bndFaces[i] = mesh_.nInternalFaces() + i;
-        }
+        // All boundary faces (not just walls)
+        labelList bndFaces
+        (
+            identity(mesh_.nBoundaryFaces(), mesh_.nInternalFaces())
+        );
 
         boundaryTreePtr_.reset
         (
diff --git a/src/meshTools/regionSplit/localPointRegion.C b/src/meshTools/regionSplit/localPointRegion.C
index 7672813d0c51b6816377fba633a9f316cfad27d0..5f1e0da9b2c26170bb5a5e9951f0e2c7be8eb5f8 100644
--- a/src/meshTools/regionSplit/localPointRegion.C
+++ b/src/meshTools/regionSplit/localPointRegion.C
@@ -251,7 +251,7 @@ void Foam::localPointRegion::calcPointRegions
     boolList& candidatePoint
 )
 {
-    label nBnd = mesh.nFaces()-mesh.nInternalFaces();
+    const label nBnd = mesh.nBoundaryFaces();
     const labelList& faceOwner = mesh.faceOwner();
     const labelList& faceNeighbour = mesh.faceNeighbour();
 
@@ -419,7 +419,7 @@ void Foam::localPointRegion::calcPointRegions
         SubList<face> l
         (
             minRegion,
-            mesh.nFaces()-mesh.nInternalFaces(),
+            mesh.nBoundaryFaces(),
             mesh.nInternalFaces()
         );
         syncTools::syncBoundaryFaceList
@@ -628,7 +628,7 @@ Foam::List<Foam::labelPair> Foam::localPointRegion::findDuplicateFacePairs
     // Faces to test: all boundary faces
     labelList testFaces
     (
-        identity(mesh.nFaces()-mesh.nInternalFaces(), mesh.nInternalFaces())
+        identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
     );
 
     // Find corresponding baffle face (or -1)
diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C
index b89a64001bca599e00cc4d49d30181a9d96ffa92..47056b2092ae97f8808c7ecc98e80640de6f6414 100644
--- a/src/meshTools/regionSplit/regionSplit.C
+++ b/src/meshTools/regionSplit/regionSplit.C
@@ -530,7 +530,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::reduceRegions
     const polyBoundaryMesh& patches = mesh().boundaryMesh();
 
     // Buffer for swapping boundary information
-    labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces());
+    labelList nbrRegion(mesh().nBoundaryFaces());
 
     do
     {
diff --git a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C
index 7aca426d575883630bfcc10cac322d819fe7f8a9..e4c55b966b785aa6dd84eb01f7d725daa2eda8ce 100644
--- a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C
+++ b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C
@@ -52,7 +52,7 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const
     const cellList& cells = mesh().cells();
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
-    boolList isCoupled(mesh_.nFaces()-mesh_.nInternalFaces(), false);
+    boolList isCoupled(mesh_.nBoundaryFaces(), false);
 
     for (const polyPatch& pp : patches)
     {
diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C
index e0716e858a2cbf8b5170b1e815c87e7dbef08d52..674beddc35d5cccbb431615e06fcb3be1e2d8a3a 100644
--- a/src/meshTools/sets/topoSets/faceZoneSet.C
+++ b/src/meshTools/sets/topoSets/faceZoneSet.C
@@ -351,7 +351,7 @@ void Foam::faceZoneSet::sync(const polyMesh& mesh)
     //-1 : in faceZone and flipped
     const label UNFLIPPED = 1;
     const label FLIPPED = -1;
-    labelList myZoneFace(mesh.nFaces()-mesh.nInternalFaces(), 0);
+    labelList myZoneFace(mesh.nBoundaryFaces(), Zero);
 
     forAll(addressing_, i)
     {
diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
index 46c36f7deb3e144fad3d4dc00db94d3aed062b60..2ac294e46abfbc124ae512e4c3238decb78a11c3 100644
--- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
+++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
@@ -2283,10 +2283,7 @@ Foam::triSurface Foam::triSurfaceTools::triangulate
     const polyMesh& mesh = bMesh.mesh();
 
     // Storage for surfaceMesh. Size estimate.
-    DynamicList<labelledTri> triangles
-    (
-        mesh.nFaces() - mesh.nInternalFaces()
-    );
+    DynamicList<labelledTri> triangles(mesh.nBoundaryFaces());
 
     label newPatchi = 0;
 
@@ -2364,10 +2361,7 @@ Foam::triSurface Foam::triSurfaceTools::triangulate
     const polyMesh& mesh = bMesh.mesh();
 
     // Storage for surfaceMesh. Size estimate.
-    DynamicList<labelledTri> triangles
-    (
-        mesh.nFaces() - mesh.nInternalFaces()
-    );
+    DynamicList<labelledTri> triangles(mesh.nBoundaryFaces());
 
     label newPatchi = 0;
 
@@ -2472,10 +2466,7 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre
 
 
     // Count number of faces.
-    DynamicList<labelledTri> triangles
-    (
-        mesh.nFaces() - mesh.nInternalFaces()
-    );
+    DynamicList<labelledTri> triangles(mesh.nBoundaryFaces());
 
     label newPatchi = 0;
 
diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveFaceZones/preserveFaceZonesConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveFaceZones/preserveFaceZonesConstraint.C
index e481aef60440d08598778c844081de9a104a6b0d..79c2400658bf63b6ef2f47e642ccaad39a22f048 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveFaceZones/preserveFaceZonesConstraint.C
+++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preserveFaceZones/preserveFaceZonesConstraint.C
@@ -146,7 +146,7 @@ void Foam::decompositionConstraints::preserveFaceZonesConstraint::apply
 
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
-    labelList destProc(mesh.nFaces()-mesh.nInternalFaces(), labelMax);
+    labelList destProc(mesh.nBoundaryFaces(), labelMax);
 
     for (const polyPatch& pp : pbm)
     {
diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preservePatches/preservePatchesConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preservePatches/preservePatchesConstraint.C
index 8333cbfd7dbd527c7debe60da09560698898ba8b..3513094848809bc8312081256a63a9965fab224a 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/preservePatches/preservePatchesConstraint.C
+++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/preservePatches/preservePatchesConstraint.C
@@ -146,7 +146,7 @@ void Foam::decompositionConstraints::preservePatchesConstraint::apply
 
     const polyBoundaryMesh& pbm = mesh.boundaryMesh();
 
-    labelList destProc(mesh.nFaces()-mesh.nInternalFaces(), labelMax);
+    labelList destProc(mesh.nBoundaryFaces(), labelMax);
 
     for (const polyPatch& pp : pbm)
     {
diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
index deaa397e03427d1c746f1bedd33990c463384e60..73bb15f9a180f7a18ddc604d2bd7230b30f38520 100644
--- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
+++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C
@@ -535,7 +535,7 @@ void Foam::decompositionMethod::calcCellCells
     // Get agglomerate owner on other side of coupled faces
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces());
+    labelList globalNeighbour(mesh.nBoundaryFaces());
 
     for (const polyPatch& pp : patches)
     {
@@ -734,7 +734,7 @@ void Foam::decompositionMethod::calcCellCells
     // Get agglomerate owner on other side of coupled faces
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces());
+    labelList globalNeighbour(mesh.nBoundaryFaces());
 
     for (const polyPatch& pp : patches)
     {
diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C
index c967dd7956a4e995ae8fdef20cc79940c213273e..075d81a89bbd5849c4d7924b969cdd160e37ecbc 100644
--- a/src/renumber/SloanRenumber/SloanRenumber.C
+++ b/src/renumber/SloanRenumber/SloanRenumber.C
@@ -113,7 +113,7 @@ Foam::labelList Foam::SloanRenumber::renumber
     // Construct graph : faceOwner + connections across cyclics.
 
     // Determine neighbour cell
-    labelList nbr(mesh.nFaces()-mesh.nInternalFaces(), -1);
+    labelList nbr(mesh.nBoundaryFaces(), -1);
     forAll(pbm, patchi)
     {
         if (pbm[patchi].coupled() && !isA<processorPolyPatch>(pbm[patchi]))
diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C
index 2c6a5e8ab65fbefc82bf39f99078194ee66bbfe3..f904480f00e5dd948cd4dea4b052d0eb3ed334b6 100644
--- a/src/sampling/meshToMesh/meshToMesh.C
+++ b/src/sampling/meshToMesh/meshToMesh.C
@@ -492,7 +492,7 @@ void Foam::meshToMesh::calculate(const word& methodName, const bool normalise)
         patches[0] = new polyPatch
         (
             "defaultFaces",
-            newTgt.nFaces() - newTgt.nInternalFaces(),
+            newTgt.nBoundaryFaces(),
             newTgt.nInternalFaces(),
             0,
             newTgt.boundaryMesh(),
diff --git a/src/sampling/sampledSet/shortestPath/shortestPathSet.C b/src/sampling/sampledSet/shortestPath/shortestPathSet.C
index 2cf4276fdf416c01528a7a4919be5e3d0b05f104..ba80d903ffa6b1387674f67eeb548481905955c4 100644
--- a/src/sampling/sampledSet/shortestPath/shortestPathSet.C
+++ b/src/sampling/sampledSet/shortestPath/shortestPathSet.C
@@ -238,7 +238,7 @@ void Foam::shortestPathSet::genSamples(const polyMesh& mesh)
 
             // Situation 2: we're on a coupled patch and might need to
             //              switch processor/cell
-            boolList isFront(mesh.nFaces()-mesh.nInternalFaces(), false);
+            boolList isFront(mesh.nBoundaryFaces(), false);
 
             if (frontFaceI != -1)
             {
diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C
index 2a666f29ccbec91b3d8b8e93005664a65cb0ab61..83db3ec3252daedea3cecedb4592d30e9bcc6823 100644
--- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C
+++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C
@@ -116,7 +116,7 @@ Foam::sampledTriSurfaceMesh::nonCoupledboundaryTree() const
         // all non-coupled boundary faces (not just walls)
         const polyBoundaryMesh& patches = mesh().boundaryMesh();
 
-        labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces());
+        labelList bndFaces(patches.nFaces());
         label bndI = 0;
         for (const polyPatch& pp : patches)
         {
diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
index b4f83b373621b5448206ab761b8491d364b713c8..7988cfcb033ea65afaf0052e7f858b395ebd7606 100644
--- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
+++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C
@@ -58,7 +58,7 @@ Foam::sampledTriSurfaceMesh::sampleOnFaces
     auto& values = tvalues.ref();
 
     const polyBoundaryMesh& pbm = mesh().boundaryMesh();
-    const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+    const label nBnd = mesh().nBoundaryFaces();
 
     // Create flat boundary field
 
diff --git a/src/sampling/surface/isoSurface/isoSurface.C b/src/sampling/surface/isoSurface/isoSurface.C
index bc2a3b3c4ceb542fb3e1b2609b25bbb86459d30e..1efeaec9c182177d877541ecad88ec8c8d1aed28 100644
--- a/src/sampling/surface/isoSurface/isoSurface.C
+++ b/src/sampling/surface/isoSurface/isoSurface.C
@@ -1453,7 +1453,7 @@ Foam::isoSurface::isoSurface
 
 
     // Pre-calculate patch-per-face to avoid whichPatch call.
-    labelList boundaryRegion(mesh_.nFaces()-mesh_.nInternalFaces());
+    labelList boundaryRegion(mesh_.nBoundaryFaces());
 
     forAll(patches, patchi)
     {
diff --git a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C b/src/sampling/surface/isoSurface/isoSurfaceTemplates.C
index 542bd28f24933e256d9a5e0222740cc6d6225a1e..c03a97de507f981fd1b66d35e0cc117aae32ae11 100644
--- a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C
+++ b/src/sampling/surface/isoSurface/isoSurfaceTemplates.C
@@ -606,7 +606,7 @@ void Foam::isoSurface::generateTriPoints
 
 
     // Determine neighbouring snap status
-    boolList neiSnapped(mesh_.nFaces()-mesh_.nInternalFaces(), false);
+    boolList neiSnapped(mesh_.nBoundaryFaces(), false);
     List<Type> neiSnappedPoint(neiSnapped.size(), Type(Zero));
     for (const polyPatch& pp : patches)
     {
diff --git a/src/sampling/surface/triSurfaceMesh/discreteSurface.C b/src/sampling/surface/triSurfaceMesh/discreteSurface.C
index 79bfa6ddf03ed2965492b629fd39f5a580b7c5e9..5df8594ae74a95a8c93a58da09897b59c9d0f65a 100644
--- a/src/sampling/surface/triSurfaceMesh/discreteSurface.C
+++ b/src/sampling/surface/triSurfaceMesh/discreteSurface.C
@@ -110,7 +110,7 @@ Foam::discreteSurface::nonCoupledboundaryTree() const
         // all non-coupled boundary faces (not just walls)
         const polyBoundaryMesh& patches = mesh().boundaryMesh();
 
-        labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces());
+        labelList bndFaces(patches.nFaces());
         label bndI = 0;
         for (const polyPatch& pp : patches)
         {
diff --git a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C
index 74256346f42d0a65645a07f77f5553649d9c7d93..3fce29d212a0e1d6d24ed8da4cb5de68c38b86e6 100644
--- a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C
+++ b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C
@@ -169,7 +169,7 @@ Foam::discreteSurface::sampleOnFaces
         // Sample boundary faces
 
         const polyBoundaryMesh& pbm = mesh().boundaryMesh();
-        const label nBnd = mesh().nFaces()-mesh().nInternalFaces();
+        const label nBnd = mesh().nBoundaryFaces();
 
         // Create flat boundary field
 
diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C
index 2be602bf4691d305b4c94c1a58218f1cb41c3478..c241d13623f4ad640c410575b492de36618be029 100644
--- a/src/surfMesh/MeshedSurface/MeshedSurface.C
+++ b/src/surfMesh/MeshedSurface/MeshedSurface.C
@@ -337,7 +337,7 @@ Foam::MeshedSurface<Face>::MeshedSurface
         SubList<face>
         (
             mesh.faces(),
-            mesh.nFaces() - mesh.nInternalFaces(),
+            mesh.nBoundaryFaces(),
             mesh.nInternalFaces()
         ),
         mesh.points()
diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
index 2c76eeeedf4e17d83effe4632e3d2b4c9d96e914..4c0785eb1185498c38a1ef2b8f4af7935712dbb2 100644
--- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
+++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C
@@ -80,10 +80,7 @@ Foam::triSurface Foam::faceShading::triangulate
     const polyBoundaryMesh& bMesh = mesh_.boundaryMesh();
 
     // Storage for surfaceMesh. Size estimate.
-    DynamicList<labelledTri> triangles
-    (
-        mesh_.nFaces() - mesh_.nInternalFaces()
-    );
+    DynamicList<labelledTri> triangles(mesh_.nBoundaryFaces());
 
     label newPatchI = 0;