diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 94dabef0fa..db0a2a5f7b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,7 +26,7 @@ License #include "conformalVoronoiMesh.H" #include "motionSmoother.H" #include "backgroundMeshDecomposition.H" -#include "polyMeshGeometry.H" +#include "polyMeshCheck.H" #include "indexedCellChecks.H" #include "OBJstream.H" #include "indexedCellOps.H" @@ -846,7 +846,7 @@ void Foam::conformalVoronoiMesh::checkCellSizing() if (maxNonOrtho < 180.0 - small) { - polyMeshGeometry::checkFaceDotProduct + polyMeshCheck::checkFaceDotProduct ( false, maxNonOrtho, diff --git a/etc/controlDict b/etc/controlDict index e1439fa790..82e5ab27d1 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -711,7 +711,6 @@ DebugSwitches pointZone 0; polyBoundaryMesh 0; polyMesh 0; - polyMeshGeometry 0; polyMeshInfo 0; polyTopoChange 0; polyTopoChanger 0; @@ -724,7 +723,6 @@ DebugSwitches pressureNormalInletOutletVelocity 0; pressureSwirlInjector 0; primitiveMesh 0; - primitiveMeshGeometry 0; probes 0; processor 0; processorLduInterface 0; diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files index 56c811f168..88e7c088ad 100644 --- a/src/dynamicMesh/Make/files +++ b/src/dynamicMesh/Make/files @@ -94,7 +94,7 @@ motionSmoother/motionSmoother.C motionSmoother/motionSmootherAlgo.C motionSmoother/motionSmootherAlgoCheck.C motionSmoother/motionSmootherData.C -motionSmoother/polyMeshGeometry/polyMeshGeometry.C +motionSmoother/polyMeshCheck/polyMeshCheck.C motionSmoother/badQualityToCell/badQualityToCell.C motionSmoother/badQualityToFace/badQualityToFace.C diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H index ffb2267f3b..e58171fca3 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,7 +87,6 @@ SourceFiles namespace Foam { -class polyMeshGeometry; class faceSet; /*---------------------------------------------------------------------------*\ @@ -460,31 +459,6 @@ public: labelHashSet& wrongFaces ); - //- Check part of mesh with mesh settings in dict. - // Collects incorrect faces in set. Returns true if one or - // more faces in error. Parallel ok. - static bool checkMesh - ( - const bool report, - const dictionary& dict, - const polyMeshGeometry&, - const labelList& checkFaces, - labelHashSet& wrongFaces - ); - - //- Check part of mesh including baffles with mesh settings in dict. - // Collects incorrect faces in set. Returns true if one or - // more faces in error. Parallel ok. - static bool checkMesh - ( - const bool report, - const dictionary& dict, - const polyMeshGeometry&, - const labelList& checkFaces, - const List& baffles, - labelHashSet& wrongFaces - ); - // Helper functions to manipulate displacement vector. //- Fully explicit smoothing of fields (not positions) diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C index dc617e2209..d002c35953 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -24,7 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "motionSmootherAlgo.H" -#include "polyMeshGeometry.H" +#include "polyMeshCheck.H" #include "IOmanip.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -117,7 +117,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (maxNonOrtho < 180.0-small) { - polyMeshGeometry::checkFaceDotProduct + polyMeshCheck::checkFaceDotProduct ( report, maxNonOrtho, @@ -141,7 +141,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minVol > -great) { - polyMeshGeometry::checkFacePyramids + polyMeshCheck::checkFacePyramids ( report, minVol, @@ -164,7 +164,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minTetQuality > -great) { - polyMeshGeometry::checkFaceTets + polyMeshCheck::checkFaceTets ( report, minTetQuality, @@ -188,7 +188,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (maxConcave < 180.0-small) { - polyMeshGeometry::checkFaceAngles + polyMeshCheck::checkFaceAngles ( report, maxConcave, @@ -211,7 +211,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minArea > -small) { - polyMeshGeometry::checkFaceArea + polyMeshCheck::checkFaceArea ( report, minArea, @@ -233,7 +233,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (maxIntSkew > 0 || maxBounSkew > 0) { - polyMeshGeometry::checkFaceSkewness + polyMeshCheck::checkFaceSkewness ( report, maxIntSkew, @@ -260,7 +260,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minWeight >= 0 && minWeight < 1) { - polyMeshGeometry::checkFaceWeights + polyMeshCheck::checkFaceWeights ( report, minWeight, @@ -285,7 +285,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minVolRatio >= 0) { - polyMeshGeometry::checkVolRatio + polyMeshCheck::checkVolRatio ( report, minVolRatio, @@ -310,7 +310,7 @@ bool Foam::motionSmootherAlgo::checkMesh { // Pout<< "Checking face twist: dot product of face normal " // << "with face triangle normals" << endl; - polyMeshGeometry::checkFaceTwist + polyMeshCheck::checkFaceTwist ( report, minTwist, @@ -337,7 +337,7 @@ bool Foam::motionSmootherAlgo::checkMesh { // Pout<< "Checking triangle twist: dot product of consecutive triangle" // << " normals resulting from face-centre decomposition" << endl; - polyMeshGeometry::checkTriangleTwist + polyMeshCheck::checkTriangleTwist ( report, minTriangleTwist, @@ -361,7 +361,7 @@ bool Foam::motionSmootherAlgo::checkMesh if (minFaceFlatness > -small) { - polyMeshGeometry::checkFaceFlatness + polyMeshCheck::checkFaceFlatness ( report, minFaceFlatness, @@ -385,14 +385,13 @@ bool Foam::motionSmootherAlgo::checkMesh if (minDet > -1) { - polyMeshGeometry::checkCellDeterminant + polyMeshCheck::checkCellDeterminant ( report, minDet, mesh, mesh.faceAreas(), checkFaces, - polyMeshGeometry::affectedCells(mesh, checkFaces), &wrongFaces ); @@ -429,351 +428,5 @@ bool Foam::motionSmootherAlgo::checkMesh ); } -bool Foam::motionSmootherAlgo::checkMesh -( - const bool report, - const dictionary& dict, - const polyMeshGeometry& meshGeom, - const labelList& checkFaces, - labelHashSet& wrongFaces -) -{ - List emptyBaffles; - - return checkMesh - ( - report, - dict, - meshGeom, - checkFaces, - emptyBaffles, - wrongFaces - ); -} - - -bool Foam::motionSmootherAlgo::checkMesh -( - const bool report, - const dictionary& dict, - const polyMeshGeometry& meshGeom, - const labelList& checkFaces, - const List& baffles, - labelHashSet& wrongFaces -) -{ - const scalar maxNonOrtho - ( - dict.lookup("maxNonOrtho", true) - ); - const scalar minVol - ( - dict.lookup("minVol", true) - ); - const scalar minTetQuality - ( - dict.lookup("minTetQuality", true) - ); - const scalar maxConcave - ( - dict.lookup("maxConcave", true) - ); - const scalar minArea - ( - dict.lookup("minArea", true) - ); - // const scalar maxIntSkew - //( - // dict.lookup("maxInternalSkewness", true) - //); - // const scalar maxBounSkew - //( - // dict.lookup("maxBoundarySkewness", true) - //); - const scalar minWeight - ( - dict.lookup("minFaceWeight", true) - ); - const scalar minVolRatio - ( - dict.lookup("minVolRatio", true) - ); - const scalar minTwist - ( - dict.lookup("minTwist", true) - ); - const scalar minTriangleTwist - ( - dict.lookup("minTriangleTwist", true) - ); - scalar minFaceFlatness = -1.0; - dict.readIfPresent("minFaceFlatness", minFaceFlatness, true); - const scalar minDet - ( - dict.lookup("minDeterminant", true) - ); - - label nWrongFaces = 0; - - Info<< "Checking faces in error :" << endl; - // Pout.setf(ios_base::left); - - if (maxNonOrtho < 180.0-small) - { - meshGeom.checkFaceDotProduct - ( - report, - maxNonOrtho, - checkFaces, - baffles, - &wrongFaces - ); - - label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp