ENH: use concise forms for walking processor and cyclic boundaries

This commit is contained in:
Mark Olesen
2021-01-22 13:29:00 +01:00
parent f24e3f113f
commit 6cdf89dced
22 changed files with 525 additions and 699 deletions

View File

@ -193,21 +193,15 @@ void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces()
{
facePatchId = mesh_.boundaryMesh().whichPatch(meshFacei);
const polyPatch& pp = mesh_.boundaryMesh()[facePatchId];
const auto* cpp = isA<coupledPolyPatch>(pp);
if (isA<coupledPolyPatch>(pp))
if (cpp)
{
if (refCast<const coupledPolyPatch>(pp).owner())
{
faceId = pp.whichFace(meshFacei);
}
else
{
faceId = -1;
}
faceId = (cpp->owner() ? pp.whichFace(meshFacei) : -1);
}
else if (!isA<emptyPolyPatch>(pp))
{
faceId = meshFacei - pp.start();
faceId = pp.whichFace(meshFacei);
}
else
{