From 876810dd0cb3a03851d8a8e376b3563b40247ae9 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 27 Jun 2011 15:01:16 +0100 Subject: [PATCH 1/4] ENH: added surfaces w.r.t. locationInMesh printing --- .../conformationSurfaces.C | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 4e9c94ae48..7001cf6ff2 100644 --- a/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/src/mesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -103,6 +103,19 @@ Foam::conformationSurfaces::conformationSurfaces surfaceSubDict.lookupOrDefault("baffleSurface", false) ); + if (!baffleSurfaces_[surfI]) + { + if (!allGeometry_[surfaces_[surfI]].hasVolumeType()) + { + WarningIn("conformationSurfaces::conformationSurfaces(..)") + << "Non-baffle surface " + << allGeometry_[surfaces_[surfI]].name() + << " does not allow inside/outside queries." + << " This usually is an error." << endl; + } + } + + word featureMethod = surfaceSubDict.lookupOrDefault ( "featureMethod", @@ -231,6 +244,9 @@ Foam::conformationSurfaces::conformationSurfaces searchableSurface::UNKNOWN ); + + Info<< endl + << "Testing for locationInMesh " << locationInMesh_ << endl; forAll(surfaces_, s) { const searchableSurface& surface(allGeometry_[surfaces_[s]]); @@ -248,6 +264,12 @@ Foam::conformationSurfaces::conformationSurfaces surface.getVolumeType(pts, vTypes); referenceVolumeTypes_[s] = vTypes[0]; + + + Info<< " is " + << searchableSurface::volumeTypeNames[referenceVolumeTypes_[s]] + << " surface " << surface.name() + << endl; } } } From 01e3374e8c4356bd38fd3d62dd65a787cbef0f62 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 27 Jun 2011 15:03:03 +0100 Subject: [PATCH 2/4] ENH: searchableSurface: names for inside/outside status --- .../searchableSurface/searchableSurface.C | 16 ++++++++++++++++ .../searchableSurface/searchableSurface.H | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/meshTools/searchableSurface/searchableSurface.C b/src/meshTools/searchableSurface/searchableSurface.C index c1b642f3c2..15f96e880b 100644 --- a/src/meshTools/searchableSurface/searchableSurface.C +++ b/src/meshTools/searchableSurface/searchableSurface.C @@ -32,8 +32,24 @@ namespace Foam { defineTypeNameAndDebug(searchableSurface, 0); defineRunTimeSelectionTable(searchableSurface, dict); + + template<> + const char* Foam::NamedEnum + < + Foam::searchableSurface::volumeType, + 4 + >::names[] = + { + "unknown", + "mixed", + "inside", + "outside" + }; } +const Foam::NamedEnum + Foam::searchableSurface::volumeTypeNames; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/meshTools/searchableSurface/searchableSurface.H b/src/meshTools/searchableSurface/searchableSurface.H index a748e2c391..c1026b1dce 100644 --- a/src/meshTools/searchableSurface/searchableSurface.H +++ b/src/meshTools/searchableSurface/searchableSurface.H @@ -81,6 +81,8 @@ public: OUTSIDE = 3 }; + static const NamedEnum volumeTypeNames; + private: // Private data @@ -89,7 +91,6 @@ private: boundBox bounds_; - // Private Member Functions //- Disallow default bitwise copy construct From 6c997355b11d8adb3d4a54df33fe526b2270c4cb Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 28 Jun 2011 10:43:15 +0100 Subject: [PATCH 3/4] ENH: conformalVoronoiMesh.C: have negative mixed points coeff disable specialised handling --- .../conformalVoronoiMesh/conformalVoronoiMesh.C | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 22b0548f6d..e4ad2fdef4 100644 --- a/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/src/mesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -954,9 +954,12 @@ void Foam::conformalVoronoiMesh::createMixedFeaturePoints DynamicList