From 3f2b57f0f38262ca6bb5f29551a131b375f28d19 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Thu, 1 Apr 2010 14:23:58 +0100 Subject: [PATCH] BUG: Always do topological walking to correct cellZones. --- .../meshRefinement/meshRefinementBaffles.C | 6 ++- .../refinementSurfaces/refinementSurfaces.C | 38 +++++++++++++++++-- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index e2a2fee10ab..9798046ca3c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -2327,9 +2327,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Set using walking // ~~~~~~~~~~~~~~~~~ - if (!allowFreeStandingZoneFaces) + //if (!allowFreeStandingZoneFaces) { - Info<< "Walking to assign cellZones." << nl << endl; + Info<< "Walking from location-in-mesh " << keepPoint + << " to assign cellZones " + << "- crossing a faceZone face changes cellZone" << nl << endl; // Topological walk findCellZoneTopo diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C index c6aae8ccaed..ac01e052cdb 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C @@ -77,11 +77,22 @@ Foam::refinementSurfaces::refinementSurfaces if (dict.found("faceZone")) { dict.lookup("faceZone") >> faceZoneNames_[surfI]; + bool hasSide = dict.readIfPresent("zoneInside", zoneInside_[surfI]); if (dict.readIfPresent("cellZone", cellZoneNames_[surfI])) { - dict.lookup("zoneInside") >> zoneInside_[surfI]; + if (hasSide && !allGeometry_[surfaces_[surfI]].hasVolumeType()) + { + IOWarningIn + ( + "refinementSurfaces::refinementSurfaces(..)", + dict + ) << "Unused entry zoneInside for faceZone " + << faceZoneNames_[surfI] + << " since surface " << names_[surfI] + << " is not closed." << endl; + } } - else if (dict.found("zoneInside")) + else if (hasSide) { IOWarningIn("refinementSurfaces::refinementSurfaces(..)", dict) << "Unused entry zoneInside for faceZone " @@ -324,11 +335,30 @@ Foam::refinementSurfaces::refinementSurfaces if (dict.found("faceZone")) { dict.lookup("faceZone") >> faceZoneNames_[surfI]; + bool hasSide = dict.readIfPresent + ( + "zoneInside", + zoneInside_[surfI] + ); if (dict.readIfPresent("cellZone", cellZoneNames_[surfI])) { - dict.lookup("zoneInside") >> zoneInside_[surfI]; + if + ( + hasSide + && !allGeometry_[surfaces_[surfI]].hasVolumeType() + ) + { + IOWarningIn + ( + "refinementSurfaces::refinementSurfaces(..)", + dict + ) << "Unused entry zoneInside for faceZone " + << faceZoneNames_[surfI] + << " since surface " << names_[surfI] + << " is not closed." << endl; + } } - else if (dict.found("zoneInside")) + else if (hasSide) { IOWarningIn ( -- GitLab