mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
committed by
Andrew Heather
parent
27c2cdc040
commit
0ba458fdbc
@ -150,13 +150,7 @@ bool Foam::functionObjects::energySpectrum::read(const dictionary& dict)
|
||||
const boundBox meshBb(mesh_.bounds());
|
||||
|
||||
// Assume all cells are the same size...
|
||||
const cell& c = mesh_.cells()[0];
|
||||
boundBox cellBb(boundBox::invertedBox);
|
||||
forAll(c, facei)
|
||||
{
|
||||
const face& f = mesh_.faces()[c[facei]];
|
||||
cellBb.add(mesh_.points(), f);
|
||||
}
|
||||
boundBox cellBb(mesh_.cellBb(0));
|
||||
|
||||
const vector L(meshBb.max() - meshBb.min());
|
||||
const vector nCellXYZ(cmptDivide(L, cellBb.max() - cellBb.min()));
|
||||
|
||||
Reference in New Issue
Block a user