ENH: add primitiveMesh cellBb()

- the boundBox for a given cell, using the cheapest calculation:

  - cellPoints if already available, since this will involve the
    fewest number of min/max comparisions.

  - otherwise walk the cell faces: via the cell box() method
    to avoid creating demand-driven cellPoints etc.
This commit is contained in:
Mark Olesen
2022-11-01 12:15:08 +01:00
committed by Andrew Heather
parent 27c2cdc040
commit 0ba458fdbc
12 changed files with 68 additions and 141 deletions

View File

@ -167,7 +167,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement()
{
if (volumeStatus[celli] == volumeType::UNKNOWN)
{
treeBoundBox cellBb(mesh_.cells()[celli].box(mesh_));
treeBoundBox cellBb(mesh_.cellBb(celli));
if (geometry.overlaps(cellBb))
{
@ -279,7 +279,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement()
{
if (volumeStatus[celli] == volumeType::UNKNOWN)
{
treeBoundBox cellBb(mesh_.cells()[celli].box(mesh_));
treeBoundBox cellBb(mesh_.cellBb(celli));
if (geometry.overlaps(cellBb))
{
@ -498,7 +498,7 @@ bool Foam::backgroundMeshDecomposition::refineCell
// const conformationSurfaces& geometry = geometryToConformTo_;
treeBoundBox cellBb(mesh_.cells()[celli].box(mesh_));
treeBoundBox cellBb(mesh_.cellBb(celli));
weightEstimate = 1.0;