From 6ba4f9ceb7499a975b7020f3ea4f46d010d23414 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Wed, 6 Feb 2013 09:43:30 +0000 Subject: [PATCH] BUG: polyMesh: do count coupled faces for non-closedness --- src/OpenFOAM/meshes/polyMesh/polyMesh.H | 5 +---- .../polyMesh/polyMeshCheck/polyMeshCheck.C | 22 ++++++++++--------- .../primitiveMeshCheck/primitiveMeshCheck.C | 4 ++-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index e4c18976719..76c5f1c8a37 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -576,9 +576,6 @@ public: // Geometric checks. Selectively override primitiveMesh functionality. - //- Check boundary for closedness - virtual bool checkClosedBoundary(const bool report = false) const; - //- Check non-orthogonality virtual bool checkFaceOrthogonality ( diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index 748c7da21a6..e6cc20fee18 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -516,15 +516,17 @@ bool Foam::polyMesh::checkCellDeterminant } -bool Foam::polyMesh::checkClosedBoundary(const bool report) const -{ - return primitiveMesh::checkClosedBoundary - ( - faceAreas(), - report, - syncTools::getInternalOrCoupledFaces(*this) - ); -} +//- Could override checkClosedBoundary to not look at (collocated!) coupled +// faces +//bool Foam::polyMesh::checkClosedBoundary(const bool report) const +//{ +// return primitiveMesh::checkClosedBoundary +// ( +// faceAreas(), +// report, +// syncTools::getInternalOrCollocatedCoupledFaces(*this) +// ); +//} bool Foam::polyMesh::checkFaceOrthogonality diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index d805608e448..d7abd45d82d 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -64,7 +64,7 @@ bool Foam::primitiveMesh::checkClosedBoundary for (label faceI = nInternalFaces(); faceI < areas.size(); faceI++) { - if (internalOrCoupledFaces.size() && !internalOrCoupledFaces[faceI]) + if (!internalOrCoupledFaces.size() || !internalOrCoupledFaces[faceI]) { sumClosed += areas[faceI]; sumMagClosedBoundary += mag(areas[faceI]); -- GitLab