From b1025f1849f0ce87ce2b7dac1112ac4cbeed43a7 Mon Sep 17 00:00:00 2001
From: mattijs <mattijs>
Date: Mon, 15 Jul 2013 15:33:08 +0100
Subject: [PATCH] ENH: GAMG: support for cyclicSlip

---
 .../cyclicGAMGInterface/cyclicGAMGInterface.C | 35 +++++++++++--------
 .../cyclicGAMGInterface/cyclicGAMGInterface.H |  8 -----
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
index d3edafc63a9..cbfe955b4f0 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.C
@@ -45,6 +45,25 @@ namespace Foam
         cyclicGAMGInterface,
         Istream
     );
+
+
+    // Add under name cyclicSlip
+    addNamedToRunTimeSelectionTable
+    (
+        GAMGInterface,
+        cyclicGAMGInterface,
+        lduInterface,
+        cyclicSlip
+    );
+    addNamedToRunTimeSelectionTable
+    (
+        GAMGInterface,
+        cyclicGAMGInterface,
+        Istream,
+        cyclicSlip
+    );
+
+
 }
 
 
@@ -61,15 +80,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
     const label coarseComm
 )
 :
-    GAMGInterface
-    (
-        index,
-        coarseInterfaces
-//        fineInterface,
-//        localRestrictAddressing,
-//        neighbourRestrictAddressing
-    ),
-    //fineCyclicInterface_(refCast<const cyclicLduInterface>(fineInterface))
+    GAMGInterface(index, coarseInterfaces),
     neighbPatchID_
     (
         refCast<const cyclicLduInterface>(fineInterface).neighbPatchID()
@@ -169,11 +180,7 @@ Foam::tmp<Foam::labelField> Foam::cyclicGAMGInterface::internalFieldTransfer
     const labelUList& iF
 ) const
 {
-    const cyclicGAMGInterface& nbr =
-    //dynamic_cast<const cyclicGAMGInterface&>
-    //(
-        neighbPatch();
-    //);
+    const cyclicGAMGInterface& nbr = neighbPatch();
     const labelUList& nbrFaceCells = nbr.faceCells();
 
     tmp<labelField> tpnf(new labelField(size()));
diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H
index bd4091d6abd..6ee0b5d3aa5 100644
--- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H
+++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/cyclicGAMGInterface/cyclicGAMGInterface.H
@@ -54,10 +54,6 @@ class cyclicGAMGInterface
 {
     // Private data
 
-//        //- Reference tor the cyclicLduInterface from which this is
-//        //  agglomerated
-//        const cyclicLduInterface& fineCyclicInterface_;
-
         //- Neigbour patch number
         label neighbPatchID_;
 
@@ -131,13 +127,11 @@ public:
             //- Return neigbour processor number
             virtual label neighbPatchID() const
             {
-                //return fineCyclicInterface_.neighbPatchID();
                 return neighbPatchID_;
             }
 
             virtual bool owner() const
             {
-                //return fineCyclicInterface_.owner();
                 return owner_;
             }
 
@@ -152,14 +146,12 @@ public:
             //- Return face transformation tensor
             virtual const tensorField& forwardT() const
             {
-                //return fineCyclicInterface_.forwardT();
                 return forwardT_;
             }
 
             //- Return neighbour-cell transformation tensor
             virtual const tensorField& reverseT() const
             {
-                //return fineCyclicInterface_.reverseT();
                 return reverseT_;
             }
 
-- 
GitLab