checkMesh::checkTopology: Moved the allGeometry specific output into checkGeometry

This commit is contained in:
Henry Weller
2023-10-18 14:55:49 +01:00
parent c0da2a5eff
commit 58f5d5ed5f
4 changed files with 34 additions and 27 deletions

View File

@ -523,6 +523,39 @@ Foam::label Foam::checkGeometry
Info<< " Overall domain bounding box "
<< globalBb.min() << " " << globalBb.max() << endl;
if (allGeometry)
{
Info<< " Patch bounding boxes" << endl;
const polyBoundaryMesh& patches = mesh.boundaryMesh();
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchi];
if (!isA<processorPolyPatch>(pp))
{
Info<< " " << setw(20) << pp.name();
const pointField& pts = pp.points();
const labelList& mp = pp.meshPoints();
if (returnReduce(mp.size(), sumOp<label>()) > 0)
{
boundBox bb(point::max, point::min);
forAll(mp, i)
{
bb.min() = min(bb.min(), pts[mp[i]]);
bb.max() = max(bb.max(), pts[mp[i]]);
}
reduce(bb.min(), minOp<vector>());
reduce(bb.max(), maxOp<vector>());
Info<< ' ' << bb;
}
}
Info<< endl;
}
}
// Min length
scalar minDistSqr = magSqr(1e-6 * globalBb.span());

View File

@ -206,7 +206,6 @@ int main(int argc, char *argv[])
(
mesh,
allTopology,
allGeometry,
surfWriter,
setWriter
);

View File

@ -42,7 +42,6 @@ Foam::label Foam::checkTopology
(
const polyMesh& mesh,
const bool allTopology,
const bool allGeometry,
const autoPtr<surfaceWriter>& surfWriter,
const autoPtr<Foam::setWriter>& setWriter
)
@ -499,10 +498,6 @@ Foam::label Foam::checkTopology
{
Info<< setw(34) << "Surface topology";
}
if (allGeometry)
{
Info<< " Bounding box";
}
Info<< endl;
forAll(patches, patchi)
@ -555,25 +550,6 @@ Foam::label Foam::checkTopology
}
}
}
if (allGeometry)
{
const pointField& pts = pp.points();
const labelList& mp = pp.meshPoints();
if (returnReduce(mp.size(), sumOp<label>()) > 0)
{
boundBox bb(point::max, point::min);
forAll(mp, i)
{
bb.min() = min(bb.min(), pts[mp[i]]);
bb.max() = max(bb.max(), pts[mp[i]]);
}
reduce(bb.min(), minOp<vector>());
reduce(bb.max(), maxOp<vector>());
Info<< ' ' << bb;
}
}
Info<< endl;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,6 @@ namespace Foam
(
const polyMesh& mesh,
const bool allTopology,
const bool allGeometry,
const autoPtr<surfaceWriter>& surfWriter,
const autoPtr<Foam::setWriter>& setWriter
);