ENH: use concise forms for walking processor and cyclic boundaries
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -649,12 +649,12 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
|
||||
|
||||
for (const polyPatch& patch : mesh_.boundaryMesh())
|
||||
{
|
||||
if (isA<cyclicPolyPatch>(patch))
|
||||
{
|
||||
const cyclicPolyPatch& cycPatch =
|
||||
refCast<const cyclicPolyPatch>(patch);
|
||||
const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(patch);
|
||||
|
||||
const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
|
||||
if (cpp)
|
||||
{
|
||||
const auto& cycPatch = *cpp;
|
||||
const auto& nbrPatch = cycPatch.neighbPatch();
|
||||
|
||||
// Allocate buffers
|
||||
label nReceiveFaces;
|
||||
@ -733,12 +733,12 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
|
||||
|
||||
for (const polyPatch& patch : mesh_.boundaryMesh())
|
||||
{
|
||||
if (isA<cyclicAMIPolyPatch>(patch))
|
||||
{
|
||||
const cyclicAMIPolyPatch& cycPatch =
|
||||
refCast<const cyclicAMIPolyPatch>(patch);
|
||||
const cyclicAMIPolyPatch* cpp = isA<cyclicAMIPolyPatch>(patch);
|
||||
|
||||
const cyclicAMIPolyPatch& nbrPatch = cycPatch.neighbPatch();
|
||||
if (cpp)
|
||||
{
|
||||
const auto& cycPatch = *cpp;
|
||||
const auto& nbrPatch = cycPatch.neighbPatch();
|
||||
|
||||
List<Type> receiveInfo;
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -435,10 +436,12 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
|
||||
{
|
||||
const polyPatch& patch = mesh_.boundaryMesh()[patchi];
|
||||
|
||||
if (isA<cyclicPolyPatch>(patch))
|
||||
const cyclicPolyPatch* cpp = isA<cyclicPolyPatch>(patch);
|
||||
|
||||
if (cpp)
|
||||
{
|
||||
const cyclicPolyPatch& cycPatch =
|
||||
refCast<const cyclicPolyPatch>(patch);
|
||||
const auto& cycPatch = *cpp;
|
||||
const auto& nbrPatch = cycPatch.neighbPatch();
|
||||
|
||||
nbrInfo.clear();
|
||||
nbrInfo.reserve(cycPatch.nPoints());
|
||||
@ -449,7 +452,6 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
|
||||
|
||||
// Collect nbrPatch points that have changed
|
||||
{
|
||||
const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
|
||||
const edgeList& pairs = cycPatch.coupledPoints();
|
||||
const labelList& meshPoints = nbrPatch.meshPoints();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user