Skip to content
Snippets Groups Projects
Commit 5c9f3533 authored by mattijs's avatar mattijs Committed by Andrew Heather
Browse files

ENH: snappyHexMesh: additional checking for faceZones on processor boundaries

parent c237fb07
Branches
Tags
No related merge requests found
......@@ -1248,6 +1248,12 @@ void Foam::autoRefineDriver::doRefine
decomposer_,
distributor_
);
if (debug)
{
meshRefiner_.checkZoneFaces();
}
}
}
......
......@@ -870,6 +870,9 @@ public:
const labelList& neiPatch
);
//- Debug helper: check faceZones are not on processor patches
void checkZoneFaces() const;
//- Create baffles for faces straddling zoned surfaces. Return
// baffles.
autoPtr<mapPolyMesh> createZoneBaffles
......
......@@ -531,6 +531,36 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles
}
void Foam::meshRefinement::checkZoneFaces() const
{
const faceZoneMesh& fZones = mesh_.faceZones();
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
forAll(pbm, patchI)
{
const polyPatch& pp = pbm[patchI];
if (isA<processorPolyPatch>(pp))
{
forAll(pp, i)
{
label faceI = pp.start()+i;
label zoneI = fZones.whichZone(faceI);
if (zoneI != -1)
{
FatalErrorIn("meshRefinement::checkZoneFaces")
<< "face:" << faceI << " on patch " << pp.name()
<< " is in zone " << fZones[zoneI].name()
<< exit(FatalError);
}
}
}
}
}
Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles
(
const labelList& globalToMasterPatch,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment