From 97baced83c5fabf5b9b63767b7a6e3b3ec226fe1 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 3 Aug 2011 09:22:45 +0100 Subject: [PATCH] Bug fix for rotor motion in parallel --- .../multiMixerFvMesh/mixerRotor.C | 76 ++----------------- 1 file changed, 6 insertions(+), 70 deletions(-) diff --git a/src/dynamicMesh/topoChangerFvMesh/multiMixerFvMesh/mixerRotor.C b/src/dynamicMesh/topoChangerFvMesh/multiMixerFvMesh/mixerRotor.C index 503be205d..a3197a2c4 100644 --- a/src/dynamicMesh/topoChangerFvMesh/multiMixerFvMesh/mixerRotor.C +++ b/src/dynamicMesh/topoChangerFvMesh/multiMixerFvMesh/mixerRotor.C @@ -28,7 +28,6 @@ License #include "regionSplit.H" #include "polyTopoChanger.H" #include "slidingInterface.H" -#include "ggiPolyPatch.H" #include "Time.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -222,17 +221,8 @@ void Foam::mixerRotor::calcMovingMask() const const cellList& c = mesh_.cells(); const faceList& f = mesh_.allFaces(); - label movingCellZoneID = - mesh_.cellZones().findZoneID("movingCellsZone" + name_); - - if (movingCellZoneID < 0) - { - FatalErrorIn("void mixerRotor::calcMovingMask() const") - << "Cannot find moving cell zone ID" - << abort(FatalError); - } - - const labelList& cellAddr = mesh_.cellZones()[movingCellZoneID]; + const labelList& cellAddr = mesh_.cellZones() + [mesh_.cellZones().findZoneID("movingCellsZone" + name_)]; forAll (cellAddr, cellI) { @@ -251,35 +241,8 @@ void Foam::mixerRotor::calcMovingMask() const } // Attempt to enforce motion on sliders if zones exist - - // Master side - label msI = -1; - - if (useTopoSliding_) - { - // For topological changes, find the zone - msI = mesh_.faceZones().findZoneID(movingSliderName_ + "Zone" + name_); - } - else - { - // For GGI, take face zone from ggi interpolator - label movingSliderIndex = - mesh_.boundaryMesh().findPatchID(movingSliderName_); - - if (movingSliderIndex > -1) - { - if (isA(mesh_.boundaryMesh()[movingSliderIndex])) - { - const ggiPolyPatch& movingSliderGgi = - refCast - ( - mesh_.boundaryMesh()[movingSliderIndex] - ); - - msI = mesh_.faceZones().findZoneID(movingSliderGgi.zoneName()); - } - } - } + const label msI = + mesh_.faceZones().findZoneID(movingSliderName_ + "Zone" + name_); if (msI > -1) { @@ -296,35 +259,8 @@ void Foam::mixerRotor::calcMovingMask() const } } - // Slave side - label ssI = -1; - - if (useTopoSliding_) - { - // For topological changes, find the zone - ssI = mesh_.faceZones().findZoneID(staticSliderName_ + "Zone" + name_); - } - else - { - // For GGI, take face zone from ggi interpolator - label staticSliderIndex = - mesh_.boundaryMesh().findPatchID(staticSliderName_); - - if (staticSliderIndex > -1) - { - if (isA(mesh_.boundaryMesh()[staticSliderIndex])) - { - const ggiPolyPatch& staticSliderGgi = - refCast - ( - mesh_.boundaryMesh()[staticSliderIndex] - ); - - ssI = mesh_.faceZones().findZoneID(staticSliderGgi.zoneName()); - } - } - } - + const label ssI = + mesh_.faceZones().findZoneID(staticSliderName_ + "Zone" + name_); if (ssI > -1) {