mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use simpler boundBox handling
- use default initialize boundBox instead of invertedBox - reset() instead of assigning from invertedBox - extend (three parameter version) and grow method - inflate(Random) instead of extend + re-assigning
This commit is contained in:
committed by
Andrew Heather
parent
1339c3357b
commit
e5006a62d7
@ -53,20 +53,17 @@ int main(int argc, char *argv[])
|
||||
const polyMesh::cellDecomposition decompMode = polyMesh::CELL_TETS;
|
||||
|
||||
treeBoundBox meshBb(mesh.bounds());
|
||||
treeBoundBox shiftedBb(meshBb);
|
||||
|
||||
// Calculate typical cell related size to shift bb by.
|
||||
scalar typDim = meshBb.avgDim()/(2.0*Foam::cbrt(scalar(mesh.nCells())));
|
||||
|
||||
treeBoundBox shiftedBb
|
||||
(
|
||||
meshBb.min(),
|
||||
meshBb.max() + vector(typDim, typDim, typDim)
|
||||
);
|
||||
shiftedBb.max() += vector::uniform(typDim);
|
||||
|
||||
Info<< "Mesh" << endl;
|
||||
Info<< " bounding box : " << meshBb << endl;
|
||||
Info<< " bounding box (shifted) : " << shiftedBb << endl;
|
||||
Info<< " typical dimension : " << shiftedBb.typDim() << endl;
|
||||
Info<< " typical dimension : " << shiftedBb.avgDim() << endl;
|
||||
|
||||
Info<< "Initialised mesh in "
|
||||
<< runTime.cpuTimeIncrement() << " s" << endl;
|
||||
|
||||
Reference in New Issue
Block a user