From 065bf825b8671ffcc22aebe0c8cd7b6a9573e8a6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 12 Jul 2010 18:13:53 +0100 Subject: [PATCH 01/11] COMP: debian/ assume version 170 so we can reuse files --- debian/changelog | 2 +- debian/control | 4 ++-- debian/postinst | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 37d8825189..5951d0a84a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -openfoamdev (0-1) unstable; urgency=low +openfoam170 (0-1) unstable; urgency=low * Initial release diff --git a/debian/control b/debian/control index 7f1ffece57..c5957a03ec 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: openfoamdev +Source: openfoam170 Section: optional Priority: optional Maintainer: OpenCFD Ltd. @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 7), quilt Standards-Version: 3.8.4 Homepage: http://www.openfoam.com -Package: openfoamdev +Package: openfoam170 Architecture: any Depends: csh,g++,${shlibs:Depends}, ${misc:Depends},binutils-dev,flex,libscotch-dev,libopenmpi-dev,libxt-dev,openmpi-bin Description: OpenFOAM diff --git a/debian/postinst b/debian/postinst index e28adbc93f..f4a492c84a 100755 --- a/debian/postinst +++ b/debian/postinst @@ -24,7 +24,7 @@ case "$1" in echo "" echo "** To use OpenFOAM please add" echo "**" - echo "** . /opt/openfoamdev/etc/bashrc" + echo "** . /opt/openfoam170/etc/bashrc" echo "**" echo "** To your ~/.bashrc" echo "" From a3a6b890d0d7a8e6ab914f254b91861150005b5b Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 23 Jul 2010 10:54:56 +0100 Subject: [PATCH 02/11] dimensionedScalar cbrt: changed word "1/3" to "1|3" --- .../dimensionedTypes/dimensionedScalar/dimensionedScalar.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C index a08224dd43..36cfd55827 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C @@ -155,7 +155,7 @@ dimensionedScalar cbrt(const dimensionedScalar& ds) return dimensionedScalar ( "cbrt(" + ds.name() + ')', - pow(ds.dimensions(), dimensionedScalar("(1/3)", dimless, 1.0/3.0)), + pow(ds.dimensions(), dimensionedScalar("(1|3)", dimless, 1.0/3.0)), ::cbrt(ds.value()) ); } From d5ee2e8e1f66861e82b0f10d54b2bcf74a9d7f3e Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 23 Jul 2010 10:56:18 +0100 Subject: [PATCH 03/11] Corrected copyright date. --- .../dimensionedTypes/dimensionedScalar/dimensionedScalar.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C index 36cfd55827..79ffd76e09 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License From e3f20df12f5b5b9dbccc10d81ecf69d2c1734bb6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 23 Jul 2010 12:06:42 +0100 Subject: [PATCH 04/11] ENH: checkMesh : wedge & empty checking improved - aspect ratio and cellDeterminant do not use 3rd direction - wedges are properly check for having opposite one --- .../manipulation/checkMesh/checkGeometry.C | 282 +++++++++++++++++- .../manipulation/checkMesh/checkGeometry.H | 13 + .../mesh/manipulation/checkMesh/checkMesh.C | 2 +- .../meshes/primitiveMesh/primitiveMesh.C | 2 +- .../meshes/primitiveMesh/primitiveMesh.H | 8 +- .../primitiveMeshCheck/primitiveMeshCheck.C | 164 +++++++--- 6 files changed, 415 insertions(+), 56 deletions(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 50ff6918b0..4a7a7628b7 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -1,10 +1,265 @@ #include "checkGeometry.H" #include "polyMesh.H" -#include "globalMeshData.H" #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" #include "EdgeMap.H" +#include "wedgePolyPatch.H" +#include "unitConversion.H" + + +// Find wedge with opposite orientation. Note: does not actually check that +// it is opposite, only that it has opposite normal and same axis +Foam::label Foam::findOppositeWedge +( + const polyMesh& mesh, + const wedgePolyPatch& wpp +) +{ + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + scalar wppCosAngle = wpp.centreNormal()&wpp.patchNormal(); + + forAll(patches, patchI) + { + if + ( + patchI != wpp.index() + && patches[patchI].size() + && isA(patches[patchI]) + ) + { + const wedgePolyPatch& pp = refCast + ( + patches[patchI] + ); + + // Calculate (cos of) angle to wpp (not pp!) centre normal + scalar ppCosAngle = wpp.centreNormal()&pp.patchNormal(); + + if + ( + pp.size() == wpp.size() + && mag(pp.axis() & wpp.axis()) >= (1-1E-3) + && mag(ppCosAngle - wppCosAngle) >= 1E-3 + ) + { + return patchI; + } + } + } + return -1; +} + + +bool Foam::checkWedges +( + const polyMesh& mesh, + const bool report, + const Vector