ENH: Added utility functions to polyBoundaryMesh

This commit is contained in:
Andrew Heather
2019-10-10 20:54:37 +01:00
parent f64125c6d9
commit 36af9f615a
2 changed files with 28 additions and 0 deletions

View File

@ -612,6 +612,28 @@ Foam::wordList Foam::polyBoundaryMesh::physicalTypes() const
}
Foam::labelList Foam::polyBoundaryMesh::patchStarts() const
{
return
getMethodImpl<labelList>
(
*this,
[](const polyPatch& p) { return p.start(); }
);
}
Foam::labelList Foam::polyBoundaryMesh::patchSizes() const
{
return
getMethodImpl<labelList>
(
*this,
[](const polyPatch& p) { return p.size(); }
);
}
Foam::label Foam::polyBoundaryMesh::start() const
{
return mesh_.nInternalFaces();

View File

@ -167,6 +167,12 @@ public:
//- Return a list of physical types
wordList physicalTypes() const;
//- Return a list of patch start face indices
labelList patchStarts() const;
//- Return a list of patch sizes
labelList patchSizes() const;
//- The start label of the boundary faces in the polyMesh face list
// Same as mesh.nInternalFaces()
label start() const;