ENH: improved bookkeeping for finite-area to volume mesh correspondence

- whichPolyPatches() = the polyPatches related to the areaMesh.

  This helps when pre-calculating (and caching) any patch-specific
  content.

- whichPatchFaces() = the poly-patch/patch-face for each of the faceLabels.

  This allows more convenient lookups and, since the list is cached on
  the area mesh, reduces the number of calls to whichPatch() etc.

- whichFace() = the area-face corresponding to the given mesh-face

ENH: more flexible/consistent volume->area mapper functions
This commit is contained in:
Mark Olesen
2022-09-09 16:40:00 +02:00
parent e8863cd091
commit 84db37f62f
10 changed files with 832 additions and 148 deletions

View File

@ -116,12 +116,16 @@ Description
{
const faPatch& p = patches[patchi];
Info<< " " << "patch " << p.index()
<< " (size: " << returnReduce(p.size(), sumOp<label>())
<< ") name: " << p.name()
<< nl;
// Report physical size (nEdges) not virtual size
Info<< " " << "patch " << p.index()
<< " (size: " << returnReduce(p.nEdges(), sumOp<label>())
<< ") name: " << p.name()
<< nl;
}
Info<< "----------------" << nl
<< "Used polyPatches: " << flatOutput(aMesh.whichPolyPatches()) << nl;
// Geometry information
Info<< nl;

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2022 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
@ -36,12 +36,17 @@ Description
{
const faPatch& p = patches[patchi];
Info<< " " << "patch " << p.index()
<< " (size: " << returnReduce(p.size(), sumOp<label>())
<< ") name: " << p.name()
<< nl;
// Report physical size (nEdges) not virtual size
Info<< " " << "patch " << p.index()
<< " (size: " << returnReduce(p.nEdges(), sumOp<label>())
<< ") name: " << p.name()
<< nl;
}
Info<< "----------------" << nl
<< "Used polyPatches: " << flatOutput(aMesh.whichPolyPatches()) << nl;
// Geometry information
Info<< nl;
{