ENH: snappyHexMesh: additional checking for faceZones on processor boundaries
This commit is contained in:
parent
50437d21ac
commit
7d9deced35
3 changed files with 39 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue