mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
boundingBox has mag() and span() methods - use them
This commit is contained in:
@ -93,7 +93,7 @@ Foam::labelList Foam::blockMesh::createMergeList()
|
||||
// the size of the block.
|
||||
|
||||
boundBox bb(blockCells[blockPlabel].points(blockFaces, blockPoints));
|
||||
const scalar mergeSqrDist = SMALL*magSqr(bb.max() - bb.min());
|
||||
const scalar mergeSqrDist = SMALL*magSqr(bb.span());
|
||||
|
||||
// This is an N^2 algorithm
|
||||
|
||||
|
||||
@ -177,9 +177,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
const boundBox& bb = mesh.globalData().bb();
|
||||
const vector span(bb.max() - bb.min());
|
||||
const vector span = bb.span();
|
||||
const scalar minDim = min(span[0], min(span[1], span[2]));
|
||||
const scalar mergeDim = 1E-4*minDim;
|
||||
const scalar mergeDim = 1E-4 * minDim;
|
||||
|
||||
Pout<< "Mesh bounding box:" << bb << nl
|
||||
<< " with span:" << span << nl
|
||||
|
||||
@ -55,7 +55,7 @@ using namespace Foam;
|
||||
scalar getMergeDistance(const polyMesh& mesh, const scalar mergeTol)
|
||||
{
|
||||
const boundBox& meshBb = mesh.bounds();
|
||||
scalar mergeDist = mergeTol*mag(meshBb.max() - meshBb.min());
|
||||
scalar mergeDist = mergeTol * meshBb.mag();
|
||||
scalar writeTol = std::pow
|
||||
(
|
||||
scalar(10.0),
|
||||
|
||||
Reference in New Issue
Block a user