ENH: extend patch/boundary methods: faces(), faceOwner()

- similar to polyBoundaryMesh
This commit is contained in:
Mark Olesen
2025-04-10 16:44:43 +02:00
parent 2d77f7ae26
commit 91e7870ee8
18 changed files with 112 additions and 232 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd.
Copyright (C) 2016,2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -137,16 +137,7 @@ void simpleMarkFeatures
// multiple 'half' cells.
// Addressing for all outside faces
primitivePatch allBoundary
(
SubList<face>
(
mesh.faces(),
mesh.nBoundaryFaces(),
mesh.nInternalFaces()
),
mesh.points()
);
primitivePatch allBoundary(patches.faces(), mesh.points());
// Check for non-manifold points (surface pinched at point)
allBoundary.checkPointManifold(false, &singleCellFeaturePointSet);
@ -240,7 +231,9 @@ void simpleMarkFeatures
// ~~~~~~~~~~~~~~~~~~~~~~~~~
// Face centres that need inclusion in the dual mesh
labelHashSet featureFaceSet(mesh.nBoundaryFaces());
labelHashSet featureFaceSet;
featureFaceSet.reserve(mesh.nBoundaryFaces());
// A. boundary faces.
for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++)
{