diff --git a/applications/utilities/mesh/generation/blockMesh/createMergeList.C b/applications/utilities/mesh/generation/blockMesh/createMergeList.C index b6e91a3ca0..5e07c75de2 100644 --- a/applications/utilities/mesh/generation/blockMesh/createMergeList.C +++ b/applications/utilities/mesh/generation/blockMesh/createMergeList.C @@ -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 diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index bcb9df59c0..94bdfc5f72 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -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 diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index edcfbf2aee..a749a1a390 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -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), diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 8eb1f3f05f..52f23658a8 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -20,7 +20,7 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry) // Min length - scalar minDistSqr = magSqr(1e-6*(globalBb.max() - globalBb.min())); + scalar minDistSqr = magSqr(1e-6 * globalBb.span()); // Non-empty directions const Vector