ENH: add polyBoundaryMesh::nNonProcessorFaces()
- the number boundary faces before the first processor patch. This approximately equals the 'real' number of boundary faces
This commit is contained in:
parent
795bce4519
commit
51bb06764a
1
src/OpenFOAM/compat/polyBoundaryMeshTemplates.C
Normal file
1
src/OpenFOAM/compat/polyBoundaryMeshTemplates.C
Normal file
@ -0,0 +1 @@
|
||||
#warning File removed - left for old dependency check only
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -656,6 +656,26 @@ Foam::label Foam::polyBoundaryMesh::nProcessorPatches() const
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::polyBoundaryMesh::nNonProcessorFaces() const
|
||||
{
|
||||
const polyPatchList& patches = *this;
|
||||
|
||||
label count = 0;
|
||||
|
||||
for (const polyPatch& p : patches)
|
||||
{
|
||||
if (isA<processorPolyPatch>(p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
count += p.nFaces();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
Foam::wordList Foam::polyBoundaryMesh::names() const
|
||||
{
|
||||
return PtrListOps::get<word>(*this, nameOp<polyPatch>());
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -33,7 +33,7 @@ Description
|
||||
|
||||
SourceFiles
|
||||
polyBoundaryMesh.C
|
||||
polyBoundaryMeshTemplates.C
|
||||
polyBoundaryMesh.txx
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -212,6 +212,9 @@ public:
|
||||
//- The number of processorPolyPatch patches
|
||||
label nProcessorPatches() const;
|
||||
|
||||
//- The number of boundary faces before the first processor patch.
|
||||
label nNonProcessorFaces() const;
|
||||
|
||||
//- Return a list of patch names
|
||||
wordList names() const;
|
||||
|
||||
@ -427,7 +430,7 @@ public:
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "polyBoundaryMeshTemplates.C"
|
||||
#include "polyBoundaryMesh.txx"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -422,6 +422,26 @@ Foam::label Foam::faBoundaryMesh::nProcessorPatches() const
|
||||
}
|
||||
|
||||
|
||||
Foam::label Foam::faBoundaryMesh::nNonProcessorEdges() const
|
||||
{
|
||||
const faPatchList& patches = *this;
|
||||
|
||||
label count = 0;
|
||||
|
||||
for (const faPatch& p : patches)
|
||||
{
|
||||
if (isA<processorFaPatch>(p))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
count += p.nEdges();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
const Foam::HashTable<Foam::labelList>&
|
||||
Foam::faBoundaryMesh::groupPatchIDs() const
|
||||
{
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2016-2017 Wikki Ltd
|
||||
Copyright (C) 2018-2024 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2025 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -188,6 +188,9 @@ public:
|
||||
//- The number of processorFaPatch patches
|
||||
label nProcessorPatches() const;
|
||||
|
||||
//- The number of boundary edges before the first processor patch.
|
||||
label nNonProcessorEdges() const;
|
||||
|
||||
//- Return a list of patch names
|
||||
wordList names() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user