ENH: snappyHexMesh: additional checking for faceZones on processor boundaries

This commit is contained in:
mattijs
2014-07-23 11:25:11 +01:00
committed by Andrew Heather
parent c237fb0706
commit 5c9f35339e
3 changed files with 39 additions and 0 deletions

View File

@ -1248,6 +1248,12 @@ void Foam::autoRefineDriver::doRefine
decomposer_, decomposer_,
distributor_ distributor_
); );
if (debug)
{
meshRefiner_.checkZoneFaces();
}
} }
} }

View File

@ -870,6 +870,9 @@ public:
const labelList& neiPatch const labelList& neiPatch
); );
//- Debug helper: check faceZones are not on processor patches
void checkZoneFaces() const;
//- Create baffles for faces straddling zoned surfaces. Return //- Create baffles for faces straddling zoned surfaces. Return
// baffles. // baffles.
autoPtr<mapPolyMesh> createZoneBaffles autoPtr<mapPolyMesh> createZoneBaffles

View File

@ -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 Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles
( (
const labelList& globalToMasterPatch, const labelList& globalToMasterPatch,