From fabad09fd4d0d715485d018bbc774b7fedf42d7b Mon Sep 17 00:00:00 2001
From: kutscher <kutscher@irmb.tu-bs.de>
Date: Tue, 3 Aug 2021 16:26:31 +0200
Subject: [PATCH] renaming and refactoring for double ghost layer

---
 apps/cpu/Multiphase/Multiphase.cpp            | 20 ++++----
 apps/cpu/MultiphaseDropletTest/droplet.cpp    |  5 +-
 src/cpu/VirtualFluids.h                       |  4 +-
 .../WriteMultiphaseQuantitiesCoProcessor.cpp  | 34 +++++++++-----
 ...nsDoubleGhostLayerFullDirectConnector.cpp} | 12 ++---
 ...ionsDoubleGhostLayerFullDirectConnector.h} | 14 +++---
 ...nsDoubleGhostLayerFullVectorConnector.cpp} | 27 ++++-------
 ...ionsDoubleGhostLayerFullVectorConnector.h} | 16 +++----
 src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp     | 12 ++++-
 src/cpu/VirtualFluidsCore/Grid/Grid3D.h       |  9 ++--
 ...TwoPhaseFieldsPressureFilterLBMKernel.cpp} | 46 +++++++++----------
 ...seTwoPhaseFieldsPressureFilterLBMKernel.h} | 12 ++---
 .../Visitors/SetConnectorsBlockVisitor.h      |  6 +--
 13 files changed, 116 insertions(+), 101 deletions(-)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThreeDistributionsFullDirectConnector2.cpp => ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp} (96%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThreeDistributionsFullDirectConnector2.h => ThreeDistributionsDoubleGhostLayerFullDirectConnector.h} (96%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThreeDistributionsFullVectorConnector2.cpp => ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp} (97%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThreeDistributionsFullVectorConnector2.h => ThreeDistributionsDoubleGhostLayerFullVectorConnector.h} (96%)
 rename src/cpu/VirtualFluidsCore/LBM/{MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.cpp => MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp} (98%)
 rename src/cpu/VirtualFluidsCore/LBM/{MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h => MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h} (93%)

diff --git a/apps/cpu/Multiphase/Multiphase.cpp b/apps/cpu/Multiphase/Multiphase.cpp
index a0972b8fd..be017881c 100644
--- a/apps/cpu/Multiphase/Multiphase.cpp
+++ b/apps/cpu/Multiphase/Multiphase.cpp
@@ -85,10 +85,11 @@ void run(string configname)
 
         SPtr<LBMKernel> kernel;
 
-        kernel = SPtr<LBMKernel>(new MultiphaseScratchCumulantLBMKernel());
+        //kernel = SPtr<LBMKernel>(new MultiphaseScratchCumulantLBMKernel());
         //kernel = SPtr<LBMKernel>(new MultiphaseCumulantLBMKernel());
         //kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsCumulantLBMKernel());
-                kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel());
+        //kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel());
+        kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsPressureFilterLBMKernel());
 
         kernel->setWithForcing(true);
         kernel->setForcingX1(0.0);
@@ -109,15 +110,16 @@ void run(string configname)
         // grid->setPeriodicX1(true);
         // grid->setPeriodicX2(true);
         // grid->setPeriodicX3(true);
+        grid->setGhostLayerWidth(2);
         //////////////////////////////////////////////////////////////////////////
         // restart
         SPtr<UbScheduler> rSch(new UbScheduler(cpStep, cpStart));
         //SPtr<MPIIORestartCoProcessor> rcp(new MPIIORestartCoProcessor(grid, rSch, pathname, comm));
-        //SPtr<MPIIOMigrationCoProcessor> rcp(new MPIIOMigrationCoProcessor(grid, rSch, pathname, comm));
-        SPtr<MPIIOMigrationBECoProcessor> rcp(new MPIIOMigrationBECoProcessor(grid, rSch, pathname, comm));
-        rcp->setNu(nuLB);
-        rcp->setNuLG(nuL, nuG);
-        rcp->setDensityRatio(densityRatio);
+        SPtr<MPIIOMigrationCoProcessor> rcp(new MPIIOMigrationCoProcessor(grid, rSch, pathname, comm));
+        //SPtr<MPIIOMigrationBECoProcessor> rcp(new MPIIOMigrationBECoProcessor(grid, rSch, pathname, comm));
+        //rcp->setNu(nuLB);
+        //rcp->setNuLG(nuL, nuG);
+        //rcp->setDensityRatio(densityRatio);
 
         rcp->setLBMKernel(kernel);
         rcp->setBCProcessor(bcProc);
@@ -392,7 +394,9 @@ void run(string configname)
       //  TwoDistributionsSetConnectorsBlockVisitor setConnsVisitor(comm);
       //  grid->accept(setConnsVisitor);
 
-        ThreeDistributionsSetConnectorsBlockVisitor setConnsVisitor(comm);
+       //ThreeDistributionsSetConnectorsBlockVisitor setConnsVisitor(comm);
+
+        ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm);
         grid->accept(setConnsVisitor);
 
         SPtr<UbScheduler> visSch(new UbScheduler(outTime));
diff --git a/apps/cpu/MultiphaseDropletTest/droplet.cpp b/apps/cpu/MultiphaseDropletTest/droplet.cpp
index 01660db88..a6892cad1 100644
--- a/apps/cpu/MultiphaseDropletTest/droplet.cpp
+++ b/apps/cpu/MultiphaseDropletTest/droplet.cpp
@@ -80,7 +80,7 @@ void run(string configname)
 
         //kernel = SPtr<LBMKernel>(new MultiphaseScratchCumulantLBMKernel());
         //kernel = SPtr<LBMKernel>(new MultiphaseCumulantLBMKernel());
-        kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2());
+        kernel = SPtr<LBMKernel>(new MultiphaseTwoPhaseFieldsPressureFilterLBMKernel());
 
         kernel->setWithForcing(true);
         kernel->setForcingX1(gr);
@@ -103,6 +103,7 @@ void run(string configname)
         grid->setPeriodicX1(true);
         grid->setPeriodicX2(true);
         grid->setPeriodicX3(true);
+        grid->setGhostLayerWidth(2);
 
         //////////////////////////////////////////////////////////////////////////
         // restart
@@ -260,7 +261,7 @@ void run(string configname)
         //TwoDistributionsSetConnectorsBlockVisitor setConnsVisitor(comm);
         //grid->accept(setConnsVisitor);
 
-        ThreeDistributionsSetConnectorsBlockVisitor2 setConnsVisitor(comm);
+        ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor setConnsVisitor(comm);
         grid->accept(setConnsVisitor);
 
         SPtr<UbScheduler> visSch(new UbScheduler(outTime));
diff --git a/src/cpu/VirtualFluids.h b/src/cpu/VirtualFluids.h
index 9020eab4f..315de6dd7 100644
--- a/src/cpu/VirtualFluids.h
+++ b/src/cpu/VirtualFluids.h
@@ -153,7 +153,7 @@
 #include <Connectors/RemoteBlock3DConnector.h>
 #include <Connectors/TwoDistributionsFullDirectConnector.h>
 #include <Connectors/TwoDistributionsFullVectorConnector.h>
-#include <Connectors/ThreeDistributionsFullDirectConnector2.h>
+
 
 #include <Data/D3Q27EsoTwist3DSplittedVector.h>
 #include <Data/D3Q27EsoTwist3DSplittedVectorEx.h>
@@ -246,7 +246,7 @@
 #include <LBM/MultiphaseScratchCumulantLBMKernel.h>
 #include <LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.h>
 #include <LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.h>
-#include <LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h>
+#include <LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h>
 
 
 
diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
index 42cec5c5e..37eb51038 100644
--- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
@@ -36,7 +36,6 @@
 #include "LBMKernel.h"
 #include <string>
 #include <vector>
-#include "MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h"
 
 #include "BCArray3D.h"
 #include "Block3D.h"
@@ -198,9 +197,16 @@ void WriteMultiphaseQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block)
     int maxX2 = (int)(distributionsF->getNX2());
     int maxX3 = (int)(distributionsF->getNX3());
 
-    int minX1 = 1;
-    int minX2 = 1;
-    int minX3 = 1;
+    int minX1 = 0;
+    int minX2 = 0;
+    int minX3 = 0;
+    
+    if (kernel->getGhostLayerWidth() == 2)
+    {
+        minX1 = 1;
+        minX2 = 1;
+        minX3 = 1;
+    }
 
     // int maxX1 = (int)(distributions->getNX1());
     // int maxX2 = (int)(distributions->getNX2());
@@ -238,15 +244,19 @@ void WriteMultiphaseQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block)
         }
     }
 
-    maxX1 -= 3;
-    maxX2 -= 3;
-    maxX3 -= 3;
-
-    // maxX1 -= 1;
-    // maxX2 -= 1;
-    // maxX3 -= 1;
+    if (kernel->getGhostLayerWidth() == 1)
+    {
+        maxX1 -= 2;
+        maxX2 -= 2;
+        maxX3 -= 2;
+    }
+    else if (kernel->getGhostLayerWidth() == 2)
+    {
+        maxX1 -= 3;
+        maxX2 -= 3;
+        maxX3 -= 3;
+    }
 
-    // D3Q27BoundaryConditionPtr bcPtr;
     int nr = (int)nodes.size();
     LBMReal dX1_phi;
     LBMReal dX2_phi;
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.cpp b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
similarity index 96%
rename from src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.cpp
rename to src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
index 78cc34f20..d0ff594f7 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
@@ -26,22 +26,22 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file ThreeDistributionsFullDirectConnector2.cpp
+//! \file ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
 //! \ingroup Connectors
 //! \author Konstantin Kutscher
 //=======================================================================================
 
-#include "ThreeDistributionsFullDirectConnector2.h"
+#include "ThreeDistributionsDoubleGhostLayerFullDirectConnector.h"
 #include "LBMKernel.h"
 #include "DataSet3D.h"
 
-ThreeDistributionsFullDirectConnector2::ThreeDistributionsFullDirectConnector2(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir)
+ThreeDistributionsDoubleGhostLayerFullDirectConnector::ThreeDistributionsDoubleGhostLayerFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir)
     : FullDirectConnector(from, to, sendDir)
 {
 
 }
 //////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullDirectConnector2::init()
+void ThreeDistributionsDoubleGhostLayerFullDirectConnector::init()
 {
     FullDirectConnector::init();
 
@@ -55,13 +55,13 @@ void ThreeDistributionsFullDirectConnector2::init()
     pressureTo   = to.lock()->getKernel()->getDataSet()->getPressureField();
 }
 //////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullDirectConnector2::sendVectors()
+void ThreeDistributionsDoubleGhostLayerFullDirectConnector::sendVectors()
 {
     updatePointers();
     exchangeData();
 }
 //////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullDirectConnector2::exchangeData()
+void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
 {
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.h b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.h
similarity index 96%
rename from src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.h
rename to src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.h
index 3375f570d..1f53ca70a 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullDirectConnector2.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.h
@@ -26,13 +26,13 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file ThreeDistributionsFullDirectConnector2.h
+//! \file ThreeDistributionsDoubleGhostLayerFullDirectConnector.h
 //! \ingroup Connectors
 //! \author Konstantin Kutscher
 //=======================================================================================
 
-#ifndef ThreeDistributionsFullDirectConnector2_H
-#define ThreeDistributionsFullDirectConnector2_H
+#ifndef ThreeDistributionsDoubleGhostLayerFullDirectConnector_H
+#define ThreeDistributionsDoubleGhostLayerFullDirectConnector_H
 
 #include "FullDirectConnector.h"
 #include "Block3D.h"
@@ -45,10 +45,10 @@
 //! \brief   Exchange data between blocks. 
 //! \details Connector send and receive full distributions between two blocks in shared memory.
 
-class ThreeDistributionsFullDirectConnector2 : public FullDirectConnector
+class ThreeDistributionsDoubleGhostLayerFullDirectConnector : public FullDirectConnector
 {
 public:
-	ThreeDistributionsFullDirectConnector2(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir);
+	ThreeDistributionsDoubleGhostLayerFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir);
     void init() override;
     void sendVectors() override;
 
@@ -88,7 +88,7 @@ private:
     SPtr<PressureFieldArray3D> pressureFrom, pressureTo;
 };
 //////////////////////////////////////////////////////////////////////////
-inline void ThreeDistributionsFullDirectConnector2::updatePointers()
+inline void ThreeDistributionsDoubleGhostLayerFullDirectConnector::updatePointers()
 {
     localDistributionsFromf = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getLocalDistributions();
     nonLocalDistributionsFromf = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getNonLocalDistributions();
@@ -115,7 +115,7 @@ inline void ThreeDistributionsFullDirectConnector2::updatePointers()
     zeroDistributionsToh2     = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->hTo2)->getZeroDistributions();
 }
 //////////////////////////////////////////////////////////////////////////
-inline void ThreeDistributionsFullDirectConnector2::exchangeData(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
+inline void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
 {
 	(*this->localDistributionsTof)(D3Q27System::ET_E, x1To, x2To, x3To) = (*this->localDistributionsFromf)(D3Q27System::ET_E, x1From, x2From, x3From);
 	(*this->localDistributionsTof)(D3Q27System::ET_N, x1To, x2To, x3To) = (*this->localDistributionsFromf)(D3Q27System::ET_N, x1From, x2From, x3From);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.cpp b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
similarity index 97%
rename from src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.cpp
rename to src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
index c8528b1e7..39b98661a 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
@@ -26,19 +26,19 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file ThreeDistributionsFullVectorConnector2.cpp
+//! \file ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
 //! \ingroup Connectors
 //! \author Konstantin Kutscher
 //=======================================================================================
 
-#include "ThreeDistributionsFullVectorConnector2.h"
+#include "ThreeDistributionsDoubleGhostLayerFullVectorConnector.h"
 #include "Block3D.h"
 #include "LBMKernel.h"
 #include "EsoTwist3D.h"
 #include "DataSet3D.h"
 
 //////////////////////////////////////////////////////////////////////////
-ThreeDistributionsFullVectorConnector2::ThreeDistributionsFullVectorConnector2(SPtr<Block3D> block,
+ThreeDistributionsDoubleGhostLayerFullVectorConnector::ThreeDistributionsDoubleGhostLayerFullVectorConnector(SPtr<Block3D> block,
                                                                          VectorTransmitterPtr sender,
                                                                          VectorTransmitterPtr receiver, int sendDir)
     : FullVectorConnector(block, sender, receiver, sendDir)
@@ -48,7 +48,7 @@ ThreeDistributionsFullVectorConnector2::ThreeDistributionsFullVectorConnector2(S
 
 }
 //////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullVectorConnector2::init()
+void ThreeDistributionsDoubleGhostLayerFullVectorConnector::init()
 {
    FullVectorConnector::init();
 
@@ -96,13 +96,13 @@ void ThreeDistributionsFullVectorConnector2::init()
    }
 }
 //////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullVectorConnector2::fillSendVectors() 
+void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillSendVectors() 
 { 
     updatePointers();
     fillData();
 }
 ////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullVectorConnector2::fillData()
+void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
 {
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
@@ -359,13 +359,13 @@ void ThreeDistributionsFullVectorConnector2::fillData()
         UB_THROW(UbException(UB_EXARGS, "unknown dir"));
 }
 ////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullVectorConnector2::distributeReceiveVectors() 
+void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeReceiveVectors() 
 {
     updatePointers();
     distributeData();
 }
 ////////////////////////////////////////////////////////////////////////
-void ThreeDistributionsFullVectorConnector2::distributeData()
+void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
 {
     vector_type &rdata = receiver->getData();
 
@@ -400,7 +400,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
     int maxX3m2 = maxX3 - 2;
     int maxX3m3 = maxX3 - 3;
 
-    // EAST
     if (sendDir == D3Q27System::W) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
@@ -409,7 +408,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-    // WEST
     else if (sendDir == D3Q27System::E) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
@@ -418,7 +416,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-    // NORTH
     else if (sendDir == D3Q27System::S) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
@@ -427,7 +424,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-    // SOUTH
     else if (sendDir == D3Q27System::N) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
@@ -436,8 +432,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-
-    // TOP
     else if (sendDir == D3Q27System::B) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
@@ -446,7 +440,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-    // BOTTOM
     else if (sendDir == D3Q27System::T) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
@@ -455,7 +448,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             }
         }
     }
-    // NORTHEAST
     else if (sendDir == D3Q27System::SW) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, minX2, x3);
@@ -464,7 +456,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             distributeData(rdata, index, minX1p1, minX2, x3);
         }
     }
-    // NORTHWEST
     else if (sendDir == D3Q27System::SE) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, minX2, x3);
@@ -473,7 +464,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             distributeData(rdata, index, maxX1m1, minX2, x3);
         }
     }
-    // SOUTHWEST
     else if (sendDir == D3Q27System::NE) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, maxX2, x3);
@@ -482,7 +472,6 @@ void ThreeDistributionsFullVectorConnector2::distributeData()
             distributeData(rdata, index, maxX1m1, maxX2, x3);
         }
     }
-    // SOUTHEAST
     else if (sendDir == D3Q27System::NW) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, maxX2, x3);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.h b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.h
similarity index 96%
rename from src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.h
rename to src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.h
index eb3c1e084..408a8e79d 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector2.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.h
@@ -26,13 +26,13 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file ThreeDistributionsFullVectorConnector2.h
+//! \file ThreeDistributionsDoubleGhostLayerFullVectorConnector.h
 //! \ingroup Connectors
 //! \author Konstantin Kutscher
 //=======================================================================================
 
-#ifndef ThreeDistributionsFullVectorConnector2_H
-#define ThreeDistributionsFullVectorConnector2_H
+#ifndef ThreeDistributionsDoubleGhostLayerFullVectorConnector_H
+#define ThreeDistributionsDoubleGhostLayerFullVectorConnector_H
 
 #include <vector>
 
@@ -50,10 +50,10 @@ class Block3D;
 //der vector wird via transmitter uebertragen
 //transmitter kann ein lokal, MPI, RCG, CTL oder was auch immer fuer ein
 //transmitter sein, der von Transmitter abgeleitet ist ;-)
-class ThreeDistributionsFullVectorConnector2 : public FullVectorConnector
+class ThreeDistributionsDoubleGhostLayerFullVectorConnector : public FullVectorConnector
 {
 public:
-   ThreeDistributionsFullVectorConnector2(SPtr<Block3D> block, VectorTransmitterPtr sender, VectorTransmitterPtr receiver, int sendDir);
+   ThreeDistributionsDoubleGhostLayerFullVectorConnector(SPtr<Block3D> block, VectorTransmitterPtr sender, VectorTransmitterPtr receiver, int sendDir);
 
    void init() override;
 
@@ -90,7 +90,7 @@ private:
 
 };
 //////////////////////////////////////////////////////////////////////////
-inline void ThreeDistributionsFullVectorConnector2::updatePointers()
+inline void ThreeDistributionsDoubleGhostLayerFullVectorConnector::updatePointers()
 {
     localDistributions    = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fDis)->getLocalDistributions();
     nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fDis)->getNonLocalDistributions();
@@ -105,7 +105,7 @@ inline void ThreeDistributionsFullVectorConnector2::updatePointers()
     zeroH2distributions     = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->h2Dis)->getZeroDistributions();
 }
 //////////////////////////////////////////////////////////////////////////
-inline void ThreeDistributionsFullVectorConnector2::fillData(vector_type& sdata, int& index, int x1, int x2, int x3)
+inline void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData(vector_type& sdata, int& index, int x1, int x2, int x3)
 {
    sdata[index++] = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
    sdata[index++] = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
@@ -201,7 +201,7 @@ inline void ThreeDistributionsFullVectorConnector2::fillData(vector_type& sdata,
    sdata[index++] = (*this->pressure)(x1, x2, x3);
 }
 //////////////////////////////////////////////////////////////////////////
-inline void ThreeDistributionsFullVectorConnector2::distributeData(vector_type& rdata, int& index, int x1, int x2, int x3)
+inline void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData(vector_type& rdata, int& index, int x1, int x2, int x3)
 {
    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = rdata[index++];
    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = rdata[index++];
diff --git a/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp b/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
index 1d37e4a09..361b06a5d 100644
--- a/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
+++ b/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
@@ -501,7 +501,7 @@ double Grid3D::getDeltaX(SPtr<Block3D> block) const { return getDeltaX(block->ge
 UbTupleDouble3 Grid3D::getNodeOffset(SPtr<Block3D> block) const
 {
     double delta = this->getDeltaX(block);
-    return makeUbTuple(OFFSET * delta, OFFSET * delta, OFFSET * delta);
+    return makeUbTuple(offset * delta, offset * delta, offset * delta);
 }
 ////////////////////////////////////////////////////////////////////////////
 Vector3D Grid3D::getNodeCoordinates(SPtr<Block3D> block, int ix1, int ix2, int ix3) const
@@ -2221,6 +2221,16 @@ void Grid3D::calcStartCoordinatesWithOutOverlap(SPtr<Block3D> block, double &wor
     }
 }
 //////////////////////////////////////////////////////////////////////////
+int Grid3D::getGhostLayerWidth() const
+{
+    return static_cast<int>(offset + 0.5);
+}
+//////////////////////////////////////////////////////////////////////////
+void Grid3D::setGhostLayerWidth(int ghostLayerWidth)
+{
+    this->offset = static_cast<double>(ghostLayerWidth) - 0.5;
+}
+//////////////////////////////////////////////////////////////////////////
 void Grid3D::setTimeStep(double step) { timeStep = step; }
 //////////////////////////////////////////////////////////////////////////
 double Grid3D::getTimeStep() const { return timeStep; }
diff --git a/src/cpu/VirtualFluidsCore/Grid/Grid3D.h b/src/cpu/VirtualFluidsCore/Grid/Grid3D.h
index 585aaa5d0..5e1eb0da8 100644
--- a/src/cpu/VirtualFluidsCore/Grid/Grid3D.h
+++ b/src/cpu/VirtualFluidsCore/Grid/Grid3D.h
@@ -51,8 +51,6 @@ class Communicator;
 class Block3D;
 class Interactor3D;
 
-#define OFFSET 1.5
-
 //! A class implements block grid
 //////////////////////////////////////////////////////////////////////////
 class Grid3D : public enableSharedFromThis<Grid3D>
@@ -214,9 +212,10 @@ public:
     int getNX1() const;
     int getNX2() const;
     int getNX3() const;
-    void calcStartCoordinatesAndDelta(SPtr<Block3D> block, double &worldX1, double &worldX2, double &worldX3,
-                                      double &deltaX);
+    void calcStartCoordinatesAndDelta(SPtr<Block3D> block, double &worldX1, double &worldX2, double &worldX3, double &deltaX);
     void calcStartCoordinatesWithOutOverlap(SPtr<Block3D> block, double &worldX1, double &worldX2, double &worldX3);
+    int getGhostLayerWidth() const;
+    void setGhostLayerWidth(int ghostLayerWidth);
     //////////////////////////////////////////////////////////////////////////
     // LBM
     // double getDeltaT(SPtr<Block3D>) const;
@@ -313,6 +312,8 @@ private:
     double orgDeltaX{ 1.0 };
 
     double timeStep{ 0.0 };
+
+    double offset{ 0.5 };
 };
 
 #endif
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
similarity index 98%
rename from src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.cpp
rename to src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
index 97a8196db..0be9c7e3d 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
@@ -26,12 +26,12 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.cpp
+//! \file MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
 //! \ingroup LBMKernel
 //! \author Hesameddin Safari
 //=======================================================================================
 
-#include "MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h"
+#include "MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h"
 #include "BCArray3D.h"
 #include "Block3D.h"
 #include "D3Q27EsoTwist3DSplittedVector.h"
@@ -43,9 +43,9 @@
 #define PROOF_CORRECTNESS
 
 //////////////////////////////////////////////////////////////////////////
-MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2() { this->compressible = false; }
+MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::MultiphaseTwoPhaseFieldsPressureFilterLBMKernel() { this->compressible = false; }
 //////////////////////////////////////////////////////////////////////////
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::initDataSet()
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::initDataSet()
 {
     SPtr<DistributionArray3D> f(new D3Q27EsoTwist3DSplittedVector( nx[0] + 4, nx[1] + 4, nx[2] + 4, -999.9));
     SPtr<DistributionArray3D> h(new D3Q27EsoTwist3DSplittedVector( nx[0] + 4, nx[1] + 4, nx[2] + 4, -999.9)); // For phase-field
@@ -60,11 +60,11 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::initDataSet()
 	dataSet->setPressureField(pressure);
 }
 //////////////////////////////////////////////////////////////////////////
-SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
+SPtr<LBMKernel> MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::clone()
 {
-    SPtr<LBMKernel> kernel(new MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2());
+    SPtr<LBMKernel> kernel(new MultiphaseTwoPhaseFieldsPressureFilterLBMKernel());
     kernel->setNX(nx);
-    dynamicPointerCast<MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2>(kernel)->initDataSet();
+    dynamicPointerCast<MultiphaseTwoPhaseFieldsPressureFilterLBMKernel>(kernel)->initDataSet();
     kernel->setCollisionFactorMultiphase(this->collFactorL, this->collFactorG);
     kernel->setDensityRatio(this->densityRatio);
     kernel->setMultiphaseModelParameters(this->beta, this->kappa);
@@ -86,7 +86,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
     return kernel;
 }
 //////////////////////////////////////////////////////////////////////////
- void  MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::forwardInverseChimeraWithKincompressible(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2, LBMReal Kinverse, LBMReal K, LBMReal oneMinusRho) {
+ void  MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::forwardInverseChimeraWithKincompressible(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2, LBMReal Kinverse, LBMReal K, LBMReal oneMinusRho) {
 	using namespace UbMath;
     LBMReal m2 = mfa + mfc;
 	LBMReal m1 = mfc - mfa;
@@ -99,7 +99,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
 }
 
 ////////////////////////////////////////////////////////////////////////////////
- void  MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::backwardInverseChimeraWithKincompressible(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2, LBMReal Kinverse, LBMReal K, LBMReal oneMinusRho) {
+ void  MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::backwardInverseChimeraWithKincompressible(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2, LBMReal Kinverse, LBMReal K, LBMReal oneMinusRho) {
 	using namespace UbMath;
     LBMReal m0 = (((mfc - mfb) * c1o2 + mfb * vv) * Kinverse + (mfa * Kinverse + oneMinusRho) * (v2 - vv) * c1o2) * K;
 	LBMReal m1 = (((mfa - mfc) - c2 * mfb * vv) * Kinverse + (mfa * Kinverse + oneMinusRho) * (-v2)) * K;
@@ -110,7 +110,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
 
 
 ////////////////////////////////////////////////////////////////////////////////
- void  MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::forwardChimera(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2) {
+ void  MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::forwardChimera(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2) {
 	using namespace UbMath;
     LBMReal m1 = (mfa + mfc) + mfb;
 	LBMReal m2 = mfc - mfa;
@@ -120,7 +120,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
 }
 
 
- void  MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::backwardChimera(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2) {
+ void  MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::backwardChimera(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2) {
 	using namespace UbMath;
     LBMReal ma = (mfc + mfa * (v2 - vv)) * c1o2 + mfb * (vv - c1o2);
 	LBMReal mb = ((mfa - mfc) - mfa * v2) - c2 * mfb * vv;
@@ -130,7 +130,7 @@ SPtr<LBMKernel> MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::clone()
 }
 
 
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::calculate(int step)
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
@@ -3291,7 +3291,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::calculate(int step)
 }
 //////////////////////////////////////////////////////////////////////////
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX1_phi()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi()
 {
     using namespace D3Q27System;
 	return 3.0* ((WEIGTH[TNE] * (((phi[TNE] - phi[BSW]) + (phi[BSE] - phi[TNW])) + ((phi[TSE] - phi[BNW]) + (phi[BNE] - phi[TSW])))
@@ -3304,7 +3304,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX1_phi()
     //return 3.0 * sum;
 }
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX2_phi()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi()
 {
     using namespace D3Q27System;
 	return 3.0 * ((WEIGTH[TNE] * (((phi[TNE] - phi[BSW]) - (phi[BSE] - phi[TNW])) + ((phi[BNE] - phi[TSW])- (phi[TSE] - phi[BNW])))
@@ -3317,7 +3317,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX2_phi()
     //return 3.0 * sum;
 }
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX3_phi()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi()
 {
     using namespace D3Q27System;
 	return 3.0 * ((WEIGTH[TNE] * (((phi[TNE] - phi[BSW]) - (phi[BSE] - phi[TNW])) + ((phi[TSE] - phi[BNW]) - (phi[BNE] - phi[TSW])))
@@ -3330,7 +3330,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX3_phi()
     //return 3.0 * sum;
 }
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX1_phi2()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
 	return 3.0 * ((WEIGTH[TNE] * (((phi2[TNE] - phi2[BSW]) + (phi2[BSE] - phi2[TNW])) + ((phi2[TSE] - phi2[BNW]) + (phi2[BNE] - phi2[TSW])))
@@ -3343,7 +3343,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX1_phi2()
 	//return 3.0 * sum;
 }
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX2_phi2()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
 	return 3.0 * ((WEIGTH[TNE] * (((phi2[TNE] - phi2[BSW]) - (phi2[BSE] - phi2[TNW])) + ((phi2[BNE] - phi2[TSW]) - (phi2[TSE] - phi2[BNW])))
@@ -3356,7 +3356,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX2_phi2()
 	//return 3.0 * sum;
 }
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX3_phi2()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
 	return 3.0 * ((WEIGTH[TNE] * (((phi2[TNE] - phi2[BSW]) - (phi2[BSE] - phi2[TNW])) + ((phi2[TSE] - phi2[BNW]) - (phi2[BNE] - phi2[TSW])))
@@ -3373,7 +3373,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::gradX3_phi2()
 
 
 
-LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::nabla2_phi()
+LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
     LBMReal sum = 0.0;
@@ -3395,7 +3395,7 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::nabla2_phi()
     return 6.0 * sum;
 }
 
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::computePhasefield()
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
@@ -3452,7 +3452,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::computePhasefield()
     }
 }
 
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::findNeighbors(CbArray3D<LBMReal, IndexerX3X2X1>::CbArray3DPtr ph, int x1, int x2,
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors(CbArray3D<LBMReal, IndexerX3X2X1>::CbArray3DPtr ph, int x1, int x2,
                                                 int x3)
 {
     using namespace D3Q27System;
@@ -3472,7 +3472,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::findNeighbors(CbArray3D
     }
 }
 
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::findNeighbors2(CbArray3D<LBMReal, IndexerX3X2X1>::CbArray3DPtr ph, int x1, int x2,
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors2(CbArray3D<LBMReal, IndexerX3X2X1>::CbArray3DPtr ph, int x1, int x2,
 	int x3)
 {
 	using namespace D3Q27System;
@@ -3493,7 +3493,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::findNeighbors2(CbArray3
 	}
 }
 
-void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2::swapDistributions()
+void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::swapDistributions()
 {
     LBMKernel::swapDistributions();
     dataSet->getHdistributions()->swap();
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h
similarity index 93%
rename from src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h
rename to src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h
index d3be0fa92..4ea4492a7 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h
@@ -26,13 +26,13 @@
 //  You should have received a copy of the GNU General Public License along
 //  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2.h
+//! \file MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.h
 //! \ingroup LBMKernel
 //! \author Hesameddin Safari
 //=======================================================================================
 
-#ifndef MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2_H
-#define MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2_H
+#ifndef MultiphaseTwoPhaseFieldsPressureFilterLBMKernel_H
+#define MultiphaseTwoPhaseFieldsPressureFilterLBMKernel_H
 
 #include "LBMKernel.h"
 #include "BCProcessor.h"
@@ -44,11 +44,11 @@
 //! \brief  Multiphase Cascaded Cumulant LBM kernel. 
 //! \details CFD solver that use Cascaded Cumulant Lattice Boltzmann method for D3Q27 model
 //! \author  H. Safari, K. Kutscher, M. Geier
-class MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2 : public LBMKernel
+class MultiphaseTwoPhaseFieldsPressureFilterLBMKernel : public LBMKernel
 {
 public:
-   MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2();
-   virtual ~MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel2(void) = default;
+   MultiphaseTwoPhaseFieldsPressureFilterLBMKernel();
+   virtual ~MultiphaseTwoPhaseFieldsPressureFilterLBMKernel(void) = default;
    void calculate(int step) override;
    SPtr<LBMKernel> clone() override;
    void forwardInverseChimeraWithKincompressible(LBMReal& mfa, LBMReal& mfb, LBMReal& mfc, LBMReal vv, LBMReal v2, LBMReal Kinverse, LBMReal K, LBMReal oneMinusRho);
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
index 57d61fced..c9fa88791 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
@@ -47,9 +47,9 @@
 #include "TwoDistributionsFullDirectConnector.h"
 #include "TwoDistributionsFullVectorConnector.h"
 #include "ThreeDistributionsFullDirectConnector.h"
-#include "ThreeDistributionsFullDirectConnector2.h"
+#include "ThreeDistributionsDoubleGhostLayerFullDirectConnector.h"
 #include "ThreeDistributionsFullVectorConnector.h"
-#include "ThreeDistributionsFullVectorConnector2.h"
+#include "ThreeDistributionsDoubleGhostLayerFullVectorConnector.h"
 #include <basics/transmitter/TbTransmitterLocal.h>
 
 //! \brief  A class sets connectors between blocks.
@@ -160,6 +160,6 @@ void SetConnectorsBlockVisitor<T1, T2>::setRemoteConnectors(SPtr<Block3D> sblock
 using OneDistributionSetConnectorsBlockVisitor  = SetConnectorsBlockVisitor<OneDistributionFullDirectConnector, OneDistributionFullVectorConnector>;
 using TwoDistributionsSetConnectorsBlockVisitor = SetConnectorsBlockVisitor<TwoDistributionsFullDirectConnector, TwoDistributionsFullVectorConnector>;
 using ThreeDistributionsSetConnectorsBlockVisitor = SetConnectorsBlockVisitor<ThreeDistributionsFullDirectConnector, ThreeDistributionsFullVectorConnector>;
-using ThreeDistributionsSetConnectorsBlockVisitor2 = SetConnectorsBlockVisitor<ThreeDistributionsFullDirectConnector2, ThreeDistributionsFullVectorConnector2>;
+using ThreeDistributionsDoubleGhostLayerSetConnectorsBlockVisitor = SetConnectorsBlockVisitor<ThreeDistributionsDoubleGhostLayerFullDirectConnector, ThreeDistributionsDoubleGhostLayerFullVectorConnector>;
 
 #endif // SETCONNECTORSBLOCKVISITOR_H
-- 
GitLab