From 78271775757c151fac1d260aac066f8958998d00 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 4 Aug 2023 17:57:47 +0100 Subject: [PATCH 1/7] Polyhedral AMR --- .../mesh/manipulation/stitchMesh/stitchMesh.C | 2 +- src/dynamicMesh/Make/files | 5 + src/dynamicMesh/attachDetach/attachDetach.C | 4 +- src/dynamicMesh/attachDetach/attachDetach.H | 6 +- .../attachDetach/attachInterface.C | 8 +- .../attachDetach/detachInterface.C | 10 +- .../layerAdditionRemoval/addCellLayer.C | 8 +- .../layerAdditionRemoval.C | 6 +- .../layerAdditionRemoval.H | 6 +- .../layerAdditionRemoval/removeCellLayer.C | 4 +- .../perfectInterface/perfectInterface.C | 8 +- .../perfectInterface/perfectInterface.H | 4 +- .../attachPolyTopoChanger.C | 5 +- .../polyMeshModifier/polyMeshModifier.H | 4 +- .../polyTopoChange/removeFaces.C | 1084 +----- .../polyTopoChange/removeFaces.H | 32 +- .../polyTopoChange/removeFacesTemplates.C | 1112 ++++++ .../polyTopoChanger/polyTopoChanger.C | 67 +- .../polyTopoChanger/polyTopoChanger.H | 57 +- .../polyTopoChangerChangeMesh.C | 2431 ++++++++++++++ .../polyhedralRefinement.C | 2442 ++++++++++++++ .../polyhedralRefinement.H | 246 ++ .../prismatic2DRefinement.C | 2978 +++++++++++++++++ .../prismatic2DRefinement.H | 254 ++ .../refinement/refinement/refinement.C | 1489 +++++++++ .../refinement/refinement/refinement.H | 392 +++ .../refinement/refinement/refinementTools.H | 351 ++ src/dynamicMesh/setUpdater/setUpdater.C | 4 +- src/dynamicMesh/setUpdater/setUpdater.H | 2 +- .../slidingInterface/coupleSlidingInterface.C | 4 +- .../decoupleSlidingInterface.C | 4 +- .../slidingInterface/slidingInterface.C | 4 +- .../slidingInterface/slidingInterface.H | 8 +- .../slidingInterfaceClearCouple.C | 4 +- src/meshTools/Make/files | 2 + .../batchPolyTopoChange/batchPolyTopoChange.C | 417 +++ .../batchPolyTopoChange/batchPolyTopoChange.H | 256 ++ .../batchPolyTopoChangeI.H | 47 + src/meshTools/meshTools/meshTools.C | 154 + src/meshTools/meshTools/meshTools.H | 31 + src/topoChangerFvMesh/Make/files | 10 + src/topoChangerFvMesh/Make/options | 2 + .../dynamicMotionSolverTopoFvMesh.C | 2 +- .../movingConeTopoFvMesh.C | 2 +- .../rawTopoChangerFvMesh.C | 4 +- 45 files changed, 12849 insertions(+), 1123 deletions(-) create mode 100644 src/dynamicMesh/polyTopoChange/polyTopoChange/removeFacesTemplates.C create mode 100644 src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChangerChangeMesh.C create mode 100644 src/dynamicMesh/refinement/polyhedralRefinement/polyhedralRefinement.C create mode 100644 src/dynamicMesh/refinement/polyhedralRefinement/polyhedralRefinement.H create mode 100644 src/dynamicMesh/refinement/prismatic2DRefinement/prismatic2DRefinement.C create mode 100644 src/dynamicMesh/refinement/prismatic2DRefinement/prismatic2DRefinement.H create mode 100644 src/dynamicMesh/refinement/refinement/refinement.C create mode 100644 src/dynamicMesh/refinement/refinement/refinement.H create mode 100644 src/dynamicMesh/refinement/refinement/refinementTools.H create mode 100644 src/meshTools/batchPolyTopoChange/batchPolyTopoChange.C create mode 100644 src/meshTools/batchPolyTopoChange/batchPolyTopoChange.H create mode 100644 src/meshTools/batchPolyTopoChange/batchPolyTopoChangeI.H diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 15dd2c3043..930163451e 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -622,7 +622,7 @@ int main(int argc, char *argv[]) } // Execute all polyMeshModifiers - autoPtr morphMap = stitcher.changeMesh(true); + autoPtr morphMap = stitcher.changeMesh(); mesh.movePoints(morphMap->preMotionPoints()); diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files index d87341be3e..ea83ff7cc4 100644 --- a/src/dynamicMesh/Make/files +++ b/src/dynamicMesh/Make/files @@ -22,6 +22,7 @@ $(polyMeshModifier)/polyMeshModifier.C $(polyMeshModifier)/polyMeshModifierNew.C polyTopoChange/polyTopoChanger/polyTopoChanger.C +polyTopoChange/polyTopoChanger/polyTopoChangerChangeMesh.C polyTopoChange/polyTopoChange/addPatchCellLayer.C polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapse.C polyTopoChange/polyTopoChange/edgeCollapser.C @@ -76,6 +77,10 @@ meshCut/refineCell/refineCell.C meshCut/wallLayerCells/wallLayerCells.C meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.C +refinement/refinement/refinement.C +refinement/polyhedralRefinement/polyhedralRefinement.C +refinement/prismatic2DRefinement/prismatic2DRefinement.C + polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C diff --git a/src/dynamicMesh/attachDetach/attachDetach.C b/src/dynamicMesh/attachDetach/attachDetach.C index 51e9143730..0a3c6d529f 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.C +++ b/src/dynamicMesh/attachDetach/attachDetach.C @@ -31,7 +31,7 @@ License #include "polyMesh.H" #include "Time.H" #include "primitiveMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -365,7 +365,7 @@ bool Foam::attachDetach::changeTopology() const } -void Foam::attachDetach::setRefinement(polyTopoChange& ref) const +void Foam::attachDetach::setRefinement(batchPolyTopoChange& ref) const { // Insert the attach/detach instructions into the topological change diff --git a/src/dynamicMesh/attachDetach/attachDetach.H b/src/dynamicMesh/attachDetach/attachDetach.H index eecc3f1ba0..0d4c646520 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.H +++ b/src/dynamicMesh/attachDetach/attachDetach.H @@ -122,10 +122,10 @@ class attachDetach // Topological changes //- Attach interface - void attachInterface(polyTopoChange&) const; + void attachInterface(batchPolyTopoChange&) const; //- Detach interface - void detachInterface(polyTopoChange&) const; + void detachInterface(batchPolyTopoChange&) const; //- Calculate point match addressing void calcPointMatchMap() const; @@ -215,7 +215,7 @@ public: //- Insert the layer addition/removal instructions // into the topological change - virtual void setRefinement(polyTopoChange&) const; + virtual void setRefinement(batchPolyTopoChange&) const; //- Modify motion points to comply with the topological change virtual void modifyMotionPoints(pointField& motionPoints) const; diff --git a/src/dynamicMesh/attachDetach/attachInterface.C b/src/dynamicMesh/attachDetach/attachInterface.C index 70e996d297..1da8367b0d 100644 --- a/src/dynamicMesh/attachDetach/attachInterface.C +++ b/src/dynamicMesh/attachDetach/attachInterface.C @@ -29,7 +29,7 @@ License #include "attachDetach.H" #include "polyMesh.H" #include "primitiveMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "polyTopoChanger.H" #include "polyRemovePoint.H" #include "polyRemoveFace.H" @@ -43,7 +43,7 @@ const Foam::scalar Foam::attachDetach::positionDifference_ = 1e-8; void Foam::attachDetach::attachInterface ( - polyTopoChange& ref + batchPolyTopoChange& ref ) const { // Algorithm: @@ -62,7 +62,7 @@ void Foam::attachDetach::attachInterface if (debug) { Pout<< "void attachDetach::attachInterface(" - << "polyTopoChange& ref) const " + << "batchPolyTopoChange& ref) const " << " for object " << name() << " : " << "Attaching interface" << endl; } @@ -266,7 +266,7 @@ void Foam::attachDetach::attachInterface if (debug) { Pout<< "void attachDetach::attachInterface(" - << "polyTopoChange& ref) const " + << "batchPolyTopoChange& ref) const " << " for object " << name() << " : " << "Finished attaching interface" << endl; } diff --git a/src/dynamicMesh/attachDetach/detachInterface.C b/src/dynamicMesh/attachDetach/detachInterface.C index 34f94d4cad..35d06ec761 100644 --- a/src/dynamicMesh/attachDetach/detachInterface.C +++ b/src/dynamicMesh/attachDetach/detachInterface.C @@ -28,7 +28,7 @@ License #include "attachDetach.H" #include "polyMesh.H" #include "primitiveMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "polyTopoChanger.H" #include "polyAddPoint.H" #include "polyModifyFace.H" @@ -38,7 +38,7 @@ License void Foam::attachDetach::detachInterface ( - polyTopoChange& ref + batchPolyTopoChange& ref ) const { // Algorithm: @@ -66,7 +66,7 @@ void Foam::attachDetach::detachInterface if (debug) { Pout<< "void attachDetach::detachInterface(" - << "polyTopoChange& ref) const " + << "batchPolyTopoChange& ref) const " << " for object " << name() << " : " << "Detaching interface" << endl; } @@ -75,7 +75,7 @@ void Foam::attachDetach::detachInterface const faceZoneMesh& zoneMesh = mesh.faceZones(); // Check that zone is in increasing order (needed since adding faces - // in same order - otherwise polyTopoChange face ordering will mess up + // in same order - otherwise batchPolyTopoChange face ordering will mess up // correspondence) if (debug) { @@ -467,7 +467,7 @@ void Foam::attachDetach::detachInterface if (debug) { Pout<< "void attachDetach::detachInterface(" - << "polyTopoChange& ref) const " + << "batchPolyTopoChange& ref) const " << " for object " << name() << " : " << "Finished detaching interface" << endl; } diff --git a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C index 2c6eb27b36..569f389186 100644 --- a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C @@ -29,7 +29,7 @@ License #include "layerAdditionRemoval.H" #include "polyMesh.H" #include "primitiveMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "polyTopoChanger.H" #include "polyAddPoint.H" #include "polyAddCell.H" @@ -88,7 +88,7 @@ Foam::tmp Foam::layerAdditionRemoval::extrusionDir() const void Foam::layerAdditionRemoval::addCellLayer ( - polyTopoChange& ref + batchPolyTopoChange& ref ) const { // Insert the layer addition instructions into the topological change @@ -108,7 +108,7 @@ void Foam::layerAdditionRemoval::addCellLayer if (debug) { Pout<< "void layerAdditionRemoval::addCellLayer(" - << "polyTopoChange& ref) const for object " << name() << " : " + << "batchPolyTopoChange& ref) const for object " << name() << " : " << "Adding cell layer" << endl; } @@ -682,7 +682,7 @@ void Foam::layerAdditionRemoval::addCellLayer if (debug) { - Pout<< "void layerAdditionRemoval::addCellLayer(polyTopoChange&) const " + Pout<< "void layerAdditionRemoval::addCellLayer(batchPolyTopoChange&) const " << " for object " << name() << ": " << "Finished adding cell layer" << endl; } diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C index d7baa813f4..507d559c98 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C @@ -355,7 +355,7 @@ bool Foam::layerAdditionRemoval::changeTopology() const } -void Foam::layerAdditionRemoval::setRefinement(polyTopoChange& ref) const +void Foam::layerAdditionRemoval::setRefinement(batchPolyTopoChange& ref) const { // Insert the layer addition/removal instructions // into the topological change @@ -367,7 +367,7 @@ void Foam::layerAdditionRemoval::setRefinement(polyTopoChange& ref) const // Clear addressing. This also resets the addition/removal data if (debug) { - Pout<< "layerAdditionRemoval::setRefinement(polyTopoChange&) " + Pout<< "layerAdditionRemoval::setRefinement(batchPolyTopoChange&) " << "for object " << name() << " : " << "Clearing addressing after layer removal" << endl; } @@ -383,7 +383,7 @@ void Foam::layerAdditionRemoval::setRefinement(polyTopoChange& ref) const // Clear addressing. This also resets the addition/removal data if (debug) { - Pout<< "layerAdditionRemoval::setRefinement(polyTopoChange&) " + Pout<< "layerAdditionRemoval::setRefinement(batchPolyTopoChange&) " << "for object " << name() << " : " << "Clearing addressing after layer addition" << endl; } diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.H b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.H index 25e5e68327..45c983b5dc 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.H +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.H @@ -119,10 +119,10 @@ class layerAdditionRemoval tmp extrusionDir() const; //- Add a layer of cells - void addCellLayer(polyTopoChange&) const; + void addCellLayer(batchPolyTopoChange&) const; //- Remove a layer of cells - void removeCellLayer(polyTopoChange&) const; + void removeCellLayer(batchPolyTopoChange&) const; //- Clear addressing void clearAddressing() const; @@ -179,7 +179,7 @@ public: //- Insert the layer addition/removal instructions // into the topological change - virtual void setRefinement(polyTopoChange&) const; + virtual void setRefinement(batchPolyTopoChange&) const; //- Modify motion points to comply with the topological change virtual void modifyMotionPoints(pointField& motionPoints) const; diff --git a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C index e04075d2e0..9dd6fa51cf 100644 --- a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C @@ -29,7 +29,7 @@ License #include "layerAdditionRemoval.H" #include "polyMesh.H" #include "primitiveMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "oppositeFace.H" #include "polyTopoChanger.H" #include "polyRemoveCell.H" @@ -83,7 +83,7 @@ bool Foam::layerAdditionRemoval::validCollapse() const void Foam::layerAdditionRemoval::removeCellLayer ( - polyTopoChange& ref + batchPolyTopoChange& ref ) const { // Algorithm for layer removal. Second phase: topological change diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index da1cc5130f..b4c973f8e8 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.C @@ -33,7 +33,7 @@ Description #include "perfectInterface.H" #include "polyTopoChanger.H" #include "polyMesh.H" -#include "polyTopoChange.H" +#include "batchPolyTopoChange.H" #include "addToRunTimeSelectionTable.H" #include "mapPolyMesh.H" #include "matchPoints.H" @@ -154,7 +154,7 @@ void Foam::perfectInterface::setRefinement ( const indirectPrimitivePatch& pp0, const indirectPrimitivePatch& pp1, - polyTopoChange& ref + batchPolyTopoChange& ref ) const { const polyMesh& mesh = topoChanger().mesh(); @@ -423,11 +423,11 @@ void Foam::perfectInterface::setRefinement } -void Foam::perfectInterface::setRefinement(polyTopoChange& ref) const +void Foam::perfectInterface::setRefinement(batchPolyTopoChange& ref) const { if (debug) { - Pout<< "bool perfectInterface::setRefinement(polyTopoChange&) const : " + Pout<< "bool perfectInterface::setRefinement(batchPolyTopoChange&) const : " << "for object " << name() << " : " << "masterPatchID_:" << masterPatchID_ << " slavePatchID_:" << slavePatchID_ diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.H b/src/dynamicMesh/perfectInterface/perfectInterface.H index 20352c4bee..f5895723dc 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.H +++ b/src/dynamicMesh/perfectInterface/perfectInterface.H @@ -129,7 +129,7 @@ public: //- Insert the layer addition/removal instructions // into the topological change - virtual void setRefinement(polyTopoChange&) const; + virtual void setRefinement(batchPolyTopoChange&) const; //- Insert the layer addition/removal instructions // into the topological change. Uses only mesh, not any of the @@ -139,7 +139,7 @@ public: ( const indirectPrimitivePatch& pp0, const indirectPrimitivePatch& pp1, - polyTopoChange& + batchPolyTopoChange& ) const; //- Modify motion points to comply with the topological change diff --git a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C index a88b03e5d5..a11a743f32 100644 --- a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C @@ -65,7 +65,10 @@ void Foam::attachPolyTopoChanger::attach(const bool removeEmptyPatches) const fileName oldInst = mesh_.facesInstance(); // Execute all polyMeshModifiers - changeMesh(false); // no inflation + // DISABLED - this functionality is lost + // Bad rewrite by Mattijs Janssens - completely misunderstood the interface + // Needs to use polyTopoChange, and not changer. + // changeMesh(false); // no inflation const pointField p = mesh_.oldPoints(); diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifier.H b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifier.H index 62bc93bcfc..48f9936795 100644 --- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifier.H +++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifier.H @@ -55,7 +55,7 @@ namespace Foam // Forward Declarations class polyTopoChanger; -class polyTopoChange; +class batchPolyTopoChange; class mapPolyMesh; class polyMeshModifier; @@ -166,7 +166,7 @@ public: virtual bool changeTopology() const = 0; //- Insert the topological change instructions - virtual void setRefinement(polyTopoChange&) const = 0; + virtual void setRefinement(batchPolyTopoChange&) const = 0; //- Modify motion points to comply with the topological change virtual void modifyMotionPoints(pointField& motionPoints) const = 0; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C index 2c4cae838d..36f7ff456c 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C @@ -77,6 +77,62 @@ void Foam::removeFaces::changeCellRegion } +Foam::label Foam::removeFaces::changeFaceRegion +( + const labelList& cellRegion, + const boolList& removedFace, + const labelList& nFacesPerEdge, + const label faceI, + const label newRegion, + + labelList& faceRegion +) const +{ + // Count number of changed faces + label nChanged = 0; + + if (faceRegion[faceI] == -1 && !removedFace[faceI]) + { + faceRegion[faceI] = newRegion; + + nChanged = 1; + + // Get mesh data + const labelListList& meshFaceEdges = mesh_.faceEdges(); + const labelListList& meshEdgeFaces = mesh_.edgeFaces(); + + // Step to neighbouring faces across edges that will get removed + const labelList& fEdges = meshFaceEdges[faceI]; + + forAll(fEdges, i) + { + const label& edgeI = fEdges[i]; + + if (nFacesPerEdge[edgeI] >= 0 && nFacesPerEdge[edgeI] <= 2) + { + const labelList& eFaces = meshEdgeFaces[edgeI]; + + forAll(eFaces, j) + { + nChanged += changeFaceRegion + ( + cellRegion, + removedFace, + nFacesPerEdge, + eFaces[j], + newRegion, + + faceRegion + ); + } + } + } + } + + return nChanged; +} + + // Changes region of connected set of faces. Returns number of changed faces. Foam::label Foam::removeFaces::changeFaceRegion ( @@ -231,187 +287,6 @@ void Foam::removeFaces::writeOBJ } -// Inserts commands to merge faceLabels into one face. -void Foam::removeFaces::mergeFaces -( - const labelList& cellRegion, - const labelList& cellRegionMaster, - const labelHashSet& pointsToRemove, - const labelList& faceLabels, - polyTopoChange& meshMod -) const -{ - // Construct addressing engine from faceLabels (in order of faceLabels as - // well) - indirectPrimitivePatch fp - ( - IndirectList - ( - mesh_.faces(), - faceLabels - ), - mesh_.points() - ); - - // Get outside vertices (in local vertex numbering) - - if (fp.edgeLoops().size() != 1) - { - writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj"); - FatalErrorInFunction - << "Cannot merge faces " << faceLabels - << " into single face since outside vertices " << fp.edgeLoops() - << " do not form single loop but form " << fp.edgeLoops().size() - << " loops instead." << abort(FatalError); - } - - const labelList& edgeLoop = fp.edgeLoops()[0]; - - // Get outside vertices in order of one of the faces in faceLabels. - // (this becomes the master face) - // Find the first face that uses edgeLoop[0] and edgeLoop[1] as consecutive - // vertices. - - label masterIndex = -1; - bool reverseLoop = false; - - const labelList& pFaces = fp.pointFaces()[edgeLoop[0]]; - - // Find face among pFaces which uses edgeLoop[1] - forAll(pFaces, i) - { - label facei = pFaces[i]; - - const face& f = fp.localFaces()[facei]; - - label index1 = f.find(edgeLoop[1]); - - if (index1 != -1) - { - // Check whether consecutive to edgeLoop[0] - label index0 = f.find(edgeLoop[0]); - - if (index0 != -1) - { - if (index1 == f.fcIndex(index0)) - { - masterIndex = facei; - reverseLoop = false; - break; - } - else if (index1 == f.rcIndex(index0)) - { - masterIndex = facei; - reverseLoop = true; - break; - } - } - } - } - - if (masterIndex == -1) - { - writeOBJ(fp, mesh_.time().path()/"facesToBeMerged.obj"); - FatalErrorInFunction - << "Problem" << abort(FatalError); - } - - - // Modify the master face. - // ~~~~~~~~~~~~~~~~~~~~~~~ - - // Modify first face. - label facei = faceLabels[masterIndex]; - - label own = mesh_.faceOwner()[facei]; - - if (cellRegion[own] != -1) - { - own = cellRegionMaster[cellRegion[own]]; - } - - label patchID, zoneID, zoneFlip; - - getFaceInfo(facei, patchID, zoneID, zoneFlip); - - label nei = -1; - - if (mesh_.isInternalFace(facei)) - { - nei = mesh_.faceNeighbour()[facei]; - - if (cellRegion[nei] != -1) - { - nei = cellRegionMaster[cellRegion[nei]]; - } - } - - - DynamicList