From 1d593ce8ef9b467d6de34026903c6af39b1f983e Mon Sep 17 00:00:00 2001
From: alena <akaranchuk@list.ru>
Date: Thu, 12 Jan 2023 15:04:45 +0100
Subject: [PATCH] Changing from D3Q27System.h toD3Q27.h in using DIR_ constants

---
 apps/cpu/ConvectionOfVortex/cov.cpp           |   4 +-
 apps/cpu/CouetteFlow/cflow.cpp                |   4 +-
 apps/cpu/FlowAroundCylinder/cylinder.cpp      |   4 +-
 apps/cpu/HerschelBulkleyModel/hbflow.cpp      |   4 +-
 apps/cpu/HerschelBulkleySphere/hbsphere.cpp   |   6 +-
 apps/cpu/JetBreakup/JetBreakup.cpp            |   4 +-
 apps/cpu/LaminarTubeFlow/ltf.cpp              |   4 +-
 apps/cpu/Multiphase/Multiphase.cpp            |   4 +-
 apps/cpu/MultiphaseDropletTest/droplet.cpp    |   4 +-
 apps/cpu/PoiseuilleFlow/pf1.cpp               |   4 +-
 apps/cpu/RisingBubble2D/RisingBubble2D.cpp    |   4 +-
 apps/cpu/ViskomatXL/viskomat.cpp              |   4 +-
 apps/cpu/rheometer/rheometer.cpp              |   6 +-
 apps/cpu/sphere/sphere.cpp                    |   4 +-
 .../BoundaryConditions/BoundaryConditions.h   |  54 +-
 .../EqDensityBCAlgorithm.cpp                  |  14 +-
 ...tiphaseNonReflectingOutflowBCAlgorithm.cpp |   2 +
 .../MultiphaseSlipBCAlgorithm.cpp             |  54 +-
 .../MultiphaseVelocityBCAlgorithm.cpp         |  14 +-
 .../NonEqDensityBCAlgorithm.cpp               |  14 +-
 .../NonReflectingOutflowBCAlgorithm.cpp       |   2 +
 .../SimpleSlipBCAlgorithm.cpp                 |  54 +-
 .../BoundaryConditions/SlipBCAdapter.cpp      |  14 +-
 .../BoundaryConditions/SlipBCAlgorithm.cpp    |  54 +-
 .../ThixotropyDensityBCAlgorithm.cpp          |  15 +-
 ...xotropyNonReflectingOutflowBCAlgorithm.cpp |   2 +
 .../ThixotropyVelocityBCAlgorithm.cpp         |  14 +-
 ...ixotropyVelocityWithDensityBCAlgorithm.cpp |  14 +-
 .../CoProcessors/ShearStressCoProcessor.cpp   | 133 +++--
 .../TurbulenceIntensityCoProcessor.cpp        |   1 +
 .../WriteMultiphaseQuantitiesCoProcessor.cpp  |   4 +
 .../Connectors/CoarseToFineVectorConnector.h  |  29 +-
 .../Connectors/FineToCoarseVectorConnector.h  |  28 +-
 .../FineToCoarseVectorConnectorTest.cpp       |   4 +-
 .../Connectors/FullDirectConnector.cpp        |  54 +-
 .../Connectors/FullVectorConnector.cpp        | 144 ++---
 .../OneDistributionFullVectorConnector.cpp    |  56 +-
 ...onsDoubleGhostLayerFullDirectConnector.cpp |  54 +-
 ...onsDoubleGhostLayerFullVectorConnector.cpp | 164 ++---
 .../ThreeDistributionsFullVectorConnector.cpp |  56 +-
 ...onsDoubleGhostLayerFullDirectConnector.cpp |  54 +-
 ...onsDoubleGhostLayerFullVectorConnector.cpp | 164 ++---
 .../TwoDistributionsFullVectorConnector.cpp   |  56 +-
 .../Data/D3Q27EsoTwist3DSoA.cpp               | 168 +++---
 .../Data/D3Q27EsoTwist3DSplittedVector.cpp    | 560 +++++++++---------
 .../Data/EsoTwistD3Q27System.cpp              |  13 +-
 .../Data/EsoTwistD3Q27System.h                | 108 ++--
 src/cpu/VirtualFluidsCore/Grid/Block3D.cpp    |   8 +-
 src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp     | 115 ++--
 .../Interactors/D3Q27Interactor.cpp           | 200 ++++---
 .../D3Q27TriFaceMeshInteractor.cpp            |  22 +-
 .../VirtualFluidsCore/LBM/BGKLBMKernel.cpp    |  55 +-
 ...mpressibleOffsetInterpolationProcessor.cpp |   3 +
 ...bleOffsetMomentsInterpolationProcessor.cpp |   3 +
 ...etSquarePressureInterpolationProcessor.cpp |   3 +
 src/cpu/VirtualFluidsCore/LBM/D3Q27System.cpp |  12 +-
 src/cpu/VirtualFluidsCore/LBM/D3Q27System.h   | 230 ++++---
 ...ssibleCumulantWithSpongeLayerLBMKernel.cpp |  14 +-
 ...mpressibleOffsetInterpolationProcessor.cpp |   7 +-
 .../LBM/InitDensityLBMKernel.cpp              |  55 +-
 .../LBM/LBMKernelETD3Q27BGK.cpp               |  55 +-
 .../LBM/MultiphaseCumulantLBMKernel.cpp       |  65 +-
 ...PressureFilterCompressibleAirLBMKernel.cpp |  19 +
 .../LBM/MultiphasePressureFilterLBMKernel.cpp |  12 +
 .../MultiphaseScratchCumulantLBMKernel.cpp    |  14 +-
 ...eVelocityBaseExternalPressureLBMKernel.cpp |  25 +
 ...tiphaseTwoPhaseFieldsCumulantLBMKernel.cpp |  23 +-
 ...eTwoPhaseFieldsPressureFilterLBMKernel.cpp |  19 +
 ...woPhaseFieldsVelocityCumulantLBMKernel.cpp |  19 +
 .../LBM/RheologyInterpolationProcessor.cpp    |   5 +-
 .../InitDistributionsBlockVisitor.cpp         |   1 +
 .../Visitors/MetisPartitioningGridVisitor.cpp |  10 +-
 ...ultiphaseInitDistributionsBlockVisitor.cpp |   1 +
 ...ocityFormInitDistributionsBlockVisitor.cpp |   1 +
 .../Visitors/RefineAroundGbObjectHelper.cpp   |   4 +-
 .../RefineCrossAndInsideGbObjectHelper.cpp    |   2 +-
 .../Visitors/SetConnectorsBlockVisitor.h      |   6 +-
 ...SetInterpolationConnectorsBlockVisitor.cpp | 154 ++---
 .../SetInterpolationDirsBlockVisitor.cpp      |   2 +
 .../SetUndefinedNodesBlockVisitor.cpp         | 110 ++--
 .../Visitors/SpongeLayerBlockVisitor.cpp      |  10 +-
 81 files changed, 1953 insertions(+), 1562 deletions(-)

diff --git a/apps/cpu/ConvectionOfVortex/cov.cpp b/apps/cpu/ConvectionOfVortex/cov.cpp
index 627f5d03a..99ed2483d 100644
--- a/apps/cpu/ConvectionOfVortex/cov.cpp
+++ b/apps/cpu/ConvectionOfVortex/cov.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void run()
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       SPtr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance();
@@ -150,7 +152,7 @@ void run()
       if (myid==0) GbSystem3D::writeGeoObject(geoOutflow4.get(), pathname+"/geo/geoOutflow4", WbWriterVtkXmlASCII::getInstance());
       SPtr<D3Q27Interactor> outflowIntr4 = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow4, grid, outflowBCAdapter, Interactor3D::SOLID));
 
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M));
       InteractorsHelper intHelper(grid, metisVisitor);
       //intHelper.addInteractor(outflowIntr1);
       //intHelper.addInteractor(outflowIntr2);
diff --git a/apps/cpu/CouetteFlow/cflow.cpp b/apps/cpu/CouetteFlow/cflow.cpp
index 3de4a3b36..e263de08b 100644
--- a/apps/cpu/CouetteFlow/cflow.cpp
+++ b/apps/cpu/CouetteFlow/cflow.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void bflow(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile   config;
@@ -184,7 +186,7 @@ void bflow(string configname)
 
       ////////////////////////////////////////////
       //METIS
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::KWAY));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::KWAY));
       ////////////////////////////////////////////
       /////delete solid blocks
       if (myid == 0) UBLOG(logINFO, "deleteSolidBlocks - start");
diff --git a/apps/cpu/FlowAroundCylinder/cylinder.cpp b/apps/cpu/FlowAroundCylinder/cylinder.cpp
index 5578ecb56..5b65fb7eb 100644
--- a/apps/cpu/FlowAroundCylinder/cylinder.cpp
+++ b/apps/cpu/FlowAroundCylinder/cylinder.cpp
@@ -9,6 +9,8 @@ using namespace std;
 //////////////////////////////////////////////////////////////////////////
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       //DEBUG///////////////////////////////////////
@@ -203,7 +205,7 @@ void run(string configname)
          SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID));
 
          
-         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M));
+         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M));
          InteractorsHelper intHelper(grid, metisVisitor);
          intHelper.addInteractor(cylinderInt);
          intHelper.addInteractor(addWallYminInt);
diff --git a/apps/cpu/HerschelBulkleyModel/hbflow.cpp b/apps/cpu/HerschelBulkleyModel/hbflow.cpp
index b97942a1c..f8d9a3b10 100644
--- a/apps/cpu/HerschelBulkleyModel/hbflow.cpp
+++ b/apps/cpu/HerschelBulkleyModel/hbflow.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void bflow(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile   config;
@@ -218,7 +220,7 @@ void bflow(string configname)
 
       ////////////////////////////////////////////
       //METIS
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
       ////////////////////////////////////////////
       /////delete solid blocks
       if (myid == 0) UBLOG(logINFO, "deleteSolidBlocks - start");
diff --git a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp
index 67f5a00ad..19e16df5f 100644
--- a/apps/cpu/HerschelBulkleySphere/hbsphere.cpp
+++ b/apps/cpu/HerschelBulkleySphere/hbsphere.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void bflow(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile config;
@@ -161,7 +163,7 @@ void bflow(string configname)
 
       ////////////////////////////////////////////
       //METIS
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::KWAY));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::KWAY));
       ////////////////////////////////////////////
       //////////////////////////////////////////////////////////////////////////
       //restart
@@ -243,7 +245,7 @@ void bflow(string configname)
 
          ////////////////////////////////////////////
          //METIS
-         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::KWAY));
+         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::KWAY));
          ////////////////////////////////////////////
          /////delete solid blocks
          if (myid == 0) UBLOG(logINFO, "deleteSolidBlocks - start");
diff --git a/apps/cpu/JetBreakup/JetBreakup.cpp b/apps/cpu/JetBreakup/JetBreakup.cpp
index 01d4cc3eb..243566a24 100644
--- a/apps/cpu/JetBreakup/JetBreakup.cpp
+++ b/apps/cpu/JetBreakup/JetBreakup.cpp
@@ -13,6 +13,8 @@ void setInflowBC(double x1, double x2, double x3, double radius, int dir)
 
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
     try {
 
         // Sleep(30000);
@@ -219,7 +221,7 @@ void run(string configname)
         grid->setGhostLayerWidth(2);
 
         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(
-            comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+            comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
 
         //////////////////////////////////////////////////////////////////////////
         // restart
diff --git a/apps/cpu/LaminarTubeFlow/ltf.cpp b/apps/cpu/LaminarTubeFlow/ltf.cpp
index 93fd31083..5f87c3e3d 100644
--- a/apps/cpu/LaminarTubeFlow/ltf.cpp
+++ b/apps/cpu/LaminarTubeFlow/ltf.cpp
@@ -9,6 +9,8 @@ using namespace std;
 
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile   config;
@@ -108,7 +110,7 @@ void run(string configname)
       kernel->setBCProcessor(bcProc);
 
       //////////////////////////////////////////////////////////////////////////
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M));
       //restart
       SPtr<UbScheduler> mSch(new UbScheduler(cpStep, cpStart));
       //SPtr<MPIIOMigrationCoProcessor> migCoProcessor(new MPIIOMigrationCoProcessor(grid, mSch, metisVisitor, pathname + "/mig", comm));
diff --git a/apps/cpu/Multiphase/Multiphase.cpp b/apps/cpu/Multiphase/Multiphase.cpp
index 09d74e147..73611b6b2 100644
--- a/apps/cpu/Multiphase/Multiphase.cpp
+++ b/apps/cpu/Multiphase/Multiphase.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
     try {
 
         //Sleep(30000);
@@ -122,7 +124,7 @@ void run(string configname)
         grid->setGhostLayerWidth(2);
 
        
-        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
 
         //////////////////////////////////////////////////////////////////////////
         // restart
diff --git a/apps/cpu/MultiphaseDropletTest/droplet.cpp b/apps/cpu/MultiphaseDropletTest/droplet.cpp
index 54b59fcfd..104506105 100644
--- a/apps/cpu/MultiphaseDropletTest/droplet.cpp
+++ b/apps/cpu/MultiphaseDropletTest/droplet.cpp
@@ -13,6 +13,8 @@ using namespace std;
 
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
     try {
         vf::basics::ConfigurationFile config;
         config.load(configname);
@@ -187,7 +189,7 @@ void run(string configname)
         grid->setPeriodicX3(true);
         grid->setGhostLayerWidth(2);
 
-        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
 
         //////////////////////////////////////////////////////////////////////////
         // restart
diff --git a/apps/cpu/PoiseuilleFlow/pf1.cpp b/apps/cpu/PoiseuilleFlow/pf1.cpp
index d4d856d51..cb9dc2a19 100644
--- a/apps/cpu/PoiseuilleFlow/pf1.cpp
+++ b/apps/cpu/PoiseuilleFlow/pf1.cpp
@@ -7,6 +7,8 @@ using namespace std;
 //pipe flow with forcing
 void pf1()
 {
+    using namespace vf::lbm::dir;
+
    SPtr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance();
    int myid = comm->getProcessID();
 
@@ -76,7 +78,7 @@ void pf1()
 
    //set boundary conditions for blocks and create process decomposition for MPI
    SPtr<D3Q27Interactor> cylinderInt(new D3Q27Interactor(cylinder, grid, noSlipBCAdapter, Interactor3D::INVERSESOLID));
-   SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M));
+   SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M));
    InteractorsHelper intHelper(grid, metisVisitor);
    intHelper.addInteractor(cylinderInt);
    intHelper.selectBlocks();
diff --git a/apps/cpu/RisingBubble2D/RisingBubble2D.cpp b/apps/cpu/RisingBubble2D/RisingBubble2D.cpp
index 19677aac7..1085b7363 100644
--- a/apps/cpu/RisingBubble2D/RisingBubble2D.cpp
+++ b/apps/cpu/RisingBubble2D/RisingBubble2D.cpp
@@ -13,6 +13,8 @@ using namespace std;
 
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
     try {
         vf::basics::ConfigurationFile  config;
         config.load(configname);
@@ -189,7 +191,7 @@ void run(string configname)
         grid->setPeriodicX3(true);
         grid->setGhostLayerWidth(2);
 
-        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+        SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
 
         //////////////////////////////////////////////////////////////////////////
         // restart
diff --git a/apps/cpu/ViskomatXL/viskomat.cpp b/apps/cpu/ViskomatXL/viskomat.cpp
index 0b20e9367..b1e9a9c14 100644
--- a/apps/cpu/ViskomatXL/viskomat.cpp
+++ b/apps/cpu/ViskomatXL/viskomat.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void bflow(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile   config;
@@ -191,7 +193,7 @@ void bflow(string configname)
 
       ////////////////////////////////////////////
       //METIS
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::RECURSIVE));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::RECURSIVE));
       ////////////////////////////////////////////
       //////////////////////////////////////////////////////////////////////////
       //restart
diff --git a/apps/cpu/rheometer/rheometer.cpp b/apps/cpu/rheometer/rheometer.cpp
index e79d9d13a..5e358a6d0 100644
--- a/apps/cpu/rheometer/rheometer.cpp
+++ b/apps/cpu/rheometer/rheometer.cpp
@@ -8,6 +8,8 @@ using namespace std;
 
 void bflow(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       vf::basics::ConfigurationFile   config;
@@ -223,7 +225,7 @@ void bflow(string configname)
 
       ////////////////////////////////////////////
       //METIS
-      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::KWAY));
+      SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::KWAY));
       ////////////////////////////////////////////
       //////////////////////////////////////////////////////////////////////////
       //restart
@@ -313,7 +315,7 @@ void bflow(string configname)
 
          ////////////////////////////////////////////
          //METIS
-         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_MMM, MetisPartitioner::KWAY));
+         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_MMM, MetisPartitioner::KWAY));
          ////////////////////////////////////////////
          /////delete solid blocks
          if (myid == 0) UBLOG(logINFO, "deleteSolidBlocks - start");
diff --git a/apps/cpu/sphere/sphere.cpp b/apps/cpu/sphere/sphere.cpp
index bad77ee99..312e9cec4 100644
--- a/apps/cpu/sphere/sphere.cpp
+++ b/apps/cpu/sphere/sphere.cpp
@@ -7,6 +7,8 @@ using namespace std;
 ////////////////////////////////////////////////////////////////////////
 void run(string configname)
 {
+    using namespace vf::lbm::dir;
+
    try
    {
       SPtr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance();
@@ -180,7 +182,7 @@ void run(string configname)
          //outflow
          SPtr<D3Q27Interactor> outflowInt = SPtr<D3Q27Interactor>(new D3Q27Interactor(geoOutflow, grid, denBCAdapter, Interactor3D::SOLID));
 
-         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::DIR_00M));
+         SPtr<Grid3DVisitor> metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, DIR_00M));
          InteractorsHelper intHelper(grid, metisVisitor);
          intHelper.addInteractor(sphereInt);
          intHelper.addInteractor(addWallYminInt);
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h b/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h
index fa61e7224..662c9dc04 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/BoundaryConditions.h
@@ -192,60 +192,62 @@ public:
     float getBoundaryVelocityX3() { return this->bcVelocityX3; }
     float getBoundaryVelocity(const int &direction)
     {
+        using namespace vf::lbm::dir;
+
         switch (direction) {
-            case D3Q27System::DIR_P00:
+            case DIR_P00:
                 return (float)(UbMath::c4o9 *
                                (+bcVelocityX1)); //(2/cs^2)(=6)*rho_0(=1 bei inkompr)*wi*u*ei mit cs=1/sqrt(3)
-            case D3Q27System::DIR_M00:
+            case DIR_M00:
                 return (float)(UbMath::c4o9 *
                                (-bcVelocityX1)); // z.B. aus paper manfred MRT LB models in three dimensions (2002)
-            case D3Q27System::DIR_0P0:
+            case DIR_0P0:
                 return (float)(UbMath::c4o9 * (+bcVelocityX2));
-            case D3Q27System::DIR_0M0:
+            case DIR_0M0:
                 return (float)(UbMath::c4o9 * (-bcVelocityX2));
-            case D3Q27System::DIR_00P:
+            case DIR_00P:
                 return (float)(UbMath::c4o9 * (+bcVelocityX3));
-            case D3Q27System::DIR_00M:
+            case DIR_00M:
                 return (float)(UbMath::c4o9 * (-bcVelocityX3));
-            case D3Q27System::DIR_PP0:
+            case DIR_PP0:
                 return (float)(UbMath::c1o9 * (+bcVelocityX1 + bcVelocityX2));
-            case D3Q27System::DIR_MM0:
+            case DIR_MM0:
                 return (float)(UbMath::c1o9 * (-bcVelocityX1 - bcVelocityX2));
-            case D3Q27System::DIR_PM0:
+            case DIR_PM0:
                 return (float)(UbMath::c1o9 * (+bcVelocityX1 - bcVelocityX2));
-            case D3Q27System::DIR_MP0:
+            case DIR_MP0:
                 return (float)(UbMath::c1o9 * (-bcVelocityX1 + bcVelocityX2));
-            case D3Q27System::DIR_P0P:
+            case DIR_P0P:
                 return (float)(UbMath::c1o9 * (+bcVelocityX1 + bcVelocityX3));
-            case D3Q27System::DIR_M0M:
+            case DIR_M0M:
                 return (float)(UbMath::c1o9 * (-bcVelocityX1 - bcVelocityX3));
-            case D3Q27System::DIR_P0M:
+            case DIR_P0M:
                 return (float)(UbMath::c1o9 * (+bcVelocityX1 - bcVelocityX3));
-            case D3Q27System::DIR_M0P:
+            case DIR_M0P:
                 return (float)(UbMath::c1o9 * (-bcVelocityX1 + bcVelocityX3));
-            case D3Q27System::DIR_0PP:
+            case DIR_0PP:
                 return (float)(UbMath::c1o9 * (+bcVelocityX2 + bcVelocityX3));
-            case D3Q27System::DIR_0MM:
+            case DIR_0MM:
                 return (float)(UbMath::c1o9 * (-bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_0PM:
+            case DIR_0PM:
                 return (float)(UbMath::c1o9 * (+bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_0MP:
+            case DIR_0MP:
                 return (float)(UbMath::c1o9 * (-bcVelocityX2 + bcVelocityX3));
-            case D3Q27System::DIR_PPP:
+            case DIR_PPP:
                 return (float)(UbMath::c1o36 * (+bcVelocityX1 + bcVelocityX2 + bcVelocityX3));
-            case D3Q27System::DIR_MMM:
+            case DIR_MMM:
                 return (float)(UbMath::c1o36 * (-bcVelocityX1 - bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_PPM:
+            case DIR_PPM:
                 return (float)(UbMath::c1o36 * (+bcVelocityX1 + bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_MMP:
+            case DIR_MMP:
                 return (float)(UbMath::c1o36 * (-bcVelocityX1 - bcVelocityX2 + bcVelocityX3));
-            case D3Q27System::DIR_PMP:
+            case DIR_PMP:
                 return (float)(UbMath::c1o36 * (+bcVelocityX1 - bcVelocityX2 + bcVelocityX3));
-            case D3Q27System::DIR_MPM:
+            case DIR_MPM:
                 return (float)(UbMath::c1o36 * (-bcVelocityX1 + bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_PMM:
+            case DIR_PMM:
                 return (float)(UbMath::c1o36 * (+bcVelocityX1 - bcVelocityX2 - bcVelocityX3));
-            case D3Q27System::DIR_MPP:
+            case DIR_MPP:
                 return (float)(UbMath::c1o36 * (-bcVelocityX1 + bcVelocityX2 + bcVelocityX3));
             default:
                 throw UbException(UB_EXARGS, "unknown error");
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp
index bdddd2369..923334dc6 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/EqDensityBCAlgorithm.cpp
@@ -55,6 +55,8 @@ void EqDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributi
 //////////////////////////////////////////////////////////////////////////
 void EqDensityBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
     LBMReal f[D3Q27System::ENDF + 1];
 
     distributions->getDistributionInv(f, x1, x2, x3);
@@ -63,17 +65,17 @@ void EqDensityBCAlgorithm::applyBC()
     int nx3 = x3;
 
     // flag points in direction of fluid
-    if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_P00)) {
+    if (bcPtr->hasDensityBoundaryFlag(DIR_P00)) {
         nx1 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_M00)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_M00)) {
         nx1 += 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0P0)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_0P0)) {
         nx2 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0M0)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_0M0)) {
         nx2 += 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00P)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_00P)) {
         nx3 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00M)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_00M)) {
         nx3 += 1;
     } else
         UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on density boundary..."));
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp
index 9d1648ae2..6cf9f4a8e 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseNonReflectingOutflowBCAlgorithm.cpp
@@ -71,6 +71,8 @@ void MultiphaseNonReflectingOutflowBCAlgorithm::applyBC()
 {
     using namespace D3Q27System;
     using namespace UbMath;
+    using namespace vf::lbm::dir;
+
     LBMReal f[ENDF + 1];
     LBMReal ftemp[ENDF + 1];
     LBMReal h[D3Q27System::ENDF + 1];
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp
index 230a543f1..3b3eef64f 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseSlipBCAlgorithm.cpp
@@ -64,6 +64,8 @@ void MultiphaseSlipBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> dist
 //////////////////////////////////////////////////////////////////////////
 void MultiphaseSlipBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
    LBMReal f[D3Q27System::ENDF+1];
    LBMReal h[D3Q27System::ENDF+1];
    LBMReal feq[D3Q27System::ENDF+1];
@@ -102,32 +104,32 @@ void MultiphaseSlipBCAlgorithm::applyBC()
          LBMReal velocity = 0.0;
          switch (invDir)
          {
-         case D3Q27System::DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
-         case D3Q27System::DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
-         case D3Q27System::DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
-         case D3Q27System::DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
-         case D3Q27System::DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
-         case D3Q27System::DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
-         case D3Q27System::DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
-         case D3Q27System::DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
-         case D3Q27System::DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
-         case D3Q27System::DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
-         case D3Q27System::DIR_P0P: velocity = (UbMath::c1o9*(+vx1             +vx3)); break;
-         case D3Q27System::DIR_M0M: velocity = (UbMath::c1o9*(-vx1             -vx3)); break;
-         case D3Q27System::DIR_P0M: velocity = (UbMath::c1o9*(+vx1             -vx3)); break;
-         case D3Q27System::DIR_M0P: velocity = (UbMath::c1o9*(-vx1             +vx3)); break;
-         case D3Q27System::DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
-         case D3Q27System::DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
-         case D3Q27System::DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
-         case D3Q27System::DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
-         case D3Q27System::DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
-         case D3Q27System::DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
+         case DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
+         case DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
+         case DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
+         case DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
+         case DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
+         case DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
+         case DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
+         case DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
+         case DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
+         case DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
+         case DIR_P0P: velocity = (UbMath::c1o9*(+vx1+vx3)); break;
+         case DIR_M0M: velocity = (UbMath::c1o9*(-vx1-vx3)); break;
+         case DIR_P0M: velocity = (UbMath::c1o9*(+vx1-vx3)); break;
+         case DIR_M0P: velocity = (UbMath::c1o9*(-vx1+vx3)); break;
+         case DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
+         case DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
+         case DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
+         case DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
+         case DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
+         case DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
+         case DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
+         case DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
+         case DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
+         case DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
+         case DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
+         case DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
          default: throw UbException(UB_EXARGS, "unknown error");
          }
          LBMReal fReturn = ((1.0-q)/(1.0+q))*((f[invDir]-feq[invDir])/(1.0-collFactor)+feq[invDir])+((q*(f[invDir]+f[fdir])-velocity*rho)/(1.0+q));
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp
index 0177be9e1..1be23a815 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/MultiphaseVelocityBCAlgorithm.cpp
@@ -68,6 +68,8 @@ void MultiphaseVelocityBCAlgorithm::addDistributionsH2(SPtr<DistributionArray3D>
 //////////////////////////////////////////////////////////////////////////
 void MultiphaseVelocityBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
    LBMReal f[D3Q27System::ENDF+1];
    LBMReal h[D3Q27System::ENDF+1];
    LBMReal h2[D3Q27System::ENDF + 1];
@@ -98,12 +100,12 @@ void MultiphaseVelocityBCAlgorithm::applyBC()
    int nx3 = x3;
 
    //flag points in direction of fluid
-   if      (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_P00)) { nx1 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_M00)) { nx1 += 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0P0)) { nx2 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0M0)) { nx2 += 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00P)) { nx3 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00M)) { nx3 += 1; }
+   if      (bcPtr->hasVelocityBoundaryFlag(DIR_P00)) { nx1 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_M00)) { nx1 += 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_0P0)) { nx2 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_0M0)) { nx2 += 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_00P)) { nx3 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_00M)) { nx3 += 1; }
    //else UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on velocity boundary..."));
    
    phiBC = bcPtr->getBoundaryPhaseField();
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp
index cf7a627b0..6f892a261 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonEqDensityBCAlgorithm.cpp
@@ -56,6 +56,8 @@ void NonEqDensityBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distrib
 //////////////////////////////////////////////////////////////////////////
 void NonEqDensityBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
     LBMReal f[D3Q27System::ENDF + 1];
     distributions->getDistributionInv(f, x1, x2, x3);
     int nx1 = x1;
@@ -63,17 +65,17 @@ void NonEqDensityBCAlgorithm::applyBC()
     int nx3 = x3;
 
     // flag points in direction of fluid
-    if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_P00)) {
+    if (bcPtr->hasDensityBoundaryFlag(DIR_P00)) {
         nx1 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_M00)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_M00)) {
         nx1 += 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0P0)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_0P0)) {
         nx2 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0M0)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_0M0)) {
         nx2 += 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00P)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_00P)) {
         nx3 -= 1;
-    } else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00M)) {
+    } else if (bcPtr->hasDensityBoundaryFlag(DIR_00M)) {
         nx3 += 1;
     } else
         return; // UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on density boundary..."));
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp
index 6fa4c7b5d..79fe18b0b 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/NonReflectingOutflowBCAlgorithm.cpp
@@ -57,6 +57,8 @@ void NonReflectingOutflowBCAlgorithm::addDistributions(SPtr<DistributionArray3D>
 //////////////////////////////////////////////////////////////////////////
 void NonReflectingOutflowBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
     using namespace D3Q27System;
     using namespace UbMath;
 
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp
index 151e10be4..212c96902 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SimpleSlipBCAlgorithm.cpp
@@ -58,6 +58,8 @@ void SimpleSlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distribut
 //////////////////////////////////////////////////////////////////////////
 void SimpleSlipBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
    LBMReal f[D3Q27System::ENDF+1];
    LBMReal feq[D3Q27System::ENDF+1];
    distributions->getDistributionInv(f, x1, x2, x3);
@@ -83,32 +85,32 @@ void SimpleSlipBCAlgorithm::applyBC()
          LBMReal velocity = 0.0;
          switch (invDir)
          {
-         case D3Q27System::DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
-         case D3Q27System::DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
-         case D3Q27System::DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
-         case D3Q27System::DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
-         case D3Q27System::DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
-         case D3Q27System::DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
-         case D3Q27System::DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
-         case D3Q27System::DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
-         case D3Q27System::DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
-         case D3Q27System::DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
-         case D3Q27System::DIR_P0P: velocity = (UbMath::c1o9*(+vx1+vx3)); break;
-         case D3Q27System::DIR_M0M: velocity = (UbMath::c1o9*(-vx1-vx3)); break;
-         case D3Q27System::DIR_P0M: velocity = (UbMath::c1o9*(+vx1-vx3)); break;
-         case D3Q27System::DIR_M0P: velocity = (UbMath::c1o9*(-vx1+vx3)); break;
-         case D3Q27System::DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
-         case D3Q27System::DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
-         case D3Q27System::DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
-         case D3Q27System::DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
-         case D3Q27System::DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
-         case D3Q27System::DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
+         case DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
+         case DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
+         case DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
+         case DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
+         case DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
+         case DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
+         case DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
+         case DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
+         case DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
+         case DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
+         case DIR_P0P: velocity = (UbMath::c1o9*(+vx1+vx3)); break;
+         case DIR_M0M: velocity = (UbMath::c1o9*(-vx1-vx3)); break;
+         case DIR_P0M: velocity = (UbMath::c1o9*(+vx1-vx3)); break;
+         case DIR_M0P: velocity = (UbMath::c1o9*(-vx1+vx3)); break;
+         case DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
+         case DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
+         case DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
+         case DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
+         case DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
+         case DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
+         case DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
+         case DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
+         case DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
+         case DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
+         case DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
+         case DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
          default: throw UbException(UB_EXARGS, "unknown error");
          }
          LBMReal fReturn = f[invDir] - velocity * rho;
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp
index 0dc2d5d66..2b22b6157 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAdapter.cpp
@@ -49,6 +49,8 @@
 void SlipBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryConditions> bc, const double & /*worldX1*/,
                             const double & /*worldX2*/, const double & /*worldX3*/, const double & /*time*/)
 {
+    using namespace vf::lbm::dir;
+
     //////////////////////////////////////////////////////////////////////////
     //>>> nur workaround! -> Hendrick nach normalen berechnung aus qs fragen
 
@@ -56,17 +58,17 @@ void SlipBCAdapter::adaptBC(const D3Q27Interactor &interactor, SPtr<BoundaryCond
     if (!geo)
         throw UbException(UB_EXARGS, "derzeit nur fuer Cubes valide");
 
-    if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_P00))
+    if (bc->hasSlipBoundaryFlag(DIR_P00))
         bc->setNormalVector(1.0, 0.0, 0.0);
-    else if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_M00))
+    else if (bc->hasSlipBoundaryFlag(DIR_M00))
         bc->setNormalVector(-1.0, 0.0, 0.0);
-    else if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_0P0))
+    else if (bc->hasSlipBoundaryFlag(DIR_0P0))
         bc->setNormalVector(0.0, 1.0, 0.0);
-    else if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_0M0))
+    else if (bc->hasSlipBoundaryFlag(DIR_0M0))
         bc->setNormalVector(0.0, -1.0, 0.0);
-    else if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_00P))
+    else if (bc->hasSlipBoundaryFlag(DIR_00P))
         bc->setNormalVector(0.0, 0.0, 1.0);
-    else if (bc->hasSlipBoundaryFlag(D3Q27System::DIR_00M))
+    else if (bc->hasSlipBoundaryFlag(DIR_00M))
         bc->setNormalVector(0.0, 0.0, -1.0);
 
     bc->setBcAlgorithmType(algorithmType);
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp
index 5d9993c45..8b436bd57 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp
@@ -20,6 +20,8 @@ void SlipBCAlgorithm::addDistributions(SPtr<DistributionArray3D> distributions)
 //////////////////////////////////////////////////////////////////////////
 void SlipBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
     LBMReal f[D3Q27System::ENDF + 1];
     LBMReal feq[D3Q27System::ENDF + 1];
     distributions->getDistributionInv(f, x1, x2, x3);
@@ -47,32 +49,32 @@ void SlipBCAlgorithm::applyBC()
          LBMReal velocity = 0.0;
          switch (invDir)
          {
-         case D3Q27System::DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
-         case D3Q27System::DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
-         case D3Q27System::DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
-         case D3Q27System::DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
-         case D3Q27System::DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
-         case D3Q27System::DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
-         case D3Q27System::DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
-         case D3Q27System::DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
-         case D3Q27System::DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
-         case D3Q27System::DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
-         case D3Q27System::DIR_P0P: velocity = (UbMath::c1o9*(+vx1+vx3)); break;
-         case D3Q27System::DIR_M0M: velocity = (UbMath::c1o9*(-vx1-vx3)); break;
-         case D3Q27System::DIR_P0M: velocity = (UbMath::c1o9*(+vx1-vx3)); break;
-         case D3Q27System::DIR_M0P: velocity = (UbMath::c1o9*(-vx1+vx3)); break;
-         case D3Q27System::DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
-         case D3Q27System::DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
-         case D3Q27System::DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
-         case D3Q27System::DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
-         case D3Q27System::DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
-         case D3Q27System::DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
-         case D3Q27System::DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
-         case D3Q27System::DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
-         case D3Q27System::DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
+         case DIR_P00: velocity = (UbMath::c4o9*(+vx1)); break;      //(2/cs^2)(=6)*rho_0(=1 bei imkompr)*wi*u*ei mit cs=1/sqrt(3)
+         case DIR_M00: velocity = (UbMath::c4o9*(-vx1)); break;      //z.B. aus paper manfred MRT LB models in three dimensions (2002)   
+         case DIR_0P0: velocity = (UbMath::c4o9*(+vx2)); break;
+         case DIR_0M0: velocity = (UbMath::c4o9*(-vx2)); break;
+         case DIR_00P: velocity = (UbMath::c4o9*(+vx3)); break;
+         case DIR_00M: velocity = (UbMath::c4o9*(-vx3)); break;
+         case DIR_PP0: velocity = (UbMath::c1o9*(+vx1+vx2)); break;
+         case DIR_MM0: velocity = (UbMath::c1o9*(-vx1-vx2)); break;
+         case DIR_PM0: velocity = (UbMath::c1o9*(+vx1-vx2)); break;
+         case DIR_MP0: velocity = (UbMath::c1o9*(-vx1+vx2)); break;
+         case DIR_P0P: velocity = (UbMath::c1o9*(+vx1+vx3)); break;
+         case DIR_M0M: velocity = (UbMath::c1o9*(-vx1-vx3)); break;
+         case DIR_P0M: velocity = (UbMath::c1o9*(+vx1-vx3)); break;
+         case DIR_M0P: velocity = (UbMath::c1o9*(-vx1+vx3)); break;
+         case DIR_0PP: velocity = (UbMath::c1o9*(+vx2+vx3)); break;
+         case DIR_0MM: velocity = (UbMath::c1o9*(-vx2-vx3)); break;
+         case DIR_0PM: velocity = (UbMath::c1o9*(+vx2-vx3)); break;
+         case DIR_0MP: velocity = (UbMath::c1o9*(-vx2+vx3)); break;
+         case DIR_PPP: velocity = (UbMath::c1o36*(+vx1+vx2+vx3)); break;
+         case DIR_MMM: velocity = (UbMath::c1o36*(-vx1-vx2-vx3)); break;
+         case DIR_PPM: velocity = (UbMath::c1o36*(+vx1+vx2-vx3)); break;
+         case DIR_MMP: velocity = (UbMath::c1o36*(-vx1-vx2+vx3)); break;
+         case DIR_PMP: velocity = (UbMath::c1o36*(+vx1-vx2+vx3)); break;
+         case DIR_MPM: velocity = (UbMath::c1o36*(-vx1+vx2-vx3)); break;
+         case DIR_PMM: velocity = (UbMath::c1o36*(+vx1-vx2-vx3)); break;
+         case DIR_MPP: velocity = (UbMath::c1o36*(-vx1+vx2+vx3)); break;
          default: throw UbException(UB_EXARGS, "unknown error");
          }
          LBMReal fReturn = ((1.0-q)/(1.0+q))*((f[invDir]-feq[invDir])/(1.0-collFactor)+feq[invDir])+((q*(f[invDir]+f[fdir])-velocity*rho)/(1.0+q));
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp
index bec8e139e..dfac7e745 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyDensityBCAlgorithm.cpp
@@ -72,7 +72,8 @@ void ThixotropyDensityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D> d
 //////////////////////////////////////////////////////////////////////////
 void ThixotropyDensityBCAlgorithm::applyBC()
 {
-   using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+    using namespace D3Q27System;
 
 	LBMReal f[D3Q27System::ENDF + 1];
 	LBMReal feq[D3Q27System::ENDF + 1];
@@ -95,12 +96,12 @@ void ThixotropyDensityBCAlgorithm::applyBC()
 	int nx3 = x3;
 
 	//flag points in direction of fluid
-	if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_P00)) { nx1 -= 1; }
-	else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_M00)) { nx1 += 1; }
-	else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0P0)) { nx2 -= 1; }
-	else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_0M0)) { nx2 += 1; }
-	else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00P)) { nx3 -= 1; }
-	else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::DIR_00M)) { nx3 += 1; }
+	if (bcPtr->hasDensityBoundaryFlag(DIR_P00)) { nx1 -= 1; }
+	else if (bcPtr->hasDensityBoundaryFlag(DIR_M00)) { nx1 += 1; }
+	else if (bcPtr->hasDensityBoundaryFlag(DIR_0P0)) { nx2 -= 1; }
+	else if (bcPtr->hasDensityBoundaryFlag(DIR_0M0)) { nx2 += 1; }
+	else if (bcPtr->hasDensityBoundaryFlag(DIR_00P)) { nx3 -= 1; }
+	else if (bcPtr->hasDensityBoundaryFlag(DIR_00M)) { nx3 += 1; }
 	else	 UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on density boundary..."));
 
 	LBMReal rhoBC = bcPtr->getBoundaryDensity();
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp
index ed90cc759..5d647b8d4 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyNonReflectingOutflowBCAlgorithm.cpp
@@ -69,7 +69,9 @@ void ThixotropyNonReflectingOutflowBCAlgorithm::addDistributionsH(SPtr<Distribut
 //////////////////////////////////////////////////////////////////////////
 void ThixotropyNonReflectingOutflowBCAlgorithm::applyBC()
 {
+   using namespace vf::lbm::dir;
    using namespace D3Q27System;
+
    LBMReal f[ENDF + 1];
    LBMReal ftemp[ENDF + 1];
 
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp
index 474821241..3275cce51 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityBCAlgorithm.cpp
@@ -71,6 +71,8 @@ void ThixotropyVelocityBCAlgorithm::addDistributionsH(SPtr<DistributionArray3D>
 //////////////////////////////////////////////////////////////////////////
 void ThixotropyVelocityBCAlgorithm::applyBC()
 {
+	using namespace vf::lbm::dir;
+
 	LBMReal f[D3Q27System::ENDF + 1];
 	LBMReal feq[D3Q27System::ENDF + 1];
 	LBMReal h[D3Q27System::ENDF + 1];
@@ -92,12 +94,12 @@ void ThixotropyVelocityBCAlgorithm::applyBC()
 	int nx3 = x3;
 
 	//flag points in direction of fluid
-	if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_P00)) { nx1 -= 1; }
-	else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_M00)) { nx1 += 1; }
-	else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0P0)) { nx2 -= 1; }
-	else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0M0)) { nx2 += 1; }
-	else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00P)) { nx3 -= 1; }
-	else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00M)) { nx3 += 1; }
+	if (bcPtr->hasVelocityBoundaryFlag(DIR_P00)) { nx1 -= 1; }
+	else if (bcPtr->hasVelocityBoundaryFlag(DIR_M00)) { nx1 += 1; }
+	else if (bcPtr->hasVelocityBoundaryFlag(DIR_0P0)) { nx2 -= 1; }
+	else if (bcPtr->hasVelocityBoundaryFlag(DIR_0M0)) { nx2 += 1; }
+	else if (bcPtr->hasVelocityBoundaryFlag(DIR_00P)) { nx3 -= 1; }
+	else if (bcPtr->hasVelocityBoundaryFlag(DIR_00M)) { nx3 += 1; }
 	else	 UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on velocity boundary..."));
 
 	//lambdaBC = bcPtr->getBoundaryThixotropy();
diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp
index 454b29bc4..4d9a0c77a 100644
--- a/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp
+++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/ThixotropyVelocityWithDensityBCAlgorithm.cpp
@@ -64,6 +64,8 @@ void ThixotropyVelocityWithDensityBCAlgorithm::addDistributionsH(SPtr<Distributi
 //////////////////////////////////////////////////////////////////////////
 void ThixotropyVelocityWithDensityBCAlgorithm::applyBC()
 {
+    using namespace vf::lbm::dir;
+
    //velocity bc for non reflecting pressure bc
    LBMReal f[D3Q27System::ENDF+1];
    distributions->getDistributionInv(f, x1, x2, x3);
@@ -85,12 +87,12 @@ void ThixotropyVelocityWithDensityBCAlgorithm::applyBC()
    int nx3 = x3;
 
    //flag points in direction of fluid
-   if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_P00)) { nx1 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_M00)) { nx1 += 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0P0)) { nx2 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_0M0)) { nx2 += 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00P)) { nx3 -= 1; }
-   else if (bcPtr->hasVelocityBoundaryFlag(D3Q27System::DIR_00M)) { nx3 += 1; }
+   if (bcPtr->hasVelocityBoundaryFlag(DIR_P00)) { nx1 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_M00)) { nx1 += 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_0P0)) { nx2 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_0M0)) { nx2 += 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_00P)) { nx3 -= 1; }
+   else if (bcPtr->hasVelocityBoundaryFlag(DIR_00M)) { nx3 += 1; }
    else	 UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on velocity boundary..."));
 
    for (int fdir = D3Q27System::FSTARTDIR; fdir <= D3Q27System::FENDDIR; fdir++)
diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp
index 64ecc177f..ce0108270 100644
--- a/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/CoProcessors/ShearStressCoProcessor.cpp
@@ -124,6 +124,7 @@ void ShearStressCoProcessor::clearData()
 //////////////////////////////////////////////////////////////////////////
 void ShearStressCoProcessor::calculateShearStress(double timeStep)
 {
+    using namespace vf::lbm::dir;
     using namespace D3Q27System;
 
     LBMReal f[27];
@@ -407,6 +408,8 @@ void ShearStressCoProcessor::addInteractor(SPtr<D3Q27Interactor> interactor) { i
 void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> grid, SPtr<Block3D> block, double &A,
                                        double &B, double &C, double &D, double &ii)
 {
+    using namespace vf::lbm::dir;
+
     double x1plane = 0.0, y1plane = 0.0, z1plane = 0.0;
     double x2plane = 0.0, y2plane = 0.0, z2plane = 0.0;
     double x3plane = 0.0, y3plane = 0.0, z3plane = 0.0;
@@ -562,32 +565,32 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                                 "ix2=" + UbSystem::toString(ix2) + "ix3=" + UbSystem::toString(ix3) +
                                                 "GlobalID=" + UbSystem::toString(block->getGlobalID()) +
                                                 "dx=" + UbSystem::toString(dx) +
-                                                "T=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_00P)) +
-                                                "B=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_00M)) +
-                                                "E=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P00)) +
-                                                "W=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M00)) +
-                                                "N=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0P0)) +
-                                                "S=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0M0)) +
-                                                "NE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PP0)) +
-                                                "SW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MM0)) +
-                                                "SE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PM0)) +
-                                                "NW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MP0)) +
-                                                "TE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P0P)) +
-                                                "BW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M0M)) +
-                                                "BE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P0M)) +
-                                                "TW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M0P)) +
-                                                "TN=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0PP)) +
-                                                "BS=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0MM)) +
-                                                "BN=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0PM)) +
-                                                "TS=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0MP)) +
-                                                "TNE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PPP)) +
-                                                "TNW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MPP)) +
-                                                "TSE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PMP)) +
-                                                "TSW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MMP)) +
-                                                "BNE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PPM)) +
-                                                "BNW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MPM)) +
-                                                "BSE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PMM)) +
-                                                "BSW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MMM) * dx)));
+                                                "T=" + UbSystem::toString(bcPtr->getQ(DIR_00P)) +
+                                                "B=" + UbSystem::toString(bcPtr->getQ(DIR_00M)) +
+                                                "E=" + UbSystem::toString(bcPtr->getQ(DIR_P00)) +
+                                                "W=" + UbSystem::toString(bcPtr->getQ(DIR_M00)) +
+                                                "N=" + UbSystem::toString(bcPtr->getQ(DIR_0P0)) +
+                                                "S=" + UbSystem::toString(bcPtr->getQ(DIR_0M0)) +
+                                                "NE=" + UbSystem::toString(bcPtr->getQ(DIR_PP0)) +
+                                                "SW=" + UbSystem::toString(bcPtr->getQ(DIR_MM0)) +
+                                                "SE=" + UbSystem::toString(bcPtr->getQ(DIR_PM0)) +
+                                                "NW=" + UbSystem::toString(bcPtr->getQ(DIR_MP0)) +
+                                                "TE=" + UbSystem::toString(bcPtr->getQ(DIR_P0P)) +
+                                                "BW=" + UbSystem::toString(bcPtr->getQ(DIR_M0M)) +
+                                                "BE=" + UbSystem::toString(bcPtr->getQ(DIR_P0M)) +
+                                                "TW=" + UbSystem::toString(bcPtr->getQ(DIR_M0P)) +
+                                                "TN=" + UbSystem::toString(bcPtr->getQ(DIR_0PP)) +
+                                                "BS=" + UbSystem::toString(bcPtr->getQ(DIR_0MM)) +
+                                                "BN=" + UbSystem::toString(bcPtr->getQ(DIR_0PM)) +
+                                                "TS=" + UbSystem::toString(bcPtr->getQ(DIR_0MP)) +
+                                                "TNE=" + UbSystem::toString(bcPtr->getQ(DIR_PPP)) +
+                                                "TNW=" + UbSystem::toString(bcPtr->getQ(DIR_MPP)) +
+                                                "TSE=" + UbSystem::toString(bcPtr->getQ(DIR_PMP)) +
+                                                "TSW=" + UbSystem::toString(bcPtr->getQ(DIR_MMP)) +
+                                                "BNE=" + UbSystem::toString(bcPtr->getQ(DIR_PPM)) +
+                                                "BNW=" + UbSystem::toString(bcPtr->getQ(DIR_MPM)) +
+                                                "BSE=" + UbSystem::toString(bcPtr->getQ(DIR_PMM)) +
+                                                "BSW=" + UbSystem::toString(bcPtr->getQ(DIR_MMM) * dx)));
         }
     }
 
@@ -608,7 +611,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                 if (ii <= 2) {
                                     LBMReal q = bcPtrIn->getQ(fdir);
                                     if (q != 999.00000) {
-                                        if (fdir == D3Q27System::DIR_P00) {
+                                        if (fdir == DIR_P00) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (i + q <= x + 1) {
                                                 if (ii == 0) {
@@ -634,7 +637,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                                 }
                                             }
                                         }
-                                        if (fdir == D3Q27System::DIR_M00) {
+                                        if (fdir == DIR_M00) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (i - q >= x) {
                                                 if (ii == 0) {
@@ -660,7 +663,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                                 }
                                             }
                                         }
-                                        if (fdir == D3Q27System::DIR_0P0) {
+                                        if (fdir == DIR_0P0) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (j + q <= y + 1) {
                                                 if (ii == 0) {
@@ -686,7 +689,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                                 }
                                             }
                                         }
-                                        if (fdir == D3Q27System::DIR_0M0) {
+                                        if (fdir == DIR_0M0) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (j - q >= y) {
                                                 if (ii == 0) {
@@ -713,7 +716,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                             }
                                         }
 
-                                        if (fdir == D3Q27System::DIR_00P) {
+                                        if (fdir == DIR_00P) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (k + q <= z + 1) {
                                                 if (ii == 0) {
@@ -739,7 +742,7 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                                                 }
                                             }
                                         }
-                                        if (fdir == D3Q27System::DIR_00M) {
+                                        if (fdir == DIR_00M) {
                                             // if(!bcArray->isSolid(i, j, k))continue;
                                             if (k - q >= z) {
                                                 if (ii == 0) {
@@ -788,32 +791,32 @@ void ShearStressCoProcessor::findPlane(int ix1, int ix2, int ix3, SPtr<Grid3D> g
                     UB_EXARGS, "ii is=" + UbSystem::toString(ii) + "  ix1=" + UbSystem::toString(ix1) +
                                    " ix2=" + UbSystem::toString(ix2) + " ix3=" + UbSystem::toString(ix3) +
                                    " Block3D::GlobalID=" + UbSystem::toString(block->getGlobalID()) + " dx=" +
-                                   UbSystem::toString(dx) + " T=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_00P)) +
-                                   " B=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_00M)) +
-                                   " E=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P00)) +
-                                   " W=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M00)) +
-                                   " N=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0P0)) +
-                                   " S=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0M0)) +
-                                   " NE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PP0)) +
-                                   " SW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MM0)) +
-                                   " SE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PM0)) +
-                                   " NW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MP0)) +
-                                   " TE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P0P)) +
-                                   " BW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M0M)) +
-                                   " BE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_P0M)) +
-                                   " TW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_M0P)) +
-                                   " TN=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0PP)) +
-                                   " BS=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0MM)) +
-                                   " BN=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0PM)) +
-                                   " TS=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_0MP)) +
-                                   " TNE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PPP)) +
-                                   " TNW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MPP)) +
-                                   " TSE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PMP)) +
-                                   " TSW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MMP)) +
-                                   " BNE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PPM)) +
-                                   " BNW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MPM)) +
-                                   " BSE=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_PMM)) +
-                                   " BSW=" + UbSystem::toString(bcPtr->getQ(D3Q27System::DIR_MMM))));
+                                   UbSystem::toString(dx) + " T=" + UbSystem::toString(bcPtr->getQ(DIR_00P)) +
+                                   " B=" + UbSystem::toString(bcPtr->getQ(DIR_00M)) +
+                                   " E=" + UbSystem::toString(bcPtr->getQ(DIR_P00)) +
+                                   " W=" + UbSystem::toString(bcPtr->getQ(DIR_M00)) +
+                                   " N=" + UbSystem::toString(bcPtr->getQ(DIR_0P0)) +
+                                   " S=" + UbSystem::toString(bcPtr->getQ(DIR_0M0)) +
+                                   " NE=" + UbSystem::toString(bcPtr->getQ(DIR_PP0)) +
+                                   " SW=" + UbSystem::toString(bcPtr->getQ(DIR_MM0)) +
+                                   " SE=" + UbSystem::toString(bcPtr->getQ(DIR_PM0)) +
+                                   " NW=" + UbSystem::toString(bcPtr->getQ(DIR_MP0)) +
+                                   " TE=" + UbSystem::toString(bcPtr->getQ(DIR_P0P)) +
+                                   " BW=" + UbSystem::toString(bcPtr->getQ(DIR_M0M)) +
+                                   " BE=" + UbSystem::toString(bcPtr->getQ(DIR_P0M)) +
+                                   " TW=" + UbSystem::toString(bcPtr->getQ(DIR_M0P)) +
+                                   " TN=" + UbSystem::toString(bcPtr->getQ(DIR_0PP)) +
+                                   " BS=" + UbSystem::toString(bcPtr->getQ(DIR_0MM)) +
+                                   " BN=" + UbSystem::toString(bcPtr->getQ(DIR_0PM)) +
+                                   " TS=" + UbSystem::toString(bcPtr->getQ(DIR_0MP)) +
+                                   " TNE=" + UbSystem::toString(bcPtr->getQ(DIR_PPP)) +
+                                   " TNW=" + UbSystem::toString(bcPtr->getQ(DIR_MPP)) +
+                                   " TSE=" + UbSystem::toString(bcPtr->getQ(DIR_PMP)) +
+                                   " TSW=" + UbSystem::toString(bcPtr->getQ(DIR_MMP)) +
+                                   " BNE=" + UbSystem::toString(bcPtr->getQ(DIR_PPM)) +
+                                   " BNW=" + UbSystem::toString(bcPtr->getQ(DIR_MPM)) +
+                                   " BSE=" + UbSystem::toString(bcPtr->getQ(DIR_PMM)) +
+                                   " BSW=" + UbSystem::toString(bcPtr->getQ(DIR_MMM))));
             }
         }
     }
@@ -835,6 +838,8 @@ bool ShearStressCoProcessor::checkUndefindedNodes(SPtr<BCArray3D> bcArray, int i
 //////////////////////////////////////////////////////////////////////////////////////
 void ShearStressCoProcessor::initDistance()
 {
+    using namespace vf::lbm::dir;
+
     for (const auto &interactor : interactors) {
         //      typedef std::map<SPtr<Block3D>, std::set< std::vector<int> > > TransNodeIndicesMap;
         for (const auto &t : interactor->getBcNodeIndicesMap()) {
@@ -876,22 +881,22 @@ void ShearStressCoProcessor::initDistance()
                         continue;
                     int numberOfCorner = 0;
 
-                    if (bc->getQ(D3Q27System::DIR_00P) != 999.000) {
+                    if (bc->getQ(DIR_00P) != 999.000) {
                         numberOfCorner++;
                     }
-                    if (bc->getQ(D3Q27System::DIR_00M) != 999.000) {
+                    if (bc->getQ(DIR_00M) != 999.000) {
                         numberOfCorner++;
                     }
-                    if (bc->getQ(D3Q27System::DIR_P00) != 999.000) {
+                    if (bc->getQ(DIR_P00) != 999.000) {
                         numberOfCorner++;
                     }
-                    if (bc->getQ(D3Q27System::DIR_M00) != 999.000) {
+                    if (bc->getQ(DIR_M00) != 999.000) {
                         numberOfCorner++;
                     }
-                    if (bc->getQ(D3Q27System::DIR_0P0) != 999.000) {
+                    if (bc->getQ(DIR_0P0) != 999.000) {
                         numberOfCorner++;
                     }
-                    if (bc->getQ(D3Q27System::DIR_0M0) != 999.000) {
+                    if (bc->getQ(DIR_0M0) != 999.000) {
                         numberOfCorner++;
                     }
                     // if(bc->hasVelocityBoundary()||bc->hasDensityBoundary())continue;
diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp
index 6a06a20d4..0fc1af791 100644
--- a/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/CoProcessors/TurbulenceIntensityCoProcessor.cpp
@@ -181,6 +181,7 @@ void TurbulenceIntensityCoProcessor::addData(const SPtr<Block3D> block)
 //////////////////////////////////////////////////////////////////////////
 void TurbulenceIntensityCoProcessor::calculateAverageValues(double timeStep)
 {
+    using namespace vf::lbm::dir;
     using namespace D3Q27System;
 
     int minInitLevel = this->grid->getCoarsestInitializedLevel();
diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
index 00fe28089..8ee1d0c57 100644
--- a/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/CoProcessors/WriteMultiphaseQuantitiesCoProcessor.cpp
@@ -148,6 +148,8 @@ void WriteMultiphaseQuantitiesCoProcessor::addDataMQ(SPtr<Block3D> block)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+    using namespace vf::lbm::dir;
+
     SPtr<LBMKernel> kernel = dynamicPointerCast<LBMKernel>(block->getKernel());
     //double level   = (double)block->getLevel();
 
@@ -502,6 +504,8 @@ LBMReal WriteMultiphaseQuantitiesCoProcessor::gradX3_phi(const LBMReal *const &h
 
 LBMReal WriteMultiphaseQuantitiesCoProcessor::nabla2_phi(const LBMReal *const &h)
 {
+    using namespace vf::lbm::dir;
+
     using namespace D3Q27System;
     LBMReal sum = 0.0;
     for (int k = FSTARTDIR; k <= FENDDIR; k++) {
diff --git a/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h b/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h
index 00ba4c4e9..9ecbf7de9 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/CoarseToFineVectorConnector.h
@@ -156,15 +156,17 @@ CoarseToFineVectorConnector<VectorTransmitter>::CoarseToFineVectorConnector(
       receiverEvenOddNW(receiverEvenOddNW), receiverOddEvenSE(receiverOddEvenSE), receiverOddOddNE(receiverOddOddNE),
       iprocessor(iprocessor)
 {
-    if (!(sendDir == D3Q27System::DIR_P00 || sendDir == D3Q27System::DIR_M00 || sendDir == D3Q27System::DIR_0P0 ||
-          sendDir == D3Q27System::DIR_0M0 || sendDir == D3Q27System::DIR_00P || sendDir == D3Q27System::DIR_00M ||
-          sendDir == D3Q27System::DIR_PP0 || sendDir == D3Q27System::DIR_MM0 || sendDir == D3Q27System::DIR_PM0 ||
-          sendDir == D3Q27System::DIR_MP0 || sendDir == D3Q27System::DIR_P0P || sendDir == D3Q27System::DIR_M0M ||
-          sendDir == D3Q27System::DIR_P0M || sendDir == D3Q27System::DIR_M0P || sendDir == D3Q27System::DIR_0PP ||
-          sendDir == D3Q27System::DIR_0MM || sendDir == D3Q27System::DIR_0PM || sendDir == D3Q27System::DIR_0MP ||
-          sendDir == D3Q27System::DIR_PPP || sendDir == D3Q27System::DIR_MPP || sendDir == D3Q27System::DIR_PMP ||
-          sendDir == D3Q27System::DIR_MMP || sendDir == D3Q27System::DIR_PPM || sendDir == D3Q27System::DIR_MPM ||
-          sendDir == D3Q27System::DIR_PMM || sendDir == D3Q27System::DIR_MMM)) {
+    using namespace vf::lbm::dir;
+
+    if (!(sendDir == DIR_P00 || sendDir == DIR_M00 || sendDir == DIR_0P0 ||
+          sendDir == DIR_0M0 || sendDir == DIR_00P || sendDir == DIR_00M ||
+          sendDir == DIR_PP0 || sendDir == DIR_MM0 || sendDir == DIR_PM0 ||
+          sendDir == DIR_MP0 || sendDir == DIR_P0P || sendDir == DIR_M0M ||
+          sendDir == DIR_P0M || sendDir == DIR_M0P || sendDir == DIR_0PP ||
+          sendDir == DIR_0MM || sendDir == DIR_0PM || sendDir == DIR_0MP ||
+          sendDir == DIR_PPP || sendDir == DIR_MPP || sendDir == DIR_PMP ||
+          sendDir == DIR_MMP || sendDir == DIR_PPM || sendDir == DIR_MPM ||
+          sendDir == DIR_PMM || sendDir == DIR_MMM)) {
         throw UbException(UB_EXARGS, "invalid constructor for this direction");
     }
 }
@@ -298,6 +300,7 @@ template <typename VectorTransmitter>
 void CoarseToFineVectorConnector<VectorTransmitter>::init()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     bMaxX1 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX1();
     bMaxX2 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX2();
@@ -386,6 +389,7 @@ template <typename VectorTransmitter>
 void CoarseToFineVectorConnector<VectorTransmitter>::fillSendVectors()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     SPtr<DistributionArray3D> fFrom = block.lock()->getKernel()->getDataSet()->getFdistributions();
     int maxX1                       = (int)fFrom->getNX1();
@@ -889,6 +893,7 @@ template <typename VectorTransmitter>
 void CoarseToFineVectorConnector<VectorTransmitter>::distributeReceiveVectors()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     SPtr<DistributionArray3D> fTo = block.lock()->getKernel()->getDataSet()->getFdistributions();
     int maxX1                     = (int)fTo->getNX1();
@@ -1627,6 +1632,8 @@ void CoarseToFineVectorConnector<VectorTransmitter>::getLocalMinMax(int &minX1,
                                                                     int &maxX2, int &maxX3)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     int TminX1 = minX1;
     int TminX2 = minX2;
     int TminX3 = minX3;
@@ -1767,6 +1774,8 @@ void CoarseToFineVectorConnector<VectorTransmitter>::getLocalMinMax(int &minX1,
                                                                     CFconnectorType /*connType*/)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     int TminX1 = minX1;
     int TminX2 = minX2;
     int TminX3 = minX3;
@@ -1923,6 +1932,8 @@ void CoarseToFineVectorConnector<VectorTransmitter>::findCFnodes()
     int lMinX1, lMinX2, lMinX3, lMaxX1, lMaxX2, lMaxX3;
 
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     if (block.lock()->hasInterpolationFlagCF(DIR_M00)) {
         lMinX1 = 1;
         lMaxX1 = lMinX1 + 1;
diff --git a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h
index 854402805..5ae61ddf0 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnector.h
@@ -144,16 +144,18 @@ FineToCoarseVectorConnector<VectorTransmitter>::FineToCoarseVectorConnector(SPtr
     : Block3DConnector(sendDir), block(block), sender(sender), receiver(receiver), iprocessor(iprocessor),
       connType(connType)
 {
-    if (!(sendDir == D3Q27System::DIR_P00 || sendDir == D3Q27System::DIR_M00 || sendDir == D3Q27System::DIR_0P0 ||
-          sendDir == D3Q27System::DIR_0M0 || sendDir == D3Q27System::DIR_00P || sendDir == D3Q27System::DIR_00M ||
-          sendDir == D3Q27System::DIR_PP0 || sendDir == D3Q27System::DIR_MM0 || sendDir == D3Q27System::DIR_PM0 ||
-          sendDir == D3Q27System::DIR_MP0 || sendDir == D3Q27System::DIR_P0P || sendDir == D3Q27System::DIR_M0M ||
-          sendDir == D3Q27System::DIR_P0M || sendDir == D3Q27System::DIR_M0P || sendDir == D3Q27System::DIR_0PP ||
-          sendDir == D3Q27System::DIR_0MM || sendDir == D3Q27System::DIR_0PM || sendDir == D3Q27System::DIR_0MP
+    using namespace vf::lbm::dir;
 
-          || sendDir == D3Q27System::DIR_PPP || sendDir == D3Q27System::DIR_MPP || sendDir == D3Q27System::DIR_PMP ||
-          sendDir == D3Q27System::DIR_MMP || sendDir == D3Q27System::DIR_PPM || sendDir == D3Q27System::DIR_MPM ||
-          sendDir == D3Q27System::DIR_PMM || sendDir == D3Q27System::DIR_MMM
+    if (!(sendDir == DIR_P00 || sendDir == DIR_M00 || sendDir == DIR_0P0 ||
+          sendDir == DIR_0M0 || sendDir == DIR_00P || sendDir == DIR_00M ||
+          sendDir == DIR_PP0 || sendDir == DIR_MM0 || sendDir == DIR_PM0 ||
+          sendDir == DIR_MP0 || sendDir == DIR_P0P || sendDir == DIR_M0M ||
+          sendDir == DIR_P0M || sendDir == DIR_M0P || sendDir == DIR_0PP ||
+          sendDir == DIR_0MM || sendDir == DIR_0PM || sendDir == DIR_0MP
+
+          || sendDir == DIR_PPP || sendDir == DIR_MPP || sendDir == DIR_PMP ||
+          sendDir == DIR_MMP || sendDir == DIR_PPM || sendDir == DIR_MPM ||
+          sendDir == DIR_PMM || sendDir == DIR_MMM
 
           )) {
         throw UbException(UB_EXARGS, "invalid constructor for this direction");
@@ -224,6 +226,7 @@ template <typename VectorTransmitter>
 void FineToCoarseVectorConnector<VectorTransmitter>::init()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     bMaxX1 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX1();
     bMaxX2 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX2();
@@ -286,6 +289,7 @@ template <typename VectorTransmitter>
 void FineToCoarseVectorConnector<VectorTransmitter>::fillSendVectors()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     SPtr<DistributionArray3D> fFrom = block.lock()->getKernel()->getDataSet()->getFdistributions();
     int maxX1                       = (int)fFrom->getNX1();
@@ -849,6 +853,7 @@ template <typename VectorTransmitter>
 void FineToCoarseVectorConnector<VectorTransmitter>::distributeReceiveVectors()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     SPtr<DistributionArray3D> fTo = block.lock()->getKernel()->getDataSet()->getFdistributions();
     int maxX1                     = (int)fTo->getNX1();
@@ -1157,6 +1162,8 @@ void FineToCoarseVectorConnector<VectorTransmitter>::getLocalMinMax(int &minX1,
                                                                     int &maxX2, int &maxX3)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+    
     int TminX1 = minX1;
     int TminX2 = minX2;
     int TminX3 = minX3;
@@ -1298,6 +1305,8 @@ void FineToCoarseVectorConnector<VectorTransmitter>::getLocalMinMax(int &minX1,
                                                                     CFconnectorType /*connType*/)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     int TminX1 = minX1;
     int TminX2 = minX2;
     int TminX3 = minX3;
@@ -1447,6 +1456,7 @@ void FineToCoarseVectorConnector<VectorTransmitter>::getLocalMins(int &minX1, in
                                                                   const int &oMinX2, const int &oMinX3)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
 
     switch (sendDir) {
         case DIR_P00:
diff --git a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnectorTest.cpp b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnectorTest.cpp
index 31a01276c..8a38a055c 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnectorTest.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/FineToCoarseVectorConnectorTest.cpp
@@ -25,7 +25,9 @@ public:
 
 TEST_F(FineToCoarseVectorConnectorTest, getLocalMinMax)
 {
-    int sendDir = D3Q27System::DIR_P00;
+    using namespace vf::lbm::dir;
+
+    int sendDir = DIR_P00;
     block->setInterpolationFlagFC(sendDir);
     //FineToCoarseVectorConnector(SPtr<Block3D> block, VectorTransmitterPtr sender, VectorTransmitterPtr receiver,
                                 //int sendDir, InterpolationProcessorPtr iprocessor, CFconnectorType connType);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/FullDirectConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/FullDirectConnector.cpp
index 18a831958..7a12ef1bb 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/FullDirectConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/FullDirectConnector.cpp
@@ -59,8 +59,10 @@ void FullDirectConnector::sendVectors()
 //////////////////////////////////////////////////////////////////////////
 void FullDirectConnector::exchangeData()
 {
+    using namespace vf::lbm::dir;
+
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 exchangeData(maxX1 - 1, x2, x3, 0, x2, x3);
@@ -68,7 +70,7 @@ void FullDirectConnector::exchangeData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 exchangeData(1, x2, x3, maxX1, x2, x3);
@@ -76,7 +78,7 @@ void FullDirectConnector::exchangeData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 exchangeData(x1, maxX2 - 1, x3, x1, 0, x3);
@@ -84,7 +86,7 @@ void FullDirectConnector::exchangeData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 exchangeData(x1, 1, x3, x1, maxX2, x3);
@@ -93,7 +95,7 @@ void FullDirectConnector::exchangeData()
     }
 
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 exchangeData(x1, x2, maxX3 - 1, x1, x2, 0);
@@ -101,7 +103,7 @@ void FullDirectConnector::exchangeData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 exchangeData(x1, x2, 1, x1, x2, maxX3);
@@ -109,77 +111,77 @@ void FullDirectConnector::exchangeData()
         }
     }
     // NORTHEAST
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             exchangeData(maxX1 - 1, maxX2 - 1, x3, 0, 0, x3);
         }
     }
     // NORTHWEST
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             exchangeData(1, maxX2 - 1, x3, maxX1, 0, x3);
         }
     }
     // SOUTHWEST
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             exchangeData(1, 1, x3, maxX1, maxX2, x3);
         }
     }
     // SOUTHEAST
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             exchangeData(maxX1 - 1, 1, x3, 0, maxX2, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_P0P)
+    } else if (sendDir == DIR_P0P)
         for (int x2 = 1; x2 < maxX2; x2++) {
             exchangeData(maxX1 - 1, x2, maxX3 - 1, 0, x2, 0);
         }
-    else if (sendDir == D3Q27System::DIR_M0M)
+    else if (sendDir == DIR_M0M)
         for (int x2 = 1; x2 < maxX2; x2++) {
             exchangeData(1, x2, 1, maxX1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = 1; x2 < maxX2; x2++) {
             exchangeData(maxX1 - 1, x2, 1, 0, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = 1; x2 < maxX2; x2++) {
             exchangeData(1, x2, maxX3 - 1, maxX1, x2, 0);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = 1; x1 < maxX1; x1++) {
             exchangeData(x1, maxX2 - 1, maxX3 - 1, x1, 0, 0);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = 1; x1 < maxX1; x1++) {
             exchangeData(x1, 1, 1, x1, maxX2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = 1; x1 < maxX1; x1++) {
             exchangeData(x1, maxX2 - 1, 1, x1, 0, maxX3);
         }
 
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = 1; x1 < maxX1; x1++) {
             exchangeData(x1, 1, maxX3 - 1, x1, maxX2, 0);
         }
 
-    else if (sendDir == D3Q27System::DIR_MMP) {
+    else if (sendDir == DIR_MMP) {
         exchangeData(1, 1, maxX3 - 1, maxX1, maxX2, 0);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         exchangeData(maxX1 - 1, 1, maxX3 - 1, 0, maxX2, 0);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         exchangeData(1, maxX2 - 1, maxX3 - 1, maxX1, 0, 0);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         exchangeData(maxX1 - 1, maxX2 - 1, maxX3 - 1, 0, 0, 0);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         exchangeData(1, 1, 1, maxX1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         exchangeData(maxX1 - 1, 1, 1, 0, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         exchangeData(1, maxX2 - 1, 1, maxX1, 0, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PPM) {
+    } else if (sendDir == DIR_PPM) {
         exchangeData(maxX1 - 1, maxX2 - 1, 1, 0, 0, maxX3);
     } else
         UB_THROW(UbException(UB_EXARGS, "unknown dir"));
diff --git a/src/cpu/VirtualFluidsCore/Connectors/FullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/FullVectorConnector.cpp
index d5b810015..d4cb17d15 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/FullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/FullVectorConnector.cpp
@@ -59,11 +59,13 @@ void FullVectorConnector::fillSendVectors()
 ////////////////////////////////////////////////////////////////////////
 void FullVectorConnector::fillData()
 {
+    using namespace vf::lbm::dir;
+
     vector_type &sdata = sender->getData();
 
     int index = 0;
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 fillData(sdata, index, maxX1 - 1, x2, x3);
@@ -71,7 +73,7 @@ void FullVectorConnector::fillData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 fillData(sdata, index, 1, x2, x3);
@@ -79,7 +81,7 @@ void FullVectorConnector::fillData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 fillData(sdata, index, x1, maxX2 - 1, x3);
@@ -87,7 +89,7 @@ void FullVectorConnector::fillData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 fillData(sdata, index, x1, 1, x3);
@@ -95,7 +97,7 @@ void FullVectorConnector::fillData()
         }
     }
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 fillData(sdata, index, x1, x2, maxX3 - 1);
@@ -103,7 +105,7 @@ void FullVectorConnector::fillData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 fillData(sdata, index, x1, x2, 1);
@@ -111,24 +113,24 @@ void FullVectorConnector::fillData()
         }
     }
     // NE NW SW SE
-    else if (sendDir == D3Q27System::DIR_PP0 || sendDir == D3Q27System::DIR_MP0 || sendDir == D3Q27System::DIR_MM0 ||
-             sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PP0 || sendDir == DIR_MP0 || sendDir == DIR_MM0 ||
+             sendDir == DIR_PM0) {
         int x1 = 0;
         int x2 = 0;
         switch (sendDir) {
-            case D3Q27System::DIR_PP0:
+            case DIR_PP0:
                 x1 = maxX1 - 1;
                 x2 = maxX2 - 1;
                 break;
-            case D3Q27System::DIR_MP0:
+            case DIR_MP0:
                 x1 = 1;
                 x2 = maxX2 - 1;
                 break;
-            case D3Q27System::DIR_MM0:
+            case DIR_MM0:
                 x1 = 1;
                 x2 = 1;
                 break;
-            case D3Q27System::DIR_PM0:
+            case DIR_PM0:
                 x1 = maxX1 - 1;
                 x2 = 1;
                 break;
@@ -138,24 +140,24 @@ void FullVectorConnector::fillData()
         }
     }
     // TE TW BW BE
-    else if (sendDir == D3Q27System::DIR_P0P || sendDir == D3Q27System::DIR_M0P || sendDir == D3Q27System::DIR_M0M ||
-             sendDir == D3Q27System::DIR_P0M) {
+    else if (sendDir == DIR_P0P || sendDir == DIR_M0P || sendDir == DIR_M0M ||
+             sendDir == DIR_P0M) {
         int x1 = 0;
         int x3 = 0;
         switch (sendDir) {
-            case D3Q27System::DIR_P0P:
+            case DIR_P0P:
                 x1 = maxX1 - 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_M0P:
+            case DIR_M0P:
                 x1 = 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_M0M:
+            case DIR_M0M:
                 x1 = 1;
                 x3 = 1;
                 break;
-            case D3Q27System::DIR_P0M:
+            case DIR_P0M:
                 x1 = maxX1 - 1;
                 x3 = 1;
                 break;
@@ -165,24 +167,24 @@ void FullVectorConnector::fillData()
         }
     }
     // TN BN BS TS
-    else if (sendDir == D3Q27System::DIR_0PP || sendDir == D3Q27System::DIR_0PM || sendDir == D3Q27System::DIR_0MM ||
-             sendDir == D3Q27System::DIR_0MP) {
+    else if (sendDir == DIR_0PP || sendDir == DIR_0PM || sendDir == DIR_0MM ||
+             sendDir == DIR_0MP) {
         int x2 = 0;
         int x3 = 0;
         switch (sendDir) {
-            case D3Q27System::DIR_0PP:
+            case DIR_0PP:
                 x3 = maxX3 - 1;
                 x2 = maxX2 - 1;
                 break;
-            case D3Q27System::DIR_0PM:
+            case DIR_0PM:
                 x3 = 1;
                 x2 = maxX2 - 1;
                 break;
-            case D3Q27System::DIR_0MM:
+            case DIR_0MM:
                 x3 = 1;
                 x2 = 1;
                 break;
-            case D3Q27System::DIR_0MP:
+            case DIR_0MP:
                 x3 = maxX3 - 1;
                 x2 = 1;
                 break;
@@ -192,49 +194,49 @@ void FullVectorConnector::fillData()
         }
     }
     // TNE TNW TSW TSE BNE BNW BSW BSE
-    else if (sendDir == D3Q27System::DIR_PPP || sendDir == D3Q27System::DIR_MPP || sendDir == D3Q27System::DIR_MMP ||
-             sendDir == D3Q27System::DIR_PMP || sendDir == D3Q27System::DIR_PPM || sendDir == D3Q27System::DIR_MPM ||
-             sendDir == D3Q27System::DIR_MMM || sendDir == D3Q27System::DIR_PMM) {
+    else if (sendDir == DIR_PPP || sendDir == DIR_MPP || sendDir == DIR_MMP ||
+             sendDir == DIR_PMP || sendDir == DIR_PPM || sendDir == DIR_MPM ||
+             sendDir == DIR_MMM || sendDir == DIR_PMM) {
         int x1 = 0;
         int x2 = 0;
         int x3 = 0;
         switch (sendDir) {
-            case D3Q27System::DIR_PPP:
+            case DIR_PPP:
                 x1 = maxX1 - 1;
                 x2 = maxX2 - 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_MPP:
+            case DIR_MPP:
                 x1 = 1;
                 x2 = maxX2 - 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_MMP:
+            case DIR_MMP:
                 x1 = 1;
                 x2 = 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_PMP:
+            case DIR_PMP:
                 x1 = maxX1 - 1;
                 x2 = 1;
                 x3 = maxX3 - 1;
                 break;
-            case D3Q27System::DIR_PPM:
+            case DIR_PPM:
                 x1 = maxX1 - 1;
                 x2 = maxX2 - 1;
                 x3 = 1;
                 break;
-            case D3Q27System::DIR_MPM:
+            case DIR_MPM:
                 x1 = 1;
                 x2 = maxX2 - 1;
                 x3 = 1;
                 break;
-            case D3Q27System::DIR_MMM:
+            case DIR_MMM:
                 x1 = 1;
                 x2 = 1;
                 x3 = 1;
                 break;
-            case D3Q27System::DIR_PMM:
+            case DIR_PMM:
                 x1 = maxX1 - 1;
                 x2 = 1;
                 x3 = 1;
@@ -253,41 +255,43 @@ void FullVectorConnector::distributeReceiveVectors()
 ////////////////////////////////////////////////////////////////////////
 void FullVectorConnector::distributeData()
 {
+    using namespace vf::lbm::dir;
+
     vector_type &rdata = receiver->getData();
 
     int index = 0;
 
-    if (sendDir == D3Q27System::DIR_M00) {
+    if (sendDir == DIR_M00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 distributeData(rdata, index, 0, x2, x3);
             }
         }
-    } else if (sendDir == D3Q27System::DIR_P00) {
+    } else if (sendDir == DIR_P00) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x2 = 1; x2 < maxX2; x2++) {
                 distributeData(rdata, index, maxX1, x2, x3);
             }
         }
-    } else if (sendDir == D3Q27System::DIR_0M0) {
+    } else if (sendDir == DIR_0M0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 distributeData(rdata, index, x1, 0, x3);
             }
         }
-    } else if (sendDir == D3Q27System::DIR_0P0) {
+    } else if (sendDir == DIR_0P0) {
         for (int x3 = 1; x3 < maxX3; x3++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 distributeData(rdata, index, x1, maxX2, x3);
             }
         }
-    } else if (sendDir == D3Q27System::DIR_00M) {
+    } else if (sendDir == DIR_00M) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 distributeData(rdata, index, x1, x2, 0);
             }
         }
-    } else if (sendDir == D3Q27System::DIR_00P) {
+    } else if (sendDir == DIR_00P) {
         for (int x2 = 1; x2 < maxX2; x2++) {
             for (int x1 = 1; x1 < maxX1; x1++) {
                 distributeData(rdata, index, x1, x2, maxX3);
@@ -295,25 +299,25 @@ void FullVectorConnector::distributeData()
         }
     }
     // NE NW SW SE
-    else if (sendDir == D3Q27System::DIR_PP0 || sendDir == D3Q27System::DIR_MP0 || sendDir == D3Q27System::DIR_MM0 ||
-             sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PP0 || sendDir == DIR_MP0 || sendDir == DIR_MM0 ||
+             sendDir == DIR_PM0) {
         int x1 = 0;
         int x2 = 0;
         switch (sendDir) // wenn sendir NE dann kommen werte von SW
         {
-            case D3Q27System::DIR_PP0:
+            case DIR_PP0:
                 x1 = maxX1;
                 x2 = maxX2;
                 break;
-            case D3Q27System::DIR_MP0:
+            case DIR_MP0:
                 x1 = 0;
                 x2 = maxX2;
                 break;
-            case D3Q27System::DIR_MM0:
+            case DIR_MM0:
                 x1 = 0;
                 x2 = 0;
                 break;
-            case D3Q27System::DIR_PM0:
+            case DIR_PM0:
                 x1 = maxX1;
                 x2 = 0;
                 break;
@@ -324,27 +328,27 @@ void FullVectorConnector::distributeData()
 
     }
     // TE TW BW BE
-    else if (sendDir == D3Q27System::DIR_P0P || sendDir == D3Q27System::DIR_M0P || sendDir == D3Q27System::DIR_M0M ||
-             sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0P || sendDir == DIR_M0P || sendDir == DIR_M0M ||
+             sendDir == DIR_P0M)
 
     {
         int x1 = 0;
         int x3 = 0;
         switch (sendDir) // wenn sendir NE dann kommen werte von SW
         {
-            case D3Q27System::DIR_P0P:
+            case DIR_P0P:
                 x1 = maxX1;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_M0P:
+            case DIR_M0P:
                 x1 = 0;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_M0M:
+            case DIR_M0M:
                 x1 = 0;
                 x3 = 0;
                 break;
-            case D3Q27System::DIR_P0M:
+            case DIR_P0M:
                 x1 = maxX1;
                 x3 = 0;
                 break;
@@ -354,24 +358,24 @@ void FullVectorConnector::distributeData()
         }
     }
     // TN BN BS TS
-    else if (sendDir == D3Q27System::DIR_0PP || sendDir == D3Q27System::DIR_0PM || sendDir == D3Q27System::DIR_0MM ||
-             sendDir == D3Q27System::DIR_0MP) {
+    else if (sendDir == DIR_0PP || sendDir == DIR_0PM || sendDir == DIR_0MM ||
+             sendDir == DIR_0MP) {
         int x2 = 0;
         int x3 = 0;
         switch (sendDir) {
-            case D3Q27System::DIR_0PP:
+            case DIR_0PP:
                 x3 = maxX3;
                 x2 = maxX2;
                 break;
-            case D3Q27System::DIR_0PM:
+            case DIR_0PM:
                 x3 = 0;
                 x2 = maxX2;
                 break;
-            case D3Q27System::DIR_0MM:
+            case DIR_0MM:
                 x3 = 0;
                 x2 = 0;
                 break;
-            case D3Q27System::DIR_0MP:
+            case DIR_0MP:
                 x3 = maxX3;
                 x2 = 0;
                 break;
@@ -381,50 +385,50 @@ void FullVectorConnector::distributeData()
         }
     }
     // TNE TNW TSW TSE BNE BNW BSW BSE
-    else if (sendDir == D3Q27System::DIR_PPP || sendDir == D3Q27System::DIR_MPP || sendDir == D3Q27System::DIR_MMP ||
-             sendDir == D3Q27System::DIR_PMP || sendDir == D3Q27System::DIR_PPM || sendDir == D3Q27System::DIR_MPM ||
-             sendDir == D3Q27System::DIR_MMM || sendDir == D3Q27System::DIR_PMM) {
+    else if (sendDir == DIR_PPP || sendDir == DIR_MPP || sendDir == DIR_MMP ||
+             sendDir == DIR_PMP || sendDir == DIR_PPM || sendDir == DIR_MPM ||
+             sendDir == DIR_MMM || sendDir == DIR_PMM) {
         int x1 = 0;
         int x2 = 0;
         int x3 = 0;
 
         switch (sendDir) {
-            case D3Q27System::DIR_PPP:
+            case DIR_PPP:
                 x1 = maxX1;
                 x2 = maxX2;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_MPP:
+            case DIR_MPP:
                 x1 = 0;
                 x2 = maxX2;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_MMP:
+            case DIR_MMP:
                 x1 = 0;
                 x2 = 0;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_PMP:
+            case DIR_PMP:
                 x1 = maxX1;
                 x2 = 0;
                 x3 = maxX3;
                 break;
-            case D3Q27System::DIR_PPM:
+            case DIR_PPM:
                 x1 = maxX1;
                 x2 = maxX2;
                 x3 = 0;
                 break;
-            case D3Q27System::DIR_MPM:
+            case DIR_MPM:
                 x1 = 0;
                 x2 = maxX2;
                 x3 = 0;
                 break;
-            case D3Q27System::DIR_MMM:
+            case DIR_MMM:
                 x1 = 0;
                 x2 = 0;
                 x3 = 0;
                 break;
-            case D3Q27System::DIR_PMM:
+            case DIR_PMM:
                 x1 = maxX1;
                 x2 = 0;
                 x3 = 0;
diff --git a/src/cpu/VirtualFluidsCore/Connectors/OneDistributionFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/OneDistributionFullVectorConnector.cpp
index 72f43858a..1bdb92f6b 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/OneDistributionFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/OneDistributionFullVectorConnector.cpp
@@ -12,57 +12,59 @@ OneDistributionFullVectorConnector::OneDistributionFullVectorConnector(SPtr<Bloc
 //////////////////////////////////////////////////////////////////////////
 void OneDistributionFullVectorConnector::init()
 {
+    using namespace vf::lbm::dir;
+
     FullVectorConnector::init();
     
     fDis = dynamicPointerCast<EsoTwist3D>(block.lock()->getKernel()->getDataSet()->getFdistributions());
 
     int anz = 27;
     switch (sendDir) {
-        case D3Q27System::DIR_000:
+        case DIR_000:
             UB_THROW(UbException(UB_EXARGS, "ZERO not allowed"));
             break;
-        case D3Q27System::DIR_P00:
-        case D3Q27System::DIR_M00:
+        case DIR_P00:
+        case DIR_M00:
             sender->getData().resize(maxX2 * maxX3 * anz, 0.0);
             break;
-        case D3Q27System::DIR_0P0:
-        case D3Q27System::DIR_0M0:
+        case DIR_0P0:
+        case DIR_0M0:
             sender->getData().resize(maxX1 * maxX3 * anz, 0.0);
             break;
-        case D3Q27System::DIR_00P:
-        case D3Q27System::DIR_00M:
+        case DIR_00P:
+        case DIR_00M:
             sender->getData().resize(maxX1 * maxX2 * anz, 0.0);
             break;
 
-        case D3Q27System::DIR_PP0:
-        case D3Q27System::DIR_MM0:
-        case D3Q27System::DIR_PM0:
-        case D3Q27System::DIR_MP0:
+        case DIR_PP0:
+        case DIR_MM0:
+        case DIR_PM0:
+        case DIR_MP0:
             sender->getData().resize(maxX3 * anz, 0.0);
             break;
 
-        case D3Q27System::DIR_P0P:
-        case D3Q27System::DIR_M0M:
-        case D3Q27System::DIR_P0M:
-        case D3Q27System::DIR_M0P:
+        case DIR_P0P:
+        case DIR_M0M:
+        case DIR_P0M:
+        case DIR_M0P:
             sender->getData().resize(maxX2 * anz, 0.0);
             break;
 
-        case D3Q27System::DIR_0PP:
-        case D3Q27System::DIR_0MM:
-        case D3Q27System::DIR_0PM:
-        case D3Q27System::DIR_0MP:
+        case DIR_0PP:
+        case DIR_0MM:
+        case DIR_0PM:
+        case DIR_0MP:
             sender->getData().resize(maxX1 * anz, 0.0);
             break;
 
-        case D3Q27System::DIR_PPP:
-        case D3Q27System::DIR_MMM:
-        case D3Q27System::DIR_PPM:
-        case D3Q27System::DIR_MMP:
-        case D3Q27System::DIR_PMP:
-        case D3Q27System::DIR_MPM:
-        case D3Q27System::DIR_PMM:
-        case D3Q27System::DIR_MPP:
+        case DIR_PPP:
+        case DIR_MMM:
+        case DIR_PPM:
+        case DIR_MMP:
+        case DIR_PMP:
+        case DIR_MPM:
+        case DIR_PMM:
+        case DIR_MPP:
             sender->getData().resize(anz, 0.0);
             break;
 
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
index 782b0f27d..485674312 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullDirectConnector.cpp
@@ -63,6 +63,8 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::sendVectors()
 //////////////////////////////////////////////////////////////////////////
 void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
 {
+    using namespace vf::lbm::dir;
+
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
     // maxX1m3 maxX1m2 ... minX1p2 minX1p3 - regular nodes
@@ -94,7 +96,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
     int maxX3m3 = maxX3 - 3;
 
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 exchangeData(maxX1m3, x2, x3, minX1, x2, x3);
@@ -103,7 +105,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 exchangeData(minX1p3, x2, x3, maxX1, x2, x3);
@@ -112,7 +114,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, maxX2m3, x3, x1, minX2, x3);
@@ -121,7 +123,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, minX2p3, x3, x1, maxX2, x3);
@@ -131,7 +133,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
     }
 
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, x2, maxX3m3, x1, x2, minX3);
@@ -140,7 +142,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, x2, minX3p3, x1, x2, maxX3);
@@ -149,7 +151,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTHEAST
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(maxX1m3, maxX2m3, x3, minX1, minX2, x3);
             exchangeData(maxX1m2, maxX2m2, x3, minX1p1, minX2p1, x3);
@@ -158,7 +160,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTHWEST
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(minX1p3, maxX2m3, x3, maxX1, minX2, x3);
             exchangeData(minX1p2, maxX2m2, x3, maxX1m1, minX2p1, x3);
@@ -167,7 +169,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTHWEST
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(minX1p3, minX2p3, x3, maxX1, maxX2, x3);
             exchangeData(minX1p2, minX2p2, x3, maxX1m1, maxX2m1, x3);
@@ -176,70 +178,70 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTHEAST
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(maxX1m3, minX2p3, x3, minX1, maxX2, x3);
             exchangeData(maxX1m2, minX2p2, x3, minX1p1, maxX2m1, x3);
             exchangeData(maxX1m3, minX2p2, x3, minX1, maxX2m1, x3);
             exchangeData(maxX1m2, minX2p3, x3, minX1p1, maxX2, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_P0P)
+    } else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(maxX1m3, x2, maxX3m3, minX1, x2, minX3);
             exchangeData(maxX1m2, x2, maxX3m2, minX1p1, x2, minX3p1);
             exchangeData(maxX1m3, x2, maxX3m2, minX1, x2, minX3p1);
             exchangeData(maxX1m2, x2, maxX3m3, minX1p1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0M)
+    else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(minX1p3, x2, minX3p3, maxX1, x2, maxX3);
             exchangeData(minX1p2, x2, minX3p2, maxX1m1, x2, maxX3m1);
             exchangeData(minX1p3, x2, minX3p2, maxX1, x2, maxX3m1);
             exchangeData(minX1p2, x2, minX3p3, maxX1m1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(maxX1m3, x2, minX3p3, minX1, x2, maxX3);
             exchangeData(maxX1m2, x2, minX3p2, minX1p1, x2, maxX3m1);
             exchangeData(maxX1m3, x2, minX3p2, minX1, x2, maxX3m1);
             exchangeData(maxX1m2, x2, minX3p3, minX1p1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(minX1p3, x2, maxX3m3, maxX1, x2, minX3);
             exchangeData(minX1p2, x2, maxX3m2, maxX1m1, x2, minX3p1);
             exchangeData(minX1p3, x2, maxX3m2, maxX1, x2, minX3p1);
             exchangeData(minX1p2, x2, maxX3m3, maxX1m1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, maxX2m3, maxX3m3, x1, minX2, minX3);
             exchangeData(x1, maxX2m2, maxX3m2, x1, minX2p1, minX3p1);
             exchangeData(x1, maxX2m3, maxX3m2, x1, minX2, minX3p1);
             exchangeData(x1, maxX2m2, maxX3m3, x1, minX2p1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, minX2p3, minX3p3, x1, maxX2, maxX3);
             exchangeData(x1, minX2p2, minX3p2, x1, maxX2m1, maxX3m1);
             exchangeData(x1, minX2p3, minX3p2, x1, maxX2, maxX3m1);
             exchangeData(x1, minX2p2, minX3p3, x1, maxX2m1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, maxX2m3, minX3p3, x1, minX2, maxX3);
             exchangeData(x1, maxX2m2, minX3p2, x1, minX2p1, maxX3m1);
             exchangeData(x1, maxX2m3, minX3p2, x1, minX2, maxX3m1);
             exchangeData(x1, maxX2m2, minX3p3, x1, minX2p1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, minX2p3, maxX3m3, x1, maxX2, minX3);
             exchangeData(x1, minX2p2, maxX3m2, x1, maxX2m1, minX3p1);
             exchangeData(x1, minX2p3, maxX3m2, x1, maxX2, minX3p1);
             exchangeData(x1, minX2p2, maxX3m3, x1, maxX2m1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_MMP) {
+    else if (sendDir == DIR_MMP) {
         exchangeData(minX1p3, minX2p3, maxX3m3, maxX1, maxX2, minX3);
         exchangeData(minX1p2, minX2p2, maxX3m2, maxX1m1, maxX2m1, minX3p1);
         exchangeData(minX1p3, minX2p2, maxX3m2, maxX1, maxX2m1, minX3p1);
@@ -248,7 +250,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, minX2p3, maxX3m2, maxX1, maxX2, minX3p1);
         exchangeData(minX1p3, minX2p2, maxX3m3, maxX1, maxX2m1, minX3);
         exchangeData(minX1p2, minX2p3, maxX3m3, maxX1m1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         exchangeData(maxX1m3, minX1p3, maxX3m3, minX1, maxX2, minX3);
         exchangeData(maxX1m2, minX1p2, maxX3m2, minX1p1, maxX2m1, minX3p1);
         exchangeData(maxX1m3, minX1p2, maxX3m2, minX1, maxX2m1, minX3p1);
@@ -257,7 +259,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, minX1p3, maxX3m2, minX1, maxX2, minX3p1);
         exchangeData(maxX1m3, minX1p2, maxX3m3, minX1, maxX2m1, minX3);
         exchangeData(maxX1m2, minX1p3, maxX3m3, minX1p1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         exchangeData(minX1p3, maxX2m3, maxX3m3, maxX1, minX2, minX3);
         exchangeData(minX1p2, maxX2m2, maxX3m2, maxX1m1, minX2p1, minX3p1);
         exchangeData(minX1p3, maxX2m2, maxX3m2, maxX1, minX2p1, minX3p1);
@@ -266,7 +268,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, maxX2m3, maxX3m2, maxX1, minX2, minX3p1);
         exchangeData(minX1p3, maxX2m2, maxX3m3, maxX1, minX2p1, minX3);
         exchangeData(minX1p2, maxX2m3, maxX3m3, maxX1m1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         exchangeData(maxX1m3, maxX2m3, maxX3m3, minX1, minX2, minX3);
         exchangeData(maxX1m2, maxX2m2, maxX3m2, minX1p1, minX2p1, minX3p1);
         exchangeData(maxX1m3, maxX2m2, maxX3m2, minX1, minX2p1, minX3p1);
@@ -275,7 +277,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, maxX2m3, maxX3m2, minX1, minX2, minX3p1);
         exchangeData(maxX1m3, maxX2m2, maxX3m3, minX1, minX2p1, minX3);
         exchangeData(maxX1m2, maxX2m3, maxX3m3, minX1p1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         exchangeData(minX1p3, minX2p3, minX3p3, maxX1, maxX2, maxX3);
         exchangeData(minX1p2, minX2p2, minX3p2, maxX1m1, maxX2m1, maxX3m1);
         exchangeData(minX1p3, minX2p2, minX3p2, maxX1, maxX2m1, maxX3m1);
@@ -284,7 +286,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, minX2p3, minX3p2, maxX1, maxX2, maxX3m1);
         exchangeData(minX1p3, minX2p2, minX3p3, maxX1, maxX2m1, maxX3);
         exchangeData(minX1p2, minX2p3, minX3p3, maxX1m1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         exchangeData(maxX1m3, minX2p3, minX3p3, minX1, maxX2, maxX3);
         exchangeData(maxX1m2, minX2p2, minX3p2, minX1p1, maxX2m1, maxX3m1);
         exchangeData(maxX1m3, minX2p2, minX3p2, minX1, maxX2m1, maxX3m1);
@@ -293,7 +295,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, minX2p3, minX3p2, minX1, maxX2, maxX3m1);
         exchangeData(maxX1m3, minX2p2, minX3p3, minX1, maxX2m1, maxX3);
         exchangeData(maxX1m2, minX2p3, minX3p3, minX1p1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         exchangeData(minX1p3, maxX2m3, minX3p3, maxX1, minX2, maxX3);
         exchangeData(minX1p2, maxX2m2, minX3p2, maxX1m1, minX2p1, maxX3m1);
         exchangeData(minX1p3, maxX2m2, minX3p2, maxX1, minX2p1, maxX3m1);
@@ -302,7 +304,7 @@ void ThreeDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, maxX2m3, minX3p2, maxX1, minX2, maxX3m1);
         exchangeData(minX1p3, maxX2m2, minX3p3, maxX1, minX2p1, maxX3);
         exchangeData(minX1p2, maxX2m3, minX3p3, maxX1m1, minX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PPM) {
+    } else if (sendDir == DIR_PPM) {
         exchangeData(maxX1m3, maxX2m3, minX3p3, minX1, minX2, maxX3);
         exchangeData(maxX1m2, maxX2m2, minX3p2, minX1p1, minX2p1, maxX3m1);
         exchangeData(maxX1m3, maxX2m2, minX3p2, minX1, minX2p1, maxX3m1);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
index 0b94f7b4a..8334b93d2 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsDoubleGhostLayerFullVectorConnector.cpp
@@ -50,6 +50,8 @@ ThreeDistributionsDoubleGhostLayerFullVectorConnector::ThreeDistributionsDoubleG
 //////////////////////////////////////////////////////////////////////////
 void ThreeDistributionsDoubleGhostLayerFullVectorConnector::init()
 {
+    using namespace vf::lbm::dir;
+
    FullVectorConnector::init();
 
    fDis = dynamicPointerCast<EsoTwist3D>(block.lock()->getKernel()->getDataSet()->getFdistributions());
@@ -60,37 +62,37 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::init()
    int anz = 3*27+1;
    switch (sendDir)
    {
-   case D3Q27System::DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
-   case D3Q27System::DIR_P00:
-   case D3Q27System::DIR_M00: sender->getData().resize(maxX2*maxX3*anz*2, 0.0);   break;
-   case D3Q27System::DIR_0P0:
-   case D3Q27System::DIR_0M0: sender->getData().resize(maxX1*maxX3*anz*2, 0.0);   break;
-   case D3Q27System::DIR_00P:
-   case D3Q27System::DIR_00M: sender->getData().resize(maxX1*maxX2*anz*2, 0.0);   break;
+   case DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
+   case DIR_P00:
+   case DIR_M00: sender->getData().resize(maxX2*maxX3*anz*2, 0.0);   break;
+   case DIR_0P0:
+   case DIR_0M0: sender->getData().resize(maxX1*maxX3*anz*2, 0.0);   break;
+   case DIR_00P:
+   case DIR_00M: sender->getData().resize(maxX1*maxX2*anz*2, 0.0);   break;
 
-   case D3Q27System::DIR_PP0:
-   case D3Q27System::DIR_MM0:
-   case D3Q27System::DIR_PM0:
-   case D3Q27System::DIR_MP0:  sender->getData().resize(maxX3*anz*4, 0.0);   break;
+   case DIR_PP0:
+   case DIR_MM0:
+   case DIR_PM0:
+   case DIR_MP0:  sender->getData().resize(maxX3*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_P0P:
-   case D3Q27System::DIR_M0M:
-   case D3Q27System::DIR_P0M:
-   case D3Q27System::DIR_M0P:  sender->getData().resize(maxX2*anz*4, 0.0);   break;
+   case DIR_P0P:
+   case DIR_M0M:
+   case DIR_P0M:
+   case DIR_M0P:  sender->getData().resize(maxX2*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_0PP:
-   case D3Q27System::DIR_0MM:
-   case D3Q27System::DIR_0PM:
-   case D3Q27System::DIR_0MP:  sender->getData().resize(maxX1*anz*4, 0.0);   break;
+   case DIR_0PP:
+   case DIR_0MM:
+   case DIR_0PM:
+   case DIR_0MP:  sender->getData().resize(maxX1*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_PPP:
-   case D3Q27System::DIR_MMM:
-   case D3Q27System::DIR_PPM:
-   case D3Q27System::DIR_MMP:
-   case D3Q27System::DIR_PMP:
-   case D3Q27System::DIR_MPM:
-   case D3Q27System::DIR_PMM:
-   case D3Q27System::DIR_MPP:  sender->getData().resize(anz*8, 0.0);   break;
+   case DIR_PPP:
+   case DIR_MMM:
+   case DIR_PPM:
+   case DIR_MMP:
+   case DIR_PMP:
+   case DIR_MPM:
+   case DIR_PMM:
+   case DIR_MPP:  sender->getData().resize(anz*8, 0.0);   break;
 
    default: UB_THROW(UbException(UB_EXARGS, "unknown sendDir"));
    }
@@ -104,6 +106,8 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillSendVectors()
 ////////////////////////////////////////////////////////////////////////
 void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
 {
+    using namespace vf::lbm::dir;
+
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
     // maxX1m3 maxX1m2 ... minX1p2 minX1p3 - regular nodes
@@ -138,7 +142,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
 
     int index = 0;
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 fillData(sdata, index, maxX1m3, x2, x3);
@@ -147,7 +151,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 fillData(sdata, index, minX1p3, x2, x3);
@@ -156,7 +160,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, maxX2m3, x3);
@@ -165,7 +169,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, minX2p3, x3);
@@ -175,7 +179,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
     }
 
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, x2, maxX3m3);
@@ -184,7 +188,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, x2, minX3p3);
@@ -193,7 +197,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTHEAST
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, maxX1m3, maxX2m3, x3);
             fillData(sdata, index, maxX1m2, maxX2m2, x3);
@@ -202,7 +206,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTHWEST
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, minX1p3, maxX2m3, x3);
             fillData(sdata, index, minX1p2, maxX2m2, x3);
@@ -211,7 +215,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTHWEST
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, minX1p3, minX2p3, x3);
             fillData(sdata, index, minX1p2, minX2p2, x3);
@@ -220,70 +224,70 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTHEAST
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, maxX1m3, minX2p3, x3);
             fillData(sdata, index, maxX1m2, minX2p2, x3);
             fillData(sdata, index, maxX1m3, minX2p2, x3);
             fillData(sdata, index, maxX1m2, minX2p3, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_P0P)
+    } else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, maxX1m3, x2, maxX3m3);
             fillData(sdata, index, maxX1m2, x2, maxX3m2);
             fillData(sdata, index, maxX1m3, x2, maxX3m2);
             fillData(sdata, index, maxX1m2, x2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_M0M)
+    else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, minX1p3, x2, minX3p3);
             fillData(sdata, index, minX1p2, x2, minX3p2);
             fillData(sdata, index, minX1p3, x2, minX3p2);
             fillData(sdata, index, minX1p2, x2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, maxX1m3, x2, minX3p3);
             fillData(sdata, index, maxX1m2, x2, minX3p2);
             fillData(sdata, index, maxX1m3, x2, minX3p2);
             fillData(sdata, index, maxX1m2, x2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, minX1p3, x2, maxX3m3);
             fillData(sdata, index, minX1p2, x2, maxX3m2);
             fillData(sdata, index, minX1p3, x2, maxX3m2);
             fillData(sdata, index, minX1p2, x2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, maxX2m3, maxX3m3);
             fillData(sdata, index, x1, maxX2m2, maxX3m2);
             fillData(sdata, index, x1, maxX2m3, maxX3m2);
             fillData(sdata, index, x1, maxX2m2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, minX2p3, minX3p3);
             fillData(sdata, index, x1, minX2p2, minX3p2);
             fillData(sdata, index, x1, minX2p3, minX3p2);
             fillData(sdata, index, x1, minX2p2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, maxX2m3, minX3p3);
             fillData(sdata, index, x1, maxX2m2, minX3p2);
             fillData(sdata, index, x1, maxX2m3, minX3p2);
             fillData(sdata, index, x1, maxX2m2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, minX2p3, maxX3m3);
             fillData(sdata, index, x1, minX2p2, maxX3m2);
             fillData(sdata, index, x1, minX2p3, maxX3m2);
             fillData(sdata, index, x1, minX2p2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_MMP) {
+    else if (sendDir == DIR_MMP) {
         fillData(sdata, index, minX1p3, minX2p3, maxX3m3);
         fillData(sdata, index, minX1p2, minX2p2, maxX3m2);
         fillData(sdata, index, minX1p3, minX2p2, maxX3m2);
@@ -292,7 +296,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, minX2p3, maxX3m2);
         fillData(sdata, index, minX1p3, minX2p2, maxX3m3);
         fillData(sdata, index, minX1p2, minX2p3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         fillData(sdata, index, maxX1m3, minX1p3, maxX3m3);
         fillData(sdata, index, maxX1m2, minX1p2, maxX3m2);
         fillData(sdata, index, maxX1m3, minX1p2, maxX3m2);
@@ -301,7 +305,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, minX1p3, maxX3m2);
         fillData(sdata, index, maxX1m3, minX1p2, maxX3m3);
         fillData(sdata, index, maxX1m2, minX1p3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         fillData(sdata, index, minX1p3, maxX2m3, maxX3m3);
         fillData(sdata, index, minX1p2, maxX2m2, maxX3m2);
         fillData(sdata, index, minX1p3, maxX2m2, maxX3m2);
@@ -310,7 +314,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, maxX2m3, maxX3m2);
         fillData(sdata, index, minX1p3, maxX2m2, maxX3m3);
         fillData(sdata, index, minX1p2, maxX2m3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         fillData(sdata, index, maxX1m3, maxX2m3, maxX3m3);
         fillData(sdata, index, maxX1m2, maxX2m2, maxX3m2);
         fillData(sdata, index, maxX1m3, maxX2m2, maxX3m2);
@@ -319,7 +323,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, maxX2m3, maxX3m2);
         fillData(sdata, index, maxX1m3, maxX2m2, maxX3m3);
         fillData(sdata, index, maxX1m2, maxX2m3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         fillData(sdata, index, minX1p3, minX2p3, minX3p3);
         fillData(sdata, index, minX1p2, minX2p2, minX3p2);
         fillData(sdata, index, minX1p3, minX2p2, minX3p2);
@@ -328,7 +332,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, minX2p3, minX3p2);
         fillData(sdata, index, minX1p3, minX2p2, minX3p3);
         fillData(sdata, index, minX1p2, minX2p3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         fillData(sdata, index, maxX1m3, minX2p3, minX3p3);
         fillData(sdata, index, maxX1m2, minX2p2, minX3p2);
         fillData(sdata, index, maxX1m3, minX2p2, minX3p2);
@@ -337,7 +341,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, minX2p3, minX3p2);
         fillData(sdata, index, maxX1m3, minX2p2, minX3p3);
         fillData(sdata, index, maxX1m2, minX2p3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         fillData(sdata, index, minX1p3, maxX2m3, minX3p3);
         fillData(sdata, index, minX1p2, maxX2m2, minX3p2);
         fillData(sdata, index, minX1p3, maxX2m2, minX3p2);
@@ -346,7 +350,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, maxX2m3, minX3p2);
         fillData(sdata, index, minX1p3, maxX2m2, minX3p3);
         fillData(sdata, index, minX1p2, maxX2m3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_PPM) {
+    } else if (sendDir == DIR_PPM) {
         fillData(sdata, index, maxX1m3, maxX2m3, minX3p3);
         fillData(sdata, index, maxX1m2, maxX2m2, minX3p2);
         fillData(sdata, index, maxX1m3, maxX2m2, minX3p2);
@@ -367,6 +371,8 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeReceiveVec
 ////////////////////////////////////////////////////////////////////////
 void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
 {
+    using namespace vf::lbm::dir;
+
     vector_type &rdata = receiver->getData();
 
     int index = 0;
@@ -400,7 +406,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
     int maxX3m2 = maxX3 - 2;
     //int maxX3m3 = maxX3 - 3;
 
-    if (sendDir == D3Q27System::DIR_M00) {
+    if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 distributeData(rdata, index, minX1, x2, x3);
@@ -408,7 +414,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_P00) {
+    else if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 distributeData(rdata, index, maxX1, x2, x3);
@@ -416,7 +422,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, minX2, x3);
@@ -424,7 +430,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, maxX2, x3);
@@ -432,7 +438,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, x2, minX3);
@@ -440,7 +446,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, x2, maxX3);
@@ -448,7 +454,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, minX2, x3);
             distributeData(rdata, index, minX1p1, minX2p1, x3);
@@ -456,7 +462,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, minX1p1, minX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, minX2, x3);
             distributeData(rdata, index, maxX1m1, minX2p1, x3);
@@ -464,7 +470,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, maxX1m1, minX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, maxX2, x3);
             distributeData(rdata, index, maxX1m1, maxX2m1, x3);
@@ -472,70 +478,70 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, maxX1m1, maxX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, maxX2, x3);
             distributeData(rdata, index, minX1p1, maxX2m1, x3);
             distributeData(rdata, index, minX1, maxX2m1, x3);
             distributeData(rdata, index, minX1p1, maxX2, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_M0M)
+    } else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, minX1, x2, minX3);
             distributeData(rdata, index, minX1p1, x2, minX3p1);
             distributeData(rdata, index, minX1, x2, minX3p1);
             distributeData(rdata, index, minX1p1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0P)
+    else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, maxX1, x2, maxX3);
             distributeData(rdata, index, maxX1m1, x2, maxX3m1);
             distributeData(rdata, index, maxX1, x2, maxX3m1);
             distributeData(rdata, index, maxX1m1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, minX1, x2, maxX3);
             distributeData(rdata, index, minX1p1, x2, maxX3m1);
             distributeData(rdata, index, minX1, x2, maxX3m1);
             distributeData(rdata, index, minX1p1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, maxX1, x2, minX3);
             distributeData(rdata, index, maxX1m1, x2, minX3p1);
             distributeData(rdata, index, maxX1, x2, minX3p1);
             distributeData(rdata, index, maxX1m1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, minX2, minX3);
             distributeData(rdata, index, x1, minX2p1, minX3p1);
             distributeData(rdata, index, x1, minX2, minX3p1);
             distributeData(rdata, index, x1, minX2p1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, maxX2, maxX3);
             distributeData(rdata, index, x1, maxX2m1, maxX3m1);
             distributeData(rdata, index, x1, maxX2, maxX3m1);
             distributeData(rdata, index, x1, maxX2m1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, minX2, maxX3);
             distributeData(rdata, index, x1, minX2p1, maxX3m1);
             distributeData(rdata, index, x1, minX2, maxX3m1);
             distributeData(rdata, index, x1, minX2p1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, maxX2, minX3);
             distributeData(rdata, index, x1, maxX2m1, minX3p1);
             distributeData(rdata, index, x1, maxX2, minX3p1);
             distributeData(rdata, index, x1, maxX2m1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_PPM) {
+    else if (sendDir == DIR_PPM) {
         distributeData(rdata, index, maxX1, maxX2, minX3);
         distributeData(rdata, index, maxX1m1, maxX2m1, minX3p1);
         distributeData(rdata, index, maxX1, maxX2m1, minX3p1);
@@ -544,7 +550,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, maxX2, minX3p1);
         distributeData(rdata, index, maxX1, maxX2m1, minX3);
         distributeData(rdata, index, maxX1m1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         distributeData(rdata, index, minX1, maxX2, minX3);
         distributeData(rdata, index, minX1p1, maxX2m1, minX3p1);
         distributeData(rdata, index, minX1, maxX2m1, minX3p1);
@@ -553,7 +559,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, maxX2, minX3p1);
         distributeData(rdata, index, minX1, maxX2m1, minX3);
         distributeData(rdata, index, minX1p1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         distributeData(rdata, index, maxX1, minX2, minX3);
         distributeData(rdata, index, maxX1m1, minX2p1, minX3p1);
         distributeData(rdata, index, maxX1, minX2p1, minX3p1);
@@ -562,7 +568,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, minX2, minX3p1);
         distributeData(rdata, index, maxX1, minX2p1, minX3);
         distributeData(rdata, index, maxX1m1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         distributeData(rdata, index, minX1, minX2, minX3);
         distributeData(rdata, index, minX1p1, minX2p1, minX3p1);
         distributeData(rdata, index, minX1, minX2p1, minX3p1);
@@ -571,7 +577,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, minX2, minX3p1);
         distributeData(rdata, index, minX1, minX2p1, minX3);
         distributeData(rdata, index, minX1p1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         distributeData(rdata, index, maxX1, maxX2, maxX3);
         distributeData(rdata, index, maxX1m1, maxX2m1, maxX3m1);
         distributeData(rdata, index, maxX1, maxX2m1, maxX3m1);
@@ -580,7 +586,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, maxX2, maxX3m1);
         distributeData(rdata, index, maxX1, maxX2m1, maxX3);
         distributeData(rdata, index, maxX1m1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         distributeData(rdata, index, minX1, maxX2, maxX3);
         distributeData(rdata, index, minX1p1, maxX2m1, maxX3m1);
         distributeData(rdata, index, minX1, maxX2m1, maxX3m1);
@@ -589,7 +595,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, maxX2, maxX3m1);
         distributeData(rdata, index, minX1, maxX2m1, maxX3);
         distributeData(rdata, index, minX1p1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         distributeData(rdata, index, maxX1, minX2, maxX3);
         distributeData(rdata, index, maxX1m1, minX2p1, maxX3m1);
         distributeData(rdata, index, maxX1, minX2p1, maxX3m1);
@@ -598,7 +604,7 @@ void ThreeDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, minX2, maxX3m1);
         distributeData(rdata, index, maxX1, minX2p1, maxX3);
         distributeData(rdata, index, maxX1m1, minX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MMP) {
+    } else if (sendDir == DIR_MMP) {
         distributeData(rdata, index, minX1, minX2, maxX3);
         distributeData(rdata, index, minX1p1, minX2p1, maxX3m1);
         distributeData(rdata, index, minX1, minX2p1, maxX3m1);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector.cpp
index 534076b7b..1b4f243ee 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/ThreeDistributionsFullVectorConnector.cpp
@@ -50,6 +50,8 @@ ThreeDistributionsFullVectorConnector::ThreeDistributionsFullVectorConnector(SPt
 //////////////////////////////////////////////////////////////////////////
 void ThreeDistributionsFullVectorConnector::init()
 {
+    using namespace vf::lbm::dir;
+
    FullVectorConnector::init();
 
    fDis = dynamicPointerCast<EsoTwist3D>(block.lock()->getKernel()->getDataSet()->getFdistributions());
@@ -59,37 +61,37 @@ void ThreeDistributionsFullVectorConnector::init()
    int anz = 3*27;
    switch (sendDir)
    {
-   case D3Q27System::DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
-   case D3Q27System::DIR_P00:
-   case D3Q27System::DIR_M00: sender->getData().resize(maxX2*maxX3*anz, 0.0);   break;
-   case D3Q27System::DIR_0P0:
-   case D3Q27System::DIR_0M0: sender->getData().resize(maxX1*maxX3*anz, 0.0);   break;
-   case D3Q27System::DIR_00P:
-   case D3Q27System::DIR_00M: sender->getData().resize(maxX1*maxX2*anz, 0.0);   break;
+   case DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
+   case DIR_P00:
+   case DIR_M00: sender->getData().resize(maxX2*maxX3*anz, 0.0);   break;
+   case DIR_0P0:
+   case DIR_0M0: sender->getData().resize(maxX1*maxX3*anz, 0.0);   break;
+   case DIR_00P:
+   case DIR_00M: sender->getData().resize(maxX1*maxX2*anz, 0.0);   break;
 
-   case D3Q27System::DIR_PP0:
-   case D3Q27System::DIR_MM0:
-   case D3Q27System::DIR_PM0:
-   case D3Q27System::DIR_MP0:  sender->getData().resize(maxX3*anz, 0.0);   break;
+   case DIR_PP0:
+   case DIR_MM0:
+   case DIR_PM0:
+   case DIR_MP0:  sender->getData().resize(maxX3*anz, 0.0);   break;
 
-   case D3Q27System::DIR_P0P:
-   case D3Q27System::DIR_M0M:
-   case D3Q27System::DIR_P0M:
-   case D3Q27System::DIR_M0P:  sender->getData().resize(maxX2*anz, 0.0);   break;
+   case DIR_P0P:
+   case DIR_M0M:
+   case DIR_P0M:
+   case DIR_M0P:  sender->getData().resize(maxX2*anz, 0.0);   break;
 
-   case D3Q27System::DIR_0PP:
-   case D3Q27System::DIR_0MM:
-   case D3Q27System::DIR_0PM:
-   case D3Q27System::DIR_0MP:  sender->getData().resize(maxX1*anz, 0.0);   break;
+   case DIR_0PP:
+   case DIR_0MM:
+   case DIR_0PM:
+   case DIR_0MP:  sender->getData().resize(maxX1*anz, 0.0);   break;
 
-   case D3Q27System::DIR_PPP:
-   case D3Q27System::DIR_MMM:
-   case D3Q27System::DIR_PPM:
-   case D3Q27System::DIR_MMP:
-   case D3Q27System::DIR_PMP:
-   case D3Q27System::DIR_MPM:
-   case D3Q27System::DIR_PMM:
-   case D3Q27System::DIR_MPP:  sender->getData().resize(anz, 0.0);   break;
+   case DIR_PPP:
+   case DIR_MMM:
+   case DIR_PPM:
+   case DIR_MMP:
+   case DIR_PMP:
+   case DIR_MPM:
+   case DIR_PMM:
+   case DIR_MPP:  sender->getData().resize(anz, 0.0);   break;
 
    default: UB_THROW(UbException(UB_EXARGS, "unknown sendDir"));
    }
diff --git a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullDirectConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullDirectConnector.cpp
index b46ffebeb..121fef6b8 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullDirectConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullDirectConnector.cpp
@@ -61,6 +61,8 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::sendVectors()
 //////////////////////////////////////////////////////////////////////////
 void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
 {
+    using namespace vf::lbm::dir;
+
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
     // maxX1m3 maxX1m2 ... minX1p2 minX1p3 - regular nodes
@@ -92,7 +94,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
     int maxX3m3 = maxX3 - 3;
 
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 exchangeData(maxX1m3, x2, x3, minX1, x2, x3);
@@ -101,7 +103,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 exchangeData(minX1p3, x2, x3, maxX1, x2, x3);
@@ -110,7 +112,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, maxX2m3, x3, x1, minX2, x3);
@@ -119,7 +121,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, minX2p3, x3, x1, maxX2, x3);
@@ -129,7 +131,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
     }
 
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, x2, maxX3m3, x1, x2, minX3);
@@ -138,7 +140,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 exchangeData(x1, x2, minX3p3, x1, x2, maxX3);
@@ -147,7 +149,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTHEAST
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(maxX1m3, maxX2m3, x3, minX1, minX2, x3);
             exchangeData(maxX1m2, maxX2m2, x3, minX1p1, minX2p1, x3);
@@ -156,7 +158,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // NORTHWEST
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(minX1p3, maxX2m3, x3, maxX1, minX2, x3);
             exchangeData(minX1p2, maxX2m2, x3, maxX1m1, minX2p1, x3);
@@ -165,7 +167,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTHWEST
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(minX1p3, minX2p3, x3, maxX1, maxX2, x3);
             exchangeData(minX1p2, minX2p2, x3, maxX1m1, maxX2m1, x3);
@@ -174,70 +176,70 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         }
     }
     // SOUTHEAST
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             exchangeData(maxX1m3, minX2p3, x3, minX1, maxX2, x3);
             exchangeData(maxX1m2, minX2p2, x3, minX1p1, maxX2m1, x3);
             exchangeData(maxX1m3, minX2p2, x3, minX1, maxX2m1, x3);
             exchangeData(maxX1m2, minX2p3, x3, minX1p1, maxX2, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_P0P)
+    } else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(maxX1m3, x2, maxX3m3, minX1, x2, minX3);
             exchangeData(maxX1m2, x2, maxX3m2, minX1p1, x2, minX3p1);
             exchangeData(maxX1m3, x2, maxX3m2, minX1, x2, minX3p1);
             exchangeData(maxX1m2, x2, maxX3m3, minX1p1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0M)
+    else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(minX1p3, x2, minX3p3, maxX1, x2, maxX3);
             exchangeData(minX1p2, x2, minX3p2, maxX1m1, x2, maxX3m1);
             exchangeData(minX1p3, x2, minX3p2, maxX1, x2, maxX3m1);
             exchangeData(minX1p2, x2, minX3p3, maxX1m1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(maxX1m3, x2, minX3p3, minX1, x2, maxX3);
             exchangeData(maxX1m2, x2, minX3p2, minX1p1, x2, maxX3m1);
             exchangeData(maxX1m3, x2, minX3p2, minX1, x2, maxX3m1);
             exchangeData(maxX1m2, x2, minX3p3, minX1p1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             exchangeData(minX1p3, x2, maxX3m3, maxX1, x2, minX3);
             exchangeData(minX1p2, x2, maxX3m2, maxX1m1, x2, minX3p1);
             exchangeData(minX1p3, x2, maxX3m2, maxX1, x2, minX3p1);
             exchangeData(minX1p2, x2, maxX3m3, maxX1m1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, maxX2m3, maxX3m3, x1, minX2, minX3);
             exchangeData(x1, maxX2m2, maxX3m2, x1, minX2p1, minX3p1);
             exchangeData(x1, maxX2m3, maxX3m2, x1, minX2, minX3p1);
             exchangeData(x1, maxX2m2, maxX3m3, x1, minX2p1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, minX2p3, minX3p3, x1, maxX2, maxX3);
             exchangeData(x1, minX2p2, minX3p2, x1, maxX2m1, maxX3m1);
             exchangeData(x1, minX2p3, minX3p2, x1, maxX2, maxX3m1);
             exchangeData(x1, minX2p2, minX3p3, x1, maxX2m1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, maxX2m3, minX3p3, x1, minX2, maxX3);
             exchangeData(x1, maxX2m2, minX3p2, x1, minX2p1, maxX3m1);
             exchangeData(x1, maxX2m3, minX3p2, x1, minX2, maxX3m1);
             exchangeData(x1, maxX2m2, minX3p3, x1, minX2p1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             exchangeData(x1, minX2p3, maxX3m3, x1, maxX2, minX3);
             exchangeData(x1, minX2p2, maxX3m2, x1, maxX2m1, minX3p1);
             exchangeData(x1, minX2p3, maxX3m2, x1, maxX2, minX3p1);
             exchangeData(x1, minX2p2, maxX3m3, x1, maxX2m1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_MMP) {
+    else if (sendDir == DIR_MMP) {
         exchangeData(minX1p3, minX2p3, maxX3m3, maxX1, maxX2, minX3);
         exchangeData(minX1p2, minX2p2, maxX3m2, maxX1m1, maxX2m1, minX3p1);
         exchangeData(minX1p3, minX2p2, maxX3m2, maxX1, maxX2m1, minX3p1);
@@ -246,7 +248,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, minX2p3, maxX3m2, maxX1, maxX2, minX3p1);
         exchangeData(minX1p3, minX2p2, maxX3m3, maxX1, maxX2m1, minX3);
         exchangeData(minX1p2, minX2p3, maxX3m3, maxX1m1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         exchangeData(maxX1m3, minX1p3, maxX3m3, minX1, maxX2, minX3);
         exchangeData(maxX1m2, minX1p2, maxX3m2, minX1p1, maxX2m1, minX3p1);
         exchangeData(maxX1m3, minX1p2, maxX3m2, minX1, maxX2m1, minX3p1);
@@ -255,7 +257,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, minX1p3, maxX3m2, minX1, maxX2, minX3p1);
         exchangeData(maxX1m3, minX1p2, maxX3m3, minX1, maxX2m1, minX3);
         exchangeData(maxX1m2, minX1p3, maxX3m3, minX1p1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         exchangeData(minX1p3, maxX2m3, maxX3m3, maxX1, minX2, minX3);
         exchangeData(minX1p2, maxX2m2, maxX3m2, maxX1m1, minX2p1, minX3p1);
         exchangeData(minX1p3, maxX2m2, maxX3m2, maxX1, minX2p1, minX3p1);
@@ -264,7 +266,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, maxX2m3, maxX3m2, maxX1, minX2, minX3p1);
         exchangeData(minX1p3, maxX2m2, maxX3m3, maxX1, minX2p1, minX3);
         exchangeData(minX1p2, maxX2m3, maxX3m3, maxX1m1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         exchangeData(maxX1m3, maxX2m3, maxX3m3, minX1, minX2, minX3);
         exchangeData(maxX1m2, maxX2m2, maxX3m2, minX1p1, minX2p1, minX3p1);
         exchangeData(maxX1m3, maxX2m2, maxX3m2, minX1, minX2p1, minX3p1);
@@ -273,7 +275,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, maxX2m3, maxX3m2, minX1, minX2, minX3p1);
         exchangeData(maxX1m3, maxX2m2, maxX3m3, minX1, minX2p1, minX3);
         exchangeData(maxX1m2, maxX2m3, maxX3m3, minX1p1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         exchangeData(minX1p3, minX2p3, minX3p3, maxX1, maxX2, maxX3);
         exchangeData(minX1p2, minX2p2, minX3p2, maxX1m1, maxX2m1, maxX3m1);
         exchangeData(minX1p3, minX2p2, minX3p2, maxX1, maxX2m1, maxX3m1);
@@ -282,7 +284,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, minX2p3, minX3p2, maxX1, maxX2, maxX3m1);
         exchangeData(minX1p3, minX2p2, minX3p3, maxX1, maxX2m1, maxX3);
         exchangeData(minX1p2, minX2p3, minX3p3, maxX1m1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         exchangeData(maxX1m3, minX2p3, minX3p3, minX1, maxX2, maxX3);
         exchangeData(maxX1m2, minX2p2, minX3p2, minX1p1, maxX2m1, maxX3m1);
         exchangeData(maxX1m3, minX2p2, minX3p2, minX1, maxX2m1, maxX3m1);
@@ -291,7 +293,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(maxX1m3, minX2p3, minX3p2, minX1, maxX2, maxX3m1);
         exchangeData(maxX1m3, minX2p2, minX3p3, minX1, maxX2m1, maxX3);
         exchangeData(maxX1m2, minX2p3, minX3p3, minX1p1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         exchangeData(minX1p3, maxX2m3, minX3p3, maxX1, minX2, maxX3);
         exchangeData(minX1p2, maxX2m2, minX3p2, maxX1m1, minX2p1, maxX3m1);
         exchangeData(minX1p3, maxX2m2, minX3p2, maxX1, minX2p1, maxX3m1);
@@ -300,7 +302,7 @@ void TwoDistributionsDoubleGhostLayerFullDirectConnector::exchangeData()
         exchangeData(minX1p3, maxX2m3, minX3p2, maxX1, minX2, maxX3m1);
         exchangeData(minX1p3, maxX2m2, minX3p3, maxX1, minX2p1, maxX3);
         exchangeData(minX1p2, maxX2m3, minX3p3, maxX1m1, minX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PPM) {
+    } else if (sendDir == DIR_PPM) {
         exchangeData(maxX1m3, maxX2m3, minX3p3, minX1, minX2, maxX3);
         exchangeData(maxX1m2, maxX2m2, minX3p2, minX1p1, minX2p1, maxX3m1);
         exchangeData(maxX1m3, maxX2m2, minX3p2, minX1, minX2p1, maxX3m1);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullVectorConnector.cpp
index 9dc8a99de..8f6b88898 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsDoubleGhostLayerFullVectorConnector.cpp
@@ -50,6 +50,8 @@ TwoDistributionsDoubleGhostLayerFullVectorConnector::TwoDistributionsDoubleGhost
 //////////////////////////////////////////////////////////////////////////
 void TwoDistributionsDoubleGhostLayerFullVectorConnector::init()
 {
+   using namespace vf::lbm::dir;
+
    FullVectorConnector::init();
 
    fDis = dynamicPointerCast<EsoTwist3D>(block.lock()->getKernel()->getDataSet()->getFdistributions());
@@ -59,37 +61,37 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::init()
    int anz = 2*27+1;
    switch (sendDir)
    {
-   case D3Q27System::DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
-   case D3Q27System::DIR_P00:
-   case D3Q27System::DIR_M00: sender->getData().resize(maxX2*maxX3*anz*2, 0.0);   break;
-   case D3Q27System::DIR_0P0:
-   case D3Q27System::DIR_0M0: sender->getData().resize(maxX1*maxX3*anz*2, 0.0);   break;
-   case D3Q27System::DIR_00P:
-   case D3Q27System::DIR_00M: sender->getData().resize(maxX1*maxX2*anz*2, 0.0);   break;
+   case DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
+   case DIR_P00:
+   case DIR_M00: sender->getData().resize(maxX2*maxX3*anz*2, 0.0);   break;
+   case DIR_0P0:
+   case DIR_0M0: sender->getData().resize(maxX1*maxX3*anz*2, 0.0);   break;
+   case DIR_00P:
+   case DIR_00M: sender->getData().resize(maxX1*maxX2*anz*2, 0.0);   break;
 
-   case D3Q27System::DIR_PP0:
-   case D3Q27System::DIR_MM0:
-   case D3Q27System::DIR_PM0:
-   case D3Q27System::DIR_MP0:  sender->getData().resize(maxX3*anz*4, 0.0);   break;
+   case DIR_PP0:
+   case DIR_MM0:
+   case DIR_PM0:
+   case DIR_MP0:  sender->getData().resize(maxX3*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_P0P:
-   case D3Q27System::DIR_M0M:
-   case D3Q27System::DIR_P0M:
-   case D3Q27System::DIR_M0P:  sender->getData().resize(maxX2*anz*4, 0.0);   break;
+   case DIR_P0P:
+   case DIR_M0M:
+   case DIR_P0M:
+   case DIR_M0P:  sender->getData().resize(maxX2*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_0PP:
-   case D3Q27System::DIR_0MM:
-   case D3Q27System::DIR_0PM:
-   case D3Q27System::DIR_0MP:  sender->getData().resize(maxX1*anz*4, 0.0);   break;
+   case DIR_0PP:
+   case DIR_0MM:
+   case DIR_0PM:
+   case DIR_0MP:  sender->getData().resize(maxX1*anz*4, 0.0);   break;
 
-   case D3Q27System::DIR_PPP:
-   case D3Q27System::DIR_MMM:
-   case D3Q27System::DIR_PPM:
-   case D3Q27System::DIR_MMP:
-   case D3Q27System::DIR_PMP:
-   case D3Q27System::DIR_MPM:
-   case D3Q27System::DIR_PMM:
-   case D3Q27System::DIR_MPP:  sender->getData().resize(anz*8, 0.0);   break;
+   case DIR_PPP:
+   case DIR_MMM:
+   case DIR_PPM:
+   case DIR_MMP:
+   case DIR_PMP:
+   case DIR_MPM:
+   case DIR_PMM:
+   case DIR_MPP:  sender->getData().resize(anz*8, 0.0);   break;
 
    default: UB_THROW(UbException(UB_EXARGS, "unknown sendDir"));
    }
@@ -103,6 +105,8 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillSendVectors()
 ////////////////////////////////////////////////////////////////////////
 void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
 {
+    using namespace vf::lbm::dir;
+
     ////////////////////////////////////////////////////////////
     // relation between ghost layer and regular nodes
     // maxX1m3 maxX1m2 ... minX1p2 minX1p3 - regular nodes
@@ -137,7 +141,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
 
     int index = 0;
     // EAST
-    if (sendDir == D3Q27System::DIR_P00) {
+    if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 fillData(sdata, index, maxX1m3, x2, x3);
@@ -146,7 +150,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // WEST
-    else if (sendDir == D3Q27System::DIR_M00) {
+    else if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 fillData(sdata, index, minX1p3, x2, x3);
@@ -155,7 +159,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTH
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, maxX2m3, x3);
@@ -164,7 +168,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTH
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, minX2p3, x3);
@@ -174,7 +178,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
     }
 
     // TOP
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, x2, maxX3m3);
@@ -183,7 +187,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // BOTTOM
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 fillData(sdata, index, x1, x2, minX3p3);
@@ -192,7 +196,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTHEAST
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, maxX1m3, maxX2m3, x3);
             fillData(sdata, index, maxX1m2, maxX2m2, x3);
@@ -201,7 +205,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // NORTHWEST
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, minX1p3, maxX2m3, x3);
             fillData(sdata, index, minX1p2, maxX2m2, x3);
@@ -210,7 +214,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTHWEST
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, minX1p3, minX2p3, x3);
             fillData(sdata, index, minX1p2, minX2p2, x3);
@@ -219,70 +223,70 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         }
     }
     // SOUTHEAST
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             fillData(sdata, index, maxX1m3, minX2p3, x3);
             fillData(sdata, index, maxX1m2, minX2p2, x3);
             fillData(sdata, index, maxX1m3, minX2p2, x3);
             fillData(sdata, index, maxX1m2, minX2p3, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_P0P)
+    } else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, maxX1m3, x2, maxX3m3);
             fillData(sdata, index, maxX1m2, x2, maxX3m2);
             fillData(sdata, index, maxX1m3, x2, maxX3m2);
             fillData(sdata, index, maxX1m2, x2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_M0M)
+    else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, minX1p3, x2, minX3p3);
             fillData(sdata, index, minX1p2, x2, minX3p2);
             fillData(sdata, index, minX1p3, x2, minX3p2);
             fillData(sdata, index, minX1p2, x2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, maxX1m3, x2, minX3p3);
             fillData(sdata, index, maxX1m2, x2, minX3p2);
             fillData(sdata, index, maxX1m3, x2, minX3p2);
             fillData(sdata, index, maxX1m2, x2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             fillData(sdata, index, minX1p3, x2, maxX3m3);
             fillData(sdata, index, minX1p2, x2, maxX3m2);
             fillData(sdata, index, minX1p3, x2, maxX3m2);
             fillData(sdata, index, minX1p2, x2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, maxX2m3, maxX3m3);
             fillData(sdata, index, x1, maxX2m2, maxX3m2);
             fillData(sdata, index, x1, maxX2m3, maxX3m2);
             fillData(sdata, index, x1, maxX2m2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, minX2p3, minX3p3);
             fillData(sdata, index, x1, minX2p2, minX3p2);
             fillData(sdata, index, x1, minX2p3, minX3p2);
             fillData(sdata, index, x1, minX2p2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, maxX2m3, minX3p3);
             fillData(sdata, index, x1, maxX2m2, minX3p2);
             fillData(sdata, index, x1, maxX2m3, minX3p2);
             fillData(sdata, index, x1, maxX2m2, minX3p3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             fillData(sdata, index, x1, minX2p3, maxX3m3);
             fillData(sdata, index, x1, minX2p2, maxX3m2);
             fillData(sdata, index, x1, minX2p3, maxX3m2);
             fillData(sdata, index, x1, minX2p2, maxX3m3);
         }
-    else if (sendDir == D3Q27System::DIR_MMP) {
+    else if (sendDir == DIR_MMP) {
         fillData(sdata, index, minX1p3, minX2p3, maxX3m3);
         fillData(sdata, index, minX1p2, minX2p2, maxX3m2);
         fillData(sdata, index, minX1p3, minX2p2, maxX3m2);
@@ -291,7 +295,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, minX2p3, maxX3m2);
         fillData(sdata, index, minX1p3, minX2p2, maxX3m3);
         fillData(sdata, index, minX1p2, minX2p3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         fillData(sdata, index, maxX1m3, minX1p3, maxX3m3);
         fillData(sdata, index, maxX1m2, minX1p2, maxX3m2);
         fillData(sdata, index, maxX1m3, minX1p2, maxX3m2);
@@ -300,7 +304,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, minX1p3, maxX3m2);
         fillData(sdata, index, maxX1m3, minX1p2, maxX3m3);
         fillData(sdata, index, maxX1m2, minX1p3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         fillData(sdata, index, minX1p3, maxX2m3, maxX3m3);
         fillData(sdata, index, minX1p2, maxX2m2, maxX3m2);
         fillData(sdata, index, minX1p3, maxX2m2, maxX3m2);
@@ -309,7 +313,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, maxX2m3, maxX3m2);
         fillData(sdata, index, minX1p3, maxX2m2, maxX3m3);
         fillData(sdata, index, minX1p2, maxX2m3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         fillData(sdata, index, maxX1m3, maxX2m3, maxX3m3);
         fillData(sdata, index, maxX1m2, maxX2m2, maxX3m2);
         fillData(sdata, index, maxX1m3, maxX2m2, maxX3m2);
@@ -318,7 +322,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, maxX2m3, maxX3m2);
         fillData(sdata, index, maxX1m3, maxX2m2, maxX3m3);
         fillData(sdata, index, maxX1m2, maxX2m3, maxX3m3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         fillData(sdata, index, minX1p3, minX2p3, minX3p3);
         fillData(sdata, index, minX1p2, minX2p2, minX3p2);
         fillData(sdata, index, minX1p3, minX2p2, minX3p2);
@@ -327,7 +331,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, minX2p3, minX3p2);
         fillData(sdata, index, minX1p3, minX2p2, minX3p3);
         fillData(sdata, index, minX1p2, minX2p3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         fillData(sdata, index, maxX1m3, minX2p3, minX3p3);
         fillData(sdata, index, maxX1m2, minX2p2, minX3p2);
         fillData(sdata, index, maxX1m3, minX2p2, minX3p2);
@@ -336,7 +340,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, maxX1m3, minX2p3, minX3p2);
         fillData(sdata, index, maxX1m3, minX2p2, minX3p3);
         fillData(sdata, index, maxX1m2, minX2p3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         fillData(sdata, index, minX1p3, maxX2m3, minX3p3);
         fillData(sdata, index, minX1p2, maxX2m2, minX3p2);
         fillData(sdata, index, minX1p3, maxX2m2, minX3p2);
@@ -345,7 +349,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::fillData()
         fillData(sdata, index, minX1p3, maxX2m3, minX3p2);
         fillData(sdata, index, minX1p3, maxX2m2, minX3p3);
         fillData(sdata, index, minX1p2, maxX2m3, minX3p3);
-    } else if (sendDir == D3Q27System::DIR_PPM) {
+    } else if (sendDir == DIR_PPM) {
         fillData(sdata, index, maxX1m3, maxX2m3, minX3p3);
         fillData(sdata, index, maxX1m2, maxX2m2, minX3p2);
         fillData(sdata, index, maxX1m3, maxX2m2, minX3p2);
@@ -366,6 +370,8 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeReceiveVecto
 ////////////////////////////////////////////////////////////////////////
 void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
 {
+    using namespace vf::lbm::dir;
+
     vector_type &rdata = receiver->getData();
 
     int index = 0;
@@ -399,7 +405,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
     int maxX3m2 = maxX3 - 2;
     //int maxX3m3 = maxX3 - 3;
 
-    if (sendDir == D3Q27System::DIR_M00) {
+    if (sendDir == DIR_M00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 distributeData(rdata, index, minX1, x2, x3);
@@ -407,7 +413,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_P00) {
+    else if (sendDir == DIR_P00) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
                 distributeData(rdata, index, maxX1, x2, x3);
@@ -415,7 +421,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_0M0) {
+    else if (sendDir == DIR_0M0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, minX2, x3);
@@ -423,7 +429,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_0P0) {
+    else if (sendDir == DIR_0P0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, maxX2, x3);
@@ -431,7 +437,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_00M) {
+    else if (sendDir == DIR_00M) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, x2, minX3);
@@ -439,7 +445,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_00P) {
+    else if (sendDir == DIR_00P) {
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
                 distributeData(rdata, index, x1, x2, maxX3);
@@ -447,7 +453,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             }
         }
     }
-    else if (sendDir == D3Q27System::DIR_MM0) {
+    else if (sendDir == DIR_MM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, minX2, x3);
             distributeData(rdata, index, minX1p1, minX2p1, x3);
@@ -455,7 +461,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, minX1p1, minX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_PM0) {
+    else if (sendDir == DIR_PM0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, minX2, x3);
             distributeData(rdata, index, maxX1m1, minX2p1, x3);
@@ -463,7 +469,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, maxX1m1, minX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_PP0) {
+    else if (sendDir == DIR_PP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, maxX1, maxX2, x3);
             distributeData(rdata, index, maxX1m1, maxX2m1, x3);
@@ -471,70 +477,70 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
             distributeData(rdata, index, maxX1m1, maxX2, x3);
         }
     }
-    else if (sendDir == D3Q27System::DIR_MP0) {
+    else if (sendDir == DIR_MP0) {
         for (int x3 = minX3p2; x3 <= maxX3m2; x3++) {
             distributeData(rdata, index, minX1, maxX2, x3);
             distributeData(rdata, index, minX1p1, maxX2m1, x3);
             distributeData(rdata, index, minX1, maxX2m1, x3);
             distributeData(rdata, index, minX1p1, maxX2, x3);
         }
-    } else if (sendDir == D3Q27System::DIR_M0M)
+    } else if (sendDir == DIR_M0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, minX1, x2, minX3);
             distributeData(rdata, index, minX1p1, x2, minX3p1);
             distributeData(rdata, index, minX1, x2, minX3p1);
             distributeData(rdata, index, minX1p1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0P)
+    else if (sendDir == DIR_P0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, maxX1, x2, maxX3);
             distributeData(rdata, index, maxX1m1, x2, maxX3m1);
             distributeData(rdata, index, maxX1, x2, maxX3m1);
             distributeData(rdata, index, maxX1m1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_M0P)
+    else if (sendDir == DIR_M0P)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, minX1, x2, maxX3);
             distributeData(rdata, index, minX1p1, x2, maxX3m1);
             distributeData(rdata, index, minX1, x2, maxX3m1);
             distributeData(rdata, index, minX1p1, x2, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_P0M)
+    else if (sendDir == DIR_P0M)
         for (int x2 = minX2p2; x2 <= maxX2m2; x2++) {
             distributeData(rdata, index, maxX1, x2, minX3);
             distributeData(rdata, index, maxX1m1, x2, minX3p1);
             distributeData(rdata, index, maxX1, x2, minX3p1);
             distributeData(rdata, index, maxX1m1, x2, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MM)
+    else if (sendDir == DIR_0MM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, minX2, minX3);
             distributeData(rdata, index, x1, minX2p1, minX3p1);
             distributeData(rdata, index, x1, minX2, minX3p1);
             distributeData(rdata, index, x1, minX2p1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PP)
+    else if (sendDir == DIR_0PP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, maxX2, maxX3);
             distributeData(rdata, index, x1, maxX2m1, maxX3m1);
             distributeData(rdata, index, x1, maxX2, maxX3m1);
             distributeData(rdata, index, x1, maxX2m1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0MP)
+    else if (sendDir == DIR_0MP)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, minX2, maxX3);
             distributeData(rdata, index, x1, minX2p1, maxX3m1);
             distributeData(rdata, index, x1, minX2, maxX3m1);
             distributeData(rdata, index, x1, minX2p1, maxX3);
         }
-    else if (sendDir == D3Q27System::DIR_0PM)
+    else if (sendDir == DIR_0PM)
         for (int x1 = minX1p2; x1 <= maxX1m2; x1++) {
             distributeData(rdata, index, x1, maxX2, minX3);
             distributeData(rdata, index, x1, maxX2m1, minX3p1);
             distributeData(rdata, index, x1, maxX2, minX3p1);
             distributeData(rdata, index, x1, maxX2m1, minX3);
         }
-    else if (sendDir == D3Q27System::DIR_PPM) {
+    else if (sendDir == DIR_PPM) {
         distributeData(rdata, index, maxX1, maxX2, minX3);
         distributeData(rdata, index, maxX1m1, maxX2m1, minX3p1);
         distributeData(rdata, index, maxX1, maxX2m1, minX3p1);
@@ -543,7 +549,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, maxX2, minX3p1);
         distributeData(rdata, index, maxX1, maxX2m1, minX3);
         distributeData(rdata, index, maxX1m1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MPM) {
+    } else if (sendDir == DIR_MPM) {
         distributeData(rdata, index, minX1, maxX2, minX3);
         distributeData(rdata, index, minX1p1, maxX2m1, minX3p1);
         distributeData(rdata, index, minX1, maxX2m1, minX3p1);
@@ -552,7 +558,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, maxX2, minX3p1);
         distributeData(rdata, index, minX1, maxX2m1, minX3);
         distributeData(rdata, index, minX1p1, maxX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PMM) {
+    } else if (sendDir == DIR_PMM) {
         distributeData(rdata, index, maxX1, minX2, minX3);
         distributeData(rdata, index, maxX1m1, minX2p1, minX3p1);
         distributeData(rdata, index, maxX1, minX2p1, minX3p1);
@@ -561,7 +567,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, minX2, minX3p1);
         distributeData(rdata, index, maxX1, minX2p1, minX3);
         distributeData(rdata, index, maxX1m1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_MMM) {
+    } else if (sendDir == DIR_MMM) {
         distributeData(rdata, index, minX1, minX2, minX3);
         distributeData(rdata, index, minX1p1, minX2p1, minX3p1);
         distributeData(rdata, index, minX1, minX2p1, minX3p1);
@@ -570,7 +576,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, minX2, minX3p1);
         distributeData(rdata, index, minX1, minX2p1, minX3);
         distributeData(rdata, index, minX1p1, minX2, minX3);
-    } else if (sendDir == D3Q27System::DIR_PPP) {
+    } else if (sendDir == DIR_PPP) {
         distributeData(rdata, index, maxX1, maxX2, maxX3);
         distributeData(rdata, index, maxX1m1, maxX2m1, maxX3m1);
         distributeData(rdata, index, maxX1, maxX2m1, maxX3m1);
@@ -579,7 +585,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, maxX2, maxX3m1);
         distributeData(rdata, index, maxX1, maxX2m1, maxX3);
         distributeData(rdata, index, maxX1m1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MPP) {
+    } else if (sendDir == DIR_MPP) {
         distributeData(rdata, index, minX1, maxX2, maxX3);
         distributeData(rdata, index, minX1p1, maxX2m1, maxX3m1);
         distributeData(rdata, index, minX1, maxX2m1, maxX3m1);
@@ -588,7 +594,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, minX1, maxX2, maxX3m1);
         distributeData(rdata, index, minX1, maxX2m1, maxX3);
         distributeData(rdata, index, minX1p1, maxX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_PMP) {
+    } else if (sendDir == DIR_PMP) {
         distributeData(rdata, index, maxX1, minX2, maxX3);
         distributeData(rdata, index, maxX1m1, minX2p1, maxX3m1);
         distributeData(rdata, index, maxX1, minX2p1, maxX3m1);
@@ -597,7 +603,7 @@ void TwoDistributionsDoubleGhostLayerFullVectorConnector::distributeData()
         distributeData(rdata, index, maxX1, minX2, maxX3m1);
         distributeData(rdata, index, maxX1, minX2p1, maxX3);
         distributeData(rdata, index, maxX1m1, minX2, maxX3);
-    } else if (sendDir == D3Q27System::DIR_MMP) {
+    } else if (sendDir == DIR_MMP) {
         distributeData(rdata, index, minX1, minX2, maxX3);
         distributeData(rdata, index, minX1p1, minX2p1, maxX3m1);
         distributeData(rdata, index, minX1, minX2p1, maxX3m1);
diff --git a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
index bab931d93..7987c2f6c 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
@@ -50,6 +50,8 @@ TwoDistributionsFullVectorConnector::TwoDistributionsFullVectorConnector(SPtr<Bl
 //////////////////////////////////////////////////////////////////////////
 void TwoDistributionsFullVectorConnector::init()
 {
+   using namespace vf::lbm::dir;
+
    FullVectorConnector::init();
 
    fDis = dynamicPointerCast<EsoTwist3D>(block.lock()->getKernel()->getDataSet()->getFdistributions());
@@ -58,37 +60,37 @@ void TwoDistributionsFullVectorConnector::init()
    int anz = 2*27;
    switch (sendDir)
    {
-   case D3Q27System::DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
-   case D3Q27System::DIR_P00:
-   case D3Q27System::DIR_M00: sender->getData().resize(maxX2*maxX3*anz, 0.0);   break;
-   case D3Q27System::DIR_0P0:
-   case D3Q27System::DIR_0M0: sender->getData().resize(maxX1*maxX3*anz, 0.0);   break;
-   case D3Q27System::DIR_00P:
-   case D3Q27System::DIR_00M: sender->getData().resize(maxX1*maxX2*anz, 0.0);   break;
+   case DIR_000: UB_THROW(UbException(UB_EXARGS, "ZERO not allowed")); break;
+   case DIR_P00:
+   case DIR_M00: sender->getData().resize(maxX2*maxX3*anz, 0.0);   break;
+   case DIR_0P0:
+   case DIR_0M0: sender->getData().resize(maxX1*maxX3*anz, 0.0);   break;
+   case DIR_00P:
+   case DIR_00M: sender->getData().resize(maxX1*maxX2*anz, 0.0);   break;
 
-   case D3Q27System::DIR_PP0:
-   case D3Q27System::DIR_MM0:
-   case D3Q27System::DIR_PM0:
-   case D3Q27System::DIR_MP0:  sender->getData().resize(maxX3*anz, 0.0);   break;
+   case DIR_PP0:
+   case DIR_MM0:
+   case DIR_PM0:
+   case DIR_MP0:  sender->getData().resize(maxX3*anz, 0.0);   break;
 
-   case D3Q27System::DIR_P0P:
-   case D3Q27System::DIR_M0M:
-   case D3Q27System::DIR_P0M:
-   case D3Q27System::DIR_M0P:  sender->getData().resize(maxX2*anz, 0.0);   break;
+   case DIR_P0P:
+   case DIR_M0M:
+   case DIR_P0M:
+   case DIR_M0P:  sender->getData().resize(maxX2*anz, 0.0);   break;
 
-   case D3Q27System::DIR_0PP:
-   case D3Q27System::DIR_0MM:
-   case D3Q27System::DIR_0PM:
-   case D3Q27System::DIR_0MP:  sender->getData().resize(maxX1*anz, 0.0);   break;
+   case DIR_0PP:
+   case DIR_0MM:
+   case DIR_0PM:
+   case DIR_0MP:  sender->getData().resize(maxX1*anz, 0.0);   break;
 
-   case D3Q27System::DIR_PPP:
-   case D3Q27System::DIR_MMM:
-   case D3Q27System::DIR_PPM:
-   case D3Q27System::DIR_MMP:
-   case D3Q27System::DIR_PMP:
-   case D3Q27System::DIR_MPM:
-   case D3Q27System::DIR_PMM:
-   case D3Q27System::DIR_MPP:  sender->getData().resize(anz, 0.0);   break;
+   case DIR_PPP:
+   case DIR_MMM:
+   case DIR_PPM:
+   case DIR_MMP:
+   case DIR_PMP:
+   case DIR_MPM:
+   case DIR_PMM:
+   case DIR_MPP:  sender->getData().resize(anz, 0.0);   break;
 
    default: UB_THROW(UbException(UB_EXARGS, "unknown sendDir"));
    }
diff --git a/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSoA.cpp b/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSoA.cpp
index 058594792..6dd96d81a 100644
--- a/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSoA.cpp
+++ b/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSoA.cpp
@@ -87,109 +87,115 @@ void D3Q27EsoTwist3DSoA::swap()
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSoA::getDistribution(LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
+    using namespace vf::lbm::dir;
+
     size_t x1p = x1 + 1;
     size_t x2p = x2 + 1;
     size_t x3p = x3 + 1;
 
-    f[D3Q27System::DIR_P00]   = (*d.E)(x1, x2, x3);
-    f[D3Q27System::DIR_0P0]   = (*d.N)(x1, x2, x3);
-    f[D3Q27System::DIR_00P]   = (*d.T)(x1, x2, x3);
-    f[D3Q27System::DIR_PP0]  = (*d.NE)(x1, x2, x3);
-    f[D3Q27System::DIR_MP0]  = (*d.NW)(x1p, x2, x3);
-    f[D3Q27System::DIR_P0P]  = (*d.TE)(x1, x2, x3);
-    f[D3Q27System::DIR_M0P]  = (*d.TW)(x1p, x2, x3);
-    f[D3Q27System::DIR_0PP]  = (*d.TN)(x1, x2, x3);
-    f[D3Q27System::DIR_0MP]  = (*d.TS)(x1, x2p, x3);
-    f[D3Q27System::DIR_PPP] = (*d.TNE)(x1, x2, x3);
-    f[D3Q27System::DIR_MPP] = (*d.TNW)(x1p, x2, x3);
-    f[D3Q27System::DIR_PMP] = (*d.TSE)(x1, x2p, x3);
-    f[D3Q27System::DIR_MMP] = (*d.TSW)(x1p, x2p, x3);
+    f[DIR_P00]   = (*d.E)(x1, x2, x3);
+    f[DIR_0P0]   = (*d.N)(x1, x2, x3);
+    f[DIR_00P]   = (*d.T)(x1, x2, x3);
+    f[DIR_PP0]  = (*d.NE)(x1, x2, x3);
+    f[DIR_MP0]  = (*d.NW)(x1p, x2, x3);
+    f[DIR_P0P]  = (*d.TE)(x1, x2, x3);
+    f[DIR_M0P]  = (*d.TW)(x1p, x2, x3);
+    f[DIR_0PP]  = (*d.TN)(x1, x2, x3);
+    f[DIR_0MP]  = (*d.TS)(x1, x2p, x3);
+    f[DIR_PPP] = (*d.TNE)(x1, x2, x3);
+    f[DIR_MPP] = (*d.TNW)(x1p, x2, x3);
+    f[DIR_PMP] = (*d.TSE)(x1, x2p, x3);
+    f[DIR_MMP] = (*d.TSW)(x1p, x2p, x3);
 
-    f[D3Q27System::DIR_M00]   = (*d.W)(x1p, x2, x3);
-    f[D3Q27System::DIR_0M0]   = (*d.S)(x1, x2p, x3);
-    f[D3Q27System::DIR_00M]   = (*d.B)(x1, x2, x3p);
-    f[D3Q27System::DIR_MM0]  = (*d.SW)(x1p, x2p, x3);
-    f[D3Q27System::DIR_PM0]  = (*d.SE)(x1, x2p, x3);
-    f[D3Q27System::DIR_M0M]  = (*d.BW)(x1p, x2, x3p);
-    f[D3Q27System::DIR_P0M]  = (*d.BE)(x1, x2, x3p);
-    f[D3Q27System::DIR_0MM]  = (*d.BS)(x1, x2p, x3p);
-    f[D3Q27System::DIR_0PM]  = (*d.BN)(x1, x2, x3p);
-    f[D3Q27System::DIR_MMM] = (*d.BSW)(x1p, x2p, x3p);
-    f[D3Q27System::DIR_PMM] = (*d.BSE)(x1, x2p, x3p);
-    f[D3Q27System::DIR_MPM] = (*d.BNW)(x1p, x2, x3p);
-    f[D3Q27System::DIR_PPM] = (*d.BNE)(x1, x2, x3p);
+    f[DIR_M00]   = (*d.W)(x1p, x2, x3);
+    f[DIR_0M0]   = (*d.S)(x1, x2p, x3);
+    f[DIR_00M]   = (*d.B)(x1, x2, x3p);
+    f[DIR_MM0]  = (*d.SW)(x1p, x2p, x3);
+    f[DIR_PM0]  = (*d.SE)(x1, x2p, x3);
+    f[DIR_M0M]  = (*d.BW)(x1p, x2, x3p);
+    f[DIR_P0M]  = (*d.BE)(x1, x2, x3p);
+    f[DIR_0MM]  = (*d.BS)(x1, x2p, x3p);
+    f[DIR_0PM]  = (*d.BN)(x1, x2, x3p);
+    f[DIR_MMM] = (*d.BSW)(x1p, x2p, x3p);
+    f[DIR_PMM] = (*d.BSE)(x1, x2p, x3p);
+    f[DIR_MPM] = (*d.BNW)(x1p, x2, x3p);
+    f[DIR_PPM] = (*d.BNE)(x1, x2, x3p);
 
-    f[D3Q27System::DIR_000] = (*d.REST)(x1, x2, x3);
+    f[DIR_000] = (*d.REST)(x1, x2, x3);
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSoA::setDistribution(const LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
+    using namespace vf::lbm::dir;
+
     size_t x1p = x1 + 1;
     size_t x2p = x2 + 1;
     size_t x3p = x3 + 1;
 
-    (*d.E)(x1, x2, x3)     = f[D3Q27System::INV_P00];
-    (*d.N)(x1, x2, x3)     = f[D3Q27System::INV_0P0];
-    (*d.T)(x1, x2, x3)     = f[D3Q27System::INV_00P];
-    (*d.NE)(x1, x2, x3)    = f[D3Q27System::INV_PP0];
-    (*d.NW)(x1p, x2, x3)   = f[D3Q27System::INV_MP0];
-    (*d.TE)(x1, x2, x3)    = f[D3Q27System::INV_P0P];
-    (*d.TW)(x1p, x2, x3)   = f[D3Q27System::INV_M0P];
-    (*d.TN)(x1, x2, x3)    = f[D3Q27System::INV_0PP];
-    (*d.TS)(x1, x2p, x3)   = f[D3Q27System::INV_0MP];
-    (*d.TNE)(x1, x2, x3)   = f[D3Q27System::INV_PPP];
-    (*d.TNW)(x1p, x2, x3)  = f[D3Q27System::INV_MPP];
-    (*d.TSE)(x1, x2p, x3)  = f[D3Q27System::INV_PMP];
-    (*d.TSW)(x1p, x2p, x3) = f[D3Q27System::INV_MMP];
+    (*d.E)(x1, x2, x3)     = f[INV_P00];
+    (*d.N)(x1, x2, x3)     = f[INV_0P0];
+    (*d.T)(x1, x2, x3)     = f[INV_00P];
+    (*d.NE)(x1, x2, x3)    = f[INV_PP0];
+    (*d.NW)(x1p, x2, x3)   = f[INV_MP0];
+    (*d.TE)(x1, x2, x3)    = f[INV_P0P];
+    (*d.TW)(x1p, x2, x3)   = f[INV_M0P];
+    (*d.TN)(x1, x2, x3)    = f[INV_0PP];
+    (*d.TS)(x1, x2p, x3)   = f[INV_0MP];
+    (*d.TNE)(x1, x2, x3)   = f[INV_PPP];
+    (*d.TNW)(x1p, x2, x3)  = f[INV_MPP];
+    (*d.TSE)(x1, x2p, x3)  = f[INV_PMP];
+    (*d.TSW)(x1p, x2p, x3) = f[INV_MMP];
 
-    (*d.W)(x1p, x2, x3)     = f[D3Q27System::INV_M00];
-    (*d.S)(x1, x2p, x3)     = f[D3Q27System::INV_0M0];
-    (*d.B)(x1, x2, x3p)     = f[D3Q27System::INV_00M];
-    (*d.SW)(x1p, x2p, x3)   = f[D3Q27System::INV_MM0];
-    (*d.SE)(x1, x2p, x3)    = f[D3Q27System::INV_PM0];
-    (*d.BW)(x1p, x2, x3p)   = f[D3Q27System::INV_M0M];
-    (*d.BE)(x1, x2, x3p)    = f[D3Q27System::INV_P0M];
-    (*d.BS)(x1, x2p, x3p)   = f[D3Q27System::INV_0MM];
-    (*d.BN)(x1, x2, x3p)    = f[D3Q27System::INV_0PM];
-    (*d.BSW)(x1p, x2p, x3p) = f[D3Q27System::INV_MMM];
-    (*d.BSE)(x1, x2p, x3p)  = f[D3Q27System::INV_PMM];
-    (*d.BNW)(x1p, x2, x3p)  = f[D3Q27System::INV_MPM];
-    (*d.BNE)(x1, x2, x3p)   = f[D3Q27System::INV_PPM];
+    (*d.W)(x1p, x2, x3)     = f[INV_M00];
+    (*d.S)(x1, x2p, x3)     = f[INV_0M0];
+    (*d.B)(x1, x2, x3p)     = f[INV_00M];
+    (*d.SW)(x1p, x2p, x3)   = f[INV_MM0];
+    (*d.SE)(x1, x2p, x3)    = f[INV_PM0];
+    (*d.BW)(x1p, x2, x3p)   = f[INV_M0M];
+    (*d.BE)(x1, x2, x3p)    = f[INV_P0M];
+    (*d.BS)(x1, x2p, x3p)   = f[INV_0MM];
+    (*d.BN)(x1, x2, x3p)    = f[INV_0PM];
+    (*d.BSW)(x1p, x2p, x3p) = f[INV_MMM];
+    (*d.BSE)(x1, x2p, x3p)  = f[INV_PMM];
+    (*d.BNW)(x1p, x2, x3p)  = f[INV_MPM];
+    (*d.BNE)(x1, x2, x3p)   = f[INV_PPM];
 
-    (*d.REST)(x1, x2, x3) = f[D3Q27System::DIR_000];
+    (*d.REST)(x1, x2, x3) = f[DIR_000];
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSoA::getDistributionInv(LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
-    f[D3Q27System::INV_P00]   = (*d.E)(x1, x2, x3);
-    f[D3Q27System::INV_0P0]   = (*d.N)(x1, x2, x3);
-    f[D3Q27System::INV_00P]   = (*d.T)(x1, x2, x3);
-    f[D3Q27System::INV_PP0]  = (*d.NE)(x1, x2, x3);
-    f[D3Q27System::INV_MP0]  = (*d.NW)(x1 + 1, x2, x3);
-    f[D3Q27System::INV_P0P]  = (*d.TE)(x1, x2, x3);
-    f[D3Q27System::INV_M0P]  = (*d.TW)(x1 + 1, x2, x3);
-    f[D3Q27System::INV_0PP]  = (*d.TN)(x1, x2, x3);
-    f[D3Q27System::INV_0MP]  = (*d.TS)(x1, x2 + 1, x3);
-    f[D3Q27System::INV_PPP] = (*d.TNE)(x1, x2, x3);
-    f[D3Q27System::INV_MPP] = (*d.TNW)(x1 + 1, x2, x3);
-    f[D3Q27System::INV_PMP] = (*d.TSE)(x1, x2 + 1, x3);
-    f[D3Q27System::INV_MMP] = (*d.TSW)(x1 + 1, x2 + 1, x3);
+    using namespace vf::lbm::dir;
+
+    f[INV_P00]   = (*d.E)(x1, x2, x3);
+    f[INV_0P0]   = (*d.N)(x1, x2, x3);
+    f[INV_00P]   = (*d.T)(x1, x2, x3);
+    f[INV_PP0]  = (*d.NE)(x1, x2, x3);
+    f[INV_MP0]  = (*d.NW)(x1 + 1, x2, x3);
+    f[INV_P0P]  = (*d.TE)(x1, x2, x3);
+    f[INV_M0P]  = (*d.TW)(x1 + 1, x2, x3);
+    f[INV_0PP]  = (*d.TN)(x1, x2, x3);
+    f[INV_0MP]  = (*d.TS)(x1, x2 + 1, x3);
+    f[INV_PPP] = (*d.TNE)(x1, x2, x3);
+    f[INV_MPP] = (*d.TNW)(x1 + 1, x2, x3);
+    f[INV_PMP] = (*d.TSE)(x1, x2 + 1, x3);
+    f[INV_MMP] = (*d.TSW)(x1 + 1, x2 + 1, x3);
 
-    f[D3Q27System::INV_M00]   = (*d.W)(x1 + 1, x2, x3);
-    f[D3Q27System::INV_0M0]   = (*d.S)(x1, x2 + 1, x3);
-    f[D3Q27System::INV_00M]   = (*d.B)(x1, x2, x3 + 1);
-    f[D3Q27System::INV_MM0]  = (*d.SW)(x1 + 1, x2 + 1, x3);
-    f[D3Q27System::INV_PM0]  = (*d.SE)(x1, x2 + 1, x3);
-    f[D3Q27System::INV_M0M]  = (*d.BW)(x1 + 1, x2, x3 + 1);
-    f[D3Q27System::INV_P0M]  = (*d.BE)(x1, x2, x3 + 1);
-    f[D3Q27System::INV_0MM]  = (*d.BS)(x1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_0PM]  = (*d.BN)(x1, x2, x3 + 1);
-    f[D3Q27System::INV_MMM] = (*d.BSW)(x1 + 1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_PMM] = (*d.BSE)(x1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_MPM] = (*d.BNW)(x1 + 1, x2, x3 + 1);
-    f[D3Q27System::INV_PPM] = (*d.BNE)(x1, x2, x3 + 1);
+    f[INV_M00]   = (*d.W)(x1 + 1, x2, x3);
+    f[INV_0M0]   = (*d.S)(x1, x2 + 1, x3);
+    f[INV_00M]   = (*d.B)(x1, x2, x3 + 1);
+    f[INV_MM0]  = (*d.SW)(x1 + 1, x2 + 1, x3);
+    f[INV_PM0]  = (*d.SE)(x1, x2 + 1, x3);
+    f[INV_M0M]  = (*d.BW)(x1 + 1, x2, x3 + 1);
+    f[INV_P0M]  = (*d.BE)(x1, x2, x3 + 1);
+    f[INV_0MM]  = (*d.BS)(x1, x2 + 1, x3 + 1);
+    f[INV_0PM]  = (*d.BN)(x1, x2, x3 + 1);
+    f[INV_MMM] = (*d.BSW)(x1 + 1, x2 + 1, x3 + 1);
+    f[INV_PMM] = (*d.BSE)(x1, x2 + 1, x3 + 1);
+    f[INV_MPM] = (*d.BNW)(x1 + 1, x2, x3 + 1);
+    f[INV_PPM] = (*d.BNE)(x1, x2, x3 + 1);
 
-    f[D3Q27System::DIR_000] = (*d.REST)(x1, x2, x3);
+    f[DIR_000] = (*d.REST)(x1, x2, x3);
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSoA::setDistributionInv(const LBMReal *const f, size_t x1, size_t x2, size_t x3)
diff --git a/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSplittedVector.cpp b/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSplittedVector.cpp
index 684238baa..c9cab90b0 100644
--- a/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSplittedVector.cpp
+++ b/src/cpu/VirtualFluidsCore/Data/D3Q27EsoTwist3DSplittedVector.cpp
@@ -56,278 +56,290 @@ void D3Q27EsoTwist3DSplittedVector::swap() { std::swap(this->localDistributions,
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::getDistribution(LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
-    f[D3Q27System::DIR_P00]   = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
-    f[D3Q27System::DIR_0P0]   = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
-    f[D3Q27System::DIR_00P]   = (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
-    f[D3Q27System::DIR_PP0]  = (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
-    f[D3Q27System::DIR_MP0]  = (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
-    f[D3Q27System::DIR_P0P]  = (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
-    f[D3Q27System::DIR_M0P]  = (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
-    f[D3Q27System::DIR_0PP]  = (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
-    f[D3Q27System::DIR_0MP]  = (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
-    f[D3Q27System::DIR_PPP] = (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
-    f[D3Q27System::DIR_MPP] = (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
-    f[D3Q27System::DIR_PMP] = (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
-    f[D3Q27System::DIR_MMP] = (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
+    using namespace vf::lbm::dir;
 
-    f[D3Q27System::DIR_M00]   = (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
-    f[D3Q27System::DIR_0M0]   = (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
-    f[D3Q27System::DIR_00M]   = (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
-    f[D3Q27System::DIR_MM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
-    f[D3Q27System::DIR_PM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
-    f[D3Q27System::DIR_M0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
-    f[D3Q27System::DIR_P0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
-    f[D3Q27System::DIR_0MM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
-    f[D3Q27System::DIR_0PM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
-    f[D3Q27System::DIR_MMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
-    f[D3Q27System::DIR_PMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
-    f[D3Q27System::DIR_MPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
-    f[D3Q27System::DIR_PPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
+    f[DIR_P00]   = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
+    f[DIR_0P0]   = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
+    f[DIR_00P]   = (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
+    f[DIR_PP0]  = (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
+    f[DIR_MP0]  = (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
+    f[DIR_P0P]  = (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
+    f[DIR_M0P]  = (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
+    f[DIR_0PP]  = (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
+    f[DIR_0MP]  = (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
+    f[DIR_PPP] = (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
+    f[DIR_MPP] = (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
+    f[DIR_PMP] = (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
+    f[DIR_MMP] = (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
 
-    f[D3Q27System::DIR_000] = (*this->zeroDistributions)(x1, x2, x3);
+    f[DIR_M00]   = (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
+    f[DIR_0M0]   = (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
+    f[DIR_00M]   = (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
+    f[DIR_MM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
+    f[DIR_PM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
+    f[DIR_M0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
+    f[DIR_P0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
+    f[DIR_0MM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
+    f[DIR_0PM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
+    f[DIR_MMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
+    f[DIR_PMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
+    f[DIR_MPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
+    f[DIR_PPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
+
+    f[DIR_000] = (*this->zeroDistributions)(x1, x2, x3);
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::setDistribution(const LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
-    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)           = f[D3Q27System::INV_P00];
-    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)           = f[D3Q27System::INV_0P0];
-    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)           = f[D3Q27System::INV_00P];
-    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)          = f[D3Q27System::INV_PP0];
-    (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3)      = f[D3Q27System::INV_MP0];
-    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)          = f[D3Q27System::INV_P0P];
-    (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3)      = f[D3Q27System::INV_M0P];
-    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)          = f[D3Q27System::INV_0PP];
-    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3)      = f[D3Q27System::INV_0MP];
-    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)         = f[D3Q27System::INV_PPP];
-    (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3)     = f[D3Q27System::INV_MPP];
-    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3)     = f[D3Q27System::INV_PMP];
-    (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[D3Q27System::INV_MMP];
+    using namespace vf::lbm::dir;
+
+    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)           = f[INV_P00];
+    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)           = f[INV_0P0];
+    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)           = f[INV_00P];
+    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)          = f[INV_PP0];
+    (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3)      = f[INV_MP0];
+    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)          = f[INV_P0P];
+    (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3)      = f[INV_M0P];
+    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)          = f[INV_0PP];
+    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3)      = f[INV_0MP];
+    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)         = f[INV_PPP];
+    (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3)     = f[INV_MPP];
+    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3)     = f[INV_PMP];
+    (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[INV_MMP];
 
-    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3)           = f[D3Q27System::INV_M00];
-    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3)           = f[D3Q27System::INV_0M0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1)           = f[D3Q27System::INV_00M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3)      = f[D3Q27System::INV_MM0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3)          = f[D3Q27System::INV_PM0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1)      = f[D3Q27System::INV_M0M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1)          = f[D3Q27System::INV_P0M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1)      = f[D3Q27System::INV_0MM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1)          = f[D3Q27System::INV_0PM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[D3Q27System::INV_MMM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1)     = f[D3Q27System::INV_PMM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1)     = f[D3Q27System::INV_MPM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1)         = f[D3Q27System::INV_PPM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3)           = f[INV_M00];
+    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3)           = f[INV_0M0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1)           = f[INV_00M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3)      = f[INV_MM0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3)          = f[INV_PM0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1)      = f[INV_M0M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1)          = f[INV_P0M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1)      = f[INV_0MM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1)          = f[INV_0PM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[INV_MMM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1)     = f[INV_PMM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1)     = f[INV_MPM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1)         = f[INV_PPM];
 
-    (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+    (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::getDistributionInv(LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
-    f[D3Q27System::INV_P00]   = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
-    f[D3Q27System::INV_0P0]   = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
-    f[D3Q27System::INV_00P]   = (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
-    f[D3Q27System::INV_PP0]  = (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
-    f[D3Q27System::INV_MP0]  = (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
-    f[D3Q27System::INV_P0P]  = (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
-    f[D3Q27System::INV_M0P]  = (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
-    f[D3Q27System::INV_0PP]  = (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
-    f[D3Q27System::INV_0MP]  = (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
-    f[D3Q27System::INV_PPP] = (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
-    f[D3Q27System::INV_MPP] = (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
-    f[D3Q27System::INV_PMP] = (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
-    f[D3Q27System::INV_MMP] = (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
+    using namespace vf::lbm::dir;
+
+    f[INV_P00]   = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
+    f[INV_0P0]   = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
+    f[INV_00P]   = (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
+    f[INV_PP0]  = (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
+    f[INV_MP0]  = (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
+    f[INV_P0P]  = (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
+    f[INV_M0P]  = (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
+    f[INV_0PP]  = (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
+    f[INV_0MP]  = (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
+    f[INV_PPP] = (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
+    f[INV_MPP] = (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
+    f[INV_PMP] = (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
+    f[INV_MMP] = (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
 
-    f[D3Q27System::INV_M00]   = (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
-    f[D3Q27System::INV_0M0]   = (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
-    f[D3Q27System::INV_00M]   = (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
-    f[D3Q27System::INV_MM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
-    f[D3Q27System::INV_PM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
-    f[D3Q27System::INV_M0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
-    f[D3Q27System::INV_P0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
-    f[D3Q27System::INV_0MM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_0PM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
-    f[D3Q27System::INV_MMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_PMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
-    f[D3Q27System::INV_MPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
-    f[D3Q27System::INV_PPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
+    f[INV_M00]   = (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
+    f[INV_0M0]   = (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
+    f[INV_00M]   = (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
+    f[INV_MM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
+    f[INV_PM0]  = (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
+    f[INV_M0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
+    f[INV_P0M]  = (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
+    f[INV_0MM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
+    f[INV_0PM]  = (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
+    f[INV_MMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
+    f[INV_PMM] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
+    f[INV_MPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
+    f[INV_PPM] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
 
-    f[D3Q27System::DIR_000] = (*this->zeroDistributions)(x1, x2, x3);
+    f[DIR_000] = (*this->zeroDistributions)(x1, x2, x3);
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::setDistributionInv(const LBMReal *const f, size_t x1, size_t x2, size_t x3)
 {
-    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)           = f[D3Q27System::DIR_P00];
-    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)           = f[D3Q27System::DIR_0P0];
-    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)           = f[D3Q27System::DIR_00P];
-    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)          = f[D3Q27System::DIR_PP0];
-    (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3)      = f[D3Q27System::DIR_MP0];
-    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)          = f[D3Q27System::DIR_P0P];
-    (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3)      = f[D3Q27System::DIR_M0P];
-    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)          = f[D3Q27System::DIR_0PP];
-    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3)      = f[D3Q27System::DIR_0MP];
-    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)         = f[D3Q27System::DIR_PPP];
-    (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3)     = f[D3Q27System::DIR_MPP];
-    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3)     = f[D3Q27System::DIR_PMP];
-    (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[D3Q27System::DIR_MMP];
+    using namespace vf::lbm::dir;
 
-    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3)           = f[D3Q27System::DIR_M00];
-    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3)           = f[D3Q27System::DIR_0M0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1)           = f[D3Q27System::DIR_00M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3)      = f[D3Q27System::DIR_MM0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3)          = f[D3Q27System::DIR_PM0];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1)      = f[D3Q27System::DIR_M0M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1)          = f[D3Q27System::DIR_P0M];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1)      = f[D3Q27System::DIR_0MM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1)          = f[D3Q27System::DIR_0PM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_MMM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1)     = f[D3Q27System::DIR_PMM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1)     = f[D3Q27System::DIR_MPM];
-    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1)         = f[D3Q27System::DIR_PPM];
+    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)           = f[DIR_P00];
+    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)           = f[DIR_0P0];
+    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)           = f[DIR_00P];
+    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)          = f[DIR_PP0];
+    (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3)      = f[DIR_MP0];
+    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)          = f[DIR_P0P];
+    (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3)      = f[DIR_M0P];
+    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)          = f[DIR_0PP];
+    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3)      = f[DIR_0MP];
+    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)         = f[DIR_PPP];
+    (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3)     = f[DIR_MPP];
+    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3)     = f[DIR_PMP];
+    (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[DIR_MMP];
 
-    (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3)           = f[DIR_M00];
+    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3)           = f[DIR_0M0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1)           = f[DIR_00M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3)      = f[DIR_MM0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3)          = f[DIR_PM0];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1)      = f[DIR_M0M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1)          = f[DIR_P0M];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1)      = f[DIR_0MM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1)          = f[DIR_0PM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[DIR_MMM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1)     = f[DIR_PMM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1)     = f[DIR_MPM];
+    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1)         = f[DIR_PPM];
+
+    (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::setDistributionForDirection(const LBMReal *const f, size_t x1, size_t x2, size_t x3,
                                                                 unsigned long int direction)
 {
+    using namespace vf::lbm::dir;
+
     if ((direction & EsoTwistD3Q27System::etE) == EsoTwistD3Q27System::etE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f[D3Q27System::DIR_P00];
+        (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f[DIR_P00];
     if ((direction & EsoTwistD3Q27System::etW) == EsoTwistD3Q27System::etW)
-        (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[D3Q27System::DIR_M00];
+        (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[DIR_M00];
     if ((direction & EsoTwistD3Q27System::etS) == EsoTwistD3Q27System::etS)
-        (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[D3Q27System::DIR_0M0];
+        (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[DIR_0M0];
     if ((direction & EsoTwistD3Q27System::etN) == EsoTwistD3Q27System::etN)
-        (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f[D3Q27System::DIR_0P0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f[DIR_0P0];
     if ((direction & EsoTwistD3Q27System::etB) == EsoTwistD3Q27System::etB)
-        (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[D3Q27System::DIR_00M];
+        (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[DIR_00M];
     if ((direction & EsoTwistD3Q27System::etT) == EsoTwistD3Q27System::etT)
-        (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f[D3Q27System::DIR_00P];
+        (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f[DIR_00P];
     if ((direction & EsoTwistD3Q27System::etSW) == EsoTwistD3Q27System::etSW)
-        (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[D3Q27System::DIR_MM0];
+        (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[DIR_MM0];
     if ((direction & EsoTwistD3Q27System::etNE) == EsoTwistD3Q27System::etNE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f[D3Q27System::DIR_PP0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f[DIR_PP0];
     if ((direction & EsoTwistD3Q27System::etNW) == EsoTwistD3Q27System::etNW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f[D3Q27System::DIR_MP0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f[DIR_MP0];
     if ((direction & EsoTwistD3Q27System::etSE) == EsoTwistD3Q27System::etSE)
-        (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f[D3Q27System::DIR_PM0];
+        (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f[DIR_PM0];
     if ((direction & EsoTwistD3Q27System::etBW) == EsoTwistD3Q27System::etBW)
-        (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[D3Q27System::DIR_M0M];
+        (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[DIR_M0M];
     if ((direction & EsoTwistD3Q27System::etTE) == EsoTwistD3Q27System::etTE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f[D3Q27System::DIR_P0P];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f[DIR_P0P];
     if ((direction & EsoTwistD3Q27System::etTW) == EsoTwistD3Q27System::etTW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f[D3Q27System::DIR_M0P];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f[DIR_M0P];
     if ((direction & EsoTwistD3Q27System::etBE) == EsoTwistD3Q27System::etBE)
-        (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f[D3Q27System::DIR_P0M];
+        (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f[DIR_P0M];
     if ((direction & EsoTwistD3Q27System::etBS) == EsoTwistD3Q27System::etBS)
-        (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[D3Q27System::DIR_0MM];
+        (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[DIR_0MM];
     if ((direction & EsoTwistD3Q27System::etTN) == EsoTwistD3Q27System::etTN)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_0PP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f[DIR_0PP];
     if ((direction & EsoTwistD3Q27System::etTS) == EsoTwistD3Q27System::etTS)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f[D3Q27System::DIR_0MP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f[DIR_0MP];
     if ((direction & EsoTwistD3Q27System::etBN) == EsoTwistD3Q27System::etBN)
-        (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f[D3Q27System::DIR_0PM];
+        (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f[DIR_0PM];
     if ((direction & EsoTwistD3Q27System::etBSW) == EsoTwistD3Q27System::etBSW)
-        (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[D3Q27System::DIR_MMM];
+        (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[DIR_MMM];
     if ((direction & EsoTwistD3Q27System::etTNE) == EsoTwistD3Q27System::etTNE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_PPP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[DIR_PPP];
     if ((direction & EsoTwistD3Q27System::etBSE) == EsoTwistD3Q27System::etBSE)
-        (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f[D3Q27System::DIR_PMM];
+        (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f[DIR_PMM];
     if ((direction & EsoTwistD3Q27System::etTNW) == EsoTwistD3Q27System::etTNW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_MPP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f[DIR_MPP];
     if ((direction & EsoTwistD3Q27System::etBNW) == EsoTwistD3Q27System::etBNW)
-        (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f[D3Q27System::DIR_MPM];
+        (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f[DIR_MPM];
     if ((direction & EsoTwistD3Q27System::etTSE) == EsoTwistD3Q27System::etTSE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f[D3Q27System::DIR_PMP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f[DIR_PMP];
     if ((direction & EsoTwistD3Q27System::etBNE) == EsoTwistD3Q27System::etBNE)
-        (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[D3Q27System::DIR_PPM];
+        (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[DIR_PPM];
     if ((direction & EsoTwistD3Q27System::etTSW) == EsoTwistD3Q27System::etTSW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f[D3Q27System::DIR_MMP];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f[DIR_MMP];
     if ((direction & EsoTwistD3Q27System::REST) == EsoTwistD3Q27System::REST)
-        (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+        (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::setDistributionForDirection(LBMReal f, size_t x1, size_t x2, size_t x3,
                                                                 int direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_000:
+        case DIR_000:
             (*this->zeroDistributions)(x1, x2, x3) = f;
             break;
         default:
@@ -338,145 +350,149 @@ void D3Q27EsoTwist3DSplittedVector::setDistributionForDirection(LBMReal f, size_
 void D3Q27EsoTwist3DSplittedVector::setDistributionInvForDirection(const LBMReal *const f, size_t x1, size_t x2,
                                                                    size_t x3, unsigned long int direction)
 {
+    using namespace vf::lbm::dir;
+
     if ((direction & EsoTwistD3Q27System::etE) == EsoTwistD3Q27System::etE)
-        (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[D3Q27System::DIR_P00];
+        (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[DIR_P00];
     if ((direction & EsoTwistD3Q27System::etW) == EsoTwistD3Q27System::etW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f[D3Q27System::DIR_M00];
+        (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f[DIR_M00];
     if ((direction & EsoTwistD3Q27System::etS) == EsoTwistD3Q27System::etS)
-        (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f[D3Q27System::DIR_0M0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f[DIR_0M0];
     if ((direction & EsoTwistD3Q27System::etN) == EsoTwistD3Q27System::etN)
-        (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[D3Q27System::DIR_0P0];
+        (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[DIR_0P0];
     if ((direction & EsoTwistD3Q27System::etB) == EsoTwistD3Q27System::etB)
-        (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f[D3Q27System::DIR_00M];
+        (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f[DIR_00M];
     if ((direction & EsoTwistD3Q27System::etT) == EsoTwistD3Q27System::etT)
-        (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[D3Q27System::DIR_00P];
+        (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[DIR_00P];
     if ((direction & EsoTwistD3Q27System::etSW) == EsoTwistD3Q27System::etSW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f[D3Q27System::DIR_MM0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f[DIR_MM0];
     if ((direction & EsoTwistD3Q27System::etNE) == EsoTwistD3Q27System::etNE)
-        (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[D3Q27System::DIR_PP0];
+        (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[DIR_PP0];
     if ((direction & EsoTwistD3Q27System::etNW) == EsoTwistD3Q27System::etNW)
-        (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f[D3Q27System::DIR_MP0];
+        (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f[DIR_MP0];
     if ((direction & EsoTwistD3Q27System::etSE) == EsoTwistD3Q27System::etSE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f[D3Q27System::DIR_PM0];
+        (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f[DIR_PM0];
     if ((direction & EsoTwistD3Q27System::etBW) == EsoTwistD3Q27System::etBW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f[D3Q27System::DIR_M0M];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f[DIR_M0M];
     if ((direction & EsoTwistD3Q27System::etTE) == EsoTwistD3Q27System::etTE)
-        (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[D3Q27System::DIR_P0P];
+        (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[DIR_P0P];
     if ((direction & EsoTwistD3Q27System::etTW) == EsoTwistD3Q27System::etTW)
-        (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f[D3Q27System::DIR_M0P];
+        (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f[DIR_M0P];
     if ((direction & EsoTwistD3Q27System::etBE) == EsoTwistD3Q27System::etBE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f[D3Q27System::DIR_P0M];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f[DIR_P0M];
     if ((direction & EsoTwistD3Q27System::etBS) == EsoTwistD3Q27System::etBS)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_0MM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f[DIR_0MM];
     if ((direction & EsoTwistD3Q27System::etTN) == EsoTwistD3Q27System::etTN)
-        (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[D3Q27System::DIR_0PP];
+        (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[DIR_0PP];
     if ((direction & EsoTwistD3Q27System::etTS) == EsoTwistD3Q27System::etTS)
-        (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f[D3Q27System::DIR_0MP];
+        (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f[DIR_0MP];
     if ((direction & EsoTwistD3Q27System::etBN) == EsoTwistD3Q27System::etBN)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f[D3Q27System::DIR_0PM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f[DIR_0PM];
     if ((direction & EsoTwistD3Q27System::etBSW) == EsoTwistD3Q27System::etBSW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_MMM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f[DIR_MMM];
     if ((direction & EsoTwistD3Q27System::etTNE) == EsoTwistD3Q27System::etTNE)
-        (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[D3Q27System::DIR_PPP];
+        (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[DIR_PPP];
     if ((direction & EsoTwistD3Q27System::etBSE) == EsoTwistD3Q27System::etBSE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f[D3Q27System::DIR_PMM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f[DIR_PMM];
     if ((direction & EsoTwistD3Q27System::etTNW) == EsoTwistD3Q27System::etTNW)
-        (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f[D3Q27System::DIR_MPP];
+        (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f[DIR_MPP];
     if ((direction & EsoTwistD3Q27System::etBNW) == EsoTwistD3Q27System::etBNW)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f[D3Q27System::DIR_MPM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f[DIR_MPM];
     if ((direction & EsoTwistD3Q27System::etTSE) == EsoTwistD3Q27System::etTSE)
-        (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f[D3Q27System::DIR_PMP];
+        (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f[DIR_PMP];
     if ((direction & EsoTwistD3Q27System::etBNE) == EsoTwistD3Q27System::etBNE)
-        (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f[D3Q27System::DIR_PPM];
+        (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f[DIR_PPM];
     if ((direction & EsoTwistD3Q27System::etTSW) == EsoTwistD3Q27System::etTSW)
-        (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[D3Q27System::DIR_MMP];
+        (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f[DIR_MMP];
     if ((direction & EsoTwistD3Q27System::REST) == EsoTwistD3Q27System::REST)
-        (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+        (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
 }
 //////////////////////////////////////////////////////////////////////////
 void D3Q27EsoTwist3DSplittedVector::setDistributionInvForDirection(LBMReal f, size_t x1, size_t x2, size_t x3,
                                                                    unsigned long int direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3) = f;
             break;
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1) = f;
             break;
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3) = f;
             break;
-        case D3Q27System::DIR_000:
+        case DIR_000:
             (*this->zeroDistributions)(x1, x2, x3) = f;
             break;
         default:
@@ -486,60 +502,62 @@ void D3Q27EsoTwist3DSplittedVector::setDistributionInvForDirection(LBMReal f, si
 //////////////////////////////////////////////////////////////////////////
 LBMReal D3Q27EsoTwist3DSplittedVector::getDistributionForDirection(size_t x1, size_t x2, size_t x3, int direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             return (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             return (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             return (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             return (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             return (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             return (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             return (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             return (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             return (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             return (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             return (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             return (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             return (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             return (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             return (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
-        case D3Q27System::DIR_000:
+        case DIR_000:
             return (*this->zeroDistributions)(x1, x2, x3);
         default:
             UB_THROW(UbException(UB_EXARGS, "Direction didn't find"));
@@ -548,60 +566,62 @@ LBMReal D3Q27EsoTwist3DSplittedVector::getDistributionForDirection(size_t x1, si
 //////////////////////////////////////////////////////////////////////////
 LBMReal D3Q27EsoTwist3DSplittedVector::getDistributionInvForDirection(size_t x1, size_t x2, size_t x3, int direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             return (*this->nonLocalDistributions)(D3Q27System::ET_W, x1 + 1, x2, x3);
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             return (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             return (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2 + 1, x3);
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             return (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3);
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             return (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3 + 1);
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             return (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3);
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1 + 1, x2 + 1, x3);
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             return (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2 + 1, x3);
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             return (*this->localDistributions)(D3Q27System::ET_NW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             return (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3);
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1 + 1, x2, x3 + 1);
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3 + 1);
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             return (*this->localDistributions)(D3Q27System::ET_TW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             return (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3);
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3 + 1);
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             return (*this->localDistributions)(D3Q27System::ET_TS, x1, x2 + 1, x3);
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             return (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3);
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1 + 1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             return (*this->localDistributions)(D3Q27System::ET_TNW, x1 + 1, x2, x3);
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2 + 1, x3 + 1);
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             return (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2 + 1, x3);
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1 + 1, x2, x3 + 1);
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             return (*this->localDistributions)(D3Q27System::ET_TSW, x1 + 1, x2 + 1, x3);
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             return (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3 + 1);
-        case D3Q27System::DIR_000:
+        case DIR_000:
             return (*this->zeroDistributions)(x1, x2, x3);
         default:
             UB_THROW(UbException(UB_EXARGS, "Direction didn't find"));
diff --git a/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.cpp b/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.cpp
index b9a2e069e..c28f1d489 100644
--- a/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.cpp
+++ b/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.cpp
@@ -44,12 +44,13 @@ const int EsoTwistD3Q27System::ETX3[EsoTwistD3Q27System::ENDF + 1] = { 0, 0, 0,
                                                                        0, 1, 1, 0, 0, -1, 0, -1, 0, 1, 0, 1, 0 };
 
 const int EsoTwistD3Q27System::etINVDIR[EsoTwistD3Q27System::ENDF + 1] = {
-    D3Q27System::INV_P00,   D3Q27System::INV_M00,   D3Q27System::INV_0P0,   D3Q27System::INV_0M0,   D3Q27System::INV_00P,
-    D3Q27System::INV_00M,   D3Q27System::INV_PP0,  D3Q27System::INV_MM0,  D3Q27System::INV_PM0,  D3Q27System::INV_MP0,
-    D3Q27System::INV_P0P,  D3Q27System::INV_M0M,  D3Q27System::INV_P0M,  D3Q27System::INV_M0P,  D3Q27System::INV_0PP,
-    D3Q27System::INV_0MM,  D3Q27System::INV_0PM,  D3Q27System::INV_0MP,  D3Q27System::INV_PPP, D3Q27System::INV_MPP,
-    D3Q27System::INV_PMP, D3Q27System::INV_MMP, D3Q27System::INV_PPM, D3Q27System::INV_MPM, D3Q27System::INV_PMM,
-    D3Q27System::INV_MMM, D3Q27System::DIR_000
+
+    vf::lbm::dir::INV_P00,   vf::lbm::dir::INV_M00,   vf::lbm::dir::INV_0P0,   vf::lbm::dir::INV_0M0,   vf::lbm::dir::INV_00P,
+    vf::lbm::dir::INV_00M,   vf::lbm::dir::INV_PP0,  vf::lbm::dir::INV_MM0,  vf::lbm::dir::INV_PM0,  vf::lbm::dir::INV_MP0,
+    vf::lbm::dir::INV_P0P,  vf::lbm::dir::INV_M0M,  vf::lbm::dir::INV_P0M,  vf::lbm::dir::INV_M0P,  vf::lbm::dir::INV_0PP,
+    vf::lbm::dir::INV_0MM,  vf::lbm::dir::INV_0PM,  vf::lbm::dir::INV_0MP,  vf::lbm::dir::INV_PPP, vf::lbm::dir::INV_MPP,
+    vf::lbm::dir::INV_PMP, vf::lbm::dir::INV_MMP, vf::lbm::dir::INV_PPM, vf::lbm::dir::INV_MPM, vf::lbm::dir::INV_PMM,
+    vf::lbm::dir::INV_MMM, vf::lbm::dir::DIR_000
 };
 
 const unsigned long int EsoTwistD3Q27System::etDIR[EsoTwistD3Q27System::ENDF + 1] = {
diff --git a/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.h b/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.h
index 7ccd413c6..74cd5b9b8 100644
--- a/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.h
+++ b/src/cpu/VirtualFluidsCore/Data/EsoTwistD3Q27System.h
@@ -44,63 +44,63 @@ struct EsoTwistD3Q27System {
     const static int STARTF = D3Q27System::STARTF;
     const static int ENDF   = D3Q27System::ENDF;
 
-    const static int STARTDIR = D3Q27System::STARTDIR;
+ //   const static int STARTDIR = D3Q27System::STARTDIR;
     const static int ENDDIR   = D3Q27System::ENDDIR;
 
-    static const int REST = D3Q27System::DIR_000; /*f0 */
-    static const int E    = D3Q27System::DIR_P00;    /*f1 */
-    static const int W    = D3Q27System::DIR_M00;    /*f2 */
-    static const int N    = D3Q27System::DIR_0P0;    /*f3 */
-    static const int S    = D3Q27System::DIR_0M0;    /*f4 */
-    static const int T    = D3Q27System::DIR_00P;    /*f5 */
-    static const int B    = D3Q27System::DIR_00M;    /*f6 */
-    static const int NE   = D3Q27System::DIR_PP0;   /*f7 */
-    static const int SW   = D3Q27System::DIR_MM0;   /*f8 */
-    static const int SE   = D3Q27System::DIR_PM0;   /*f9 */
-    static const int NW   = D3Q27System::DIR_MP0;   /*f10*/
-    static const int TE   = D3Q27System::DIR_P0P;   /*f11*/
-    static const int BW   = D3Q27System::DIR_M0M;   /*f12*/
-    static const int BE   = D3Q27System::DIR_P0M;   /*f13*/
-    static const int TW   = D3Q27System::DIR_M0P;   /*f14*/
-    static const int TN   = D3Q27System::DIR_0PP;   /*f15*/
-    static const int BS   = D3Q27System::DIR_0MM;   /*f16*/
-    static const int BN   = D3Q27System::DIR_0PM;   /*f17*/
-    static const int TS   = D3Q27System::DIR_0MP;   /*f18*/
-    static const int TNE  = D3Q27System::DIR_PPP;
-    static const int TNW  = D3Q27System::DIR_MPP;
-    static const int TSE  = D3Q27System::DIR_PMP;
-    static const int TSW  = D3Q27System::DIR_MMP;
-    static const int BNE  = D3Q27System::DIR_PPM;
-    static const int BNW  = D3Q27System::DIR_MPM;
-    static const int BSE  = D3Q27System::DIR_PMM;
-    static const int BSW  = D3Q27System::DIR_MMM;
+    static const int REST = vf::lbm::dir::DIR_000; /*f0 */
+    static const int E    = vf::lbm::dir::DIR_P00;    /*f1 */
+    static const int W    = vf::lbm::dir::DIR_M00;    /*f2 */
+    static const int N    = vf::lbm::dir::DIR_0P0;    /*f3 */
+    static const int S    = vf::lbm::dir::DIR_0M0;    /*f4 */
+    static const int T    = vf::lbm::dir::DIR_00P;    /*f5 */
+    static const int B    = vf::lbm::dir::DIR_00M;    /*f6 */
+    static const int NE   = vf::lbm::dir::DIR_PP0;   /*f7 */
+    static const int SW   = vf::lbm::dir::DIR_MM0;   /*f8 */
+    static const int SE   = vf::lbm::dir::DIR_PM0;   /*f9 */
+    static const int NW   = vf::lbm::dir::DIR_MP0;   /*f10*/
+    static const int TE   = vf::lbm::dir::DIR_P0P;   /*f11*/
+    static const int BW   = vf::lbm::dir::DIR_M0M;   /*f12*/
+    static const int BE   = vf::lbm::dir::DIR_P0M;   /*f13*/
+    static const int TW   = vf::lbm::dir::DIR_M0P;   /*f14*/
+    static const int TN   = vf::lbm::dir::DIR_0PP;   /*f15*/
+    static const int BS   = vf::lbm::dir::DIR_0MM;   /*f16*/
+    static const int BN   = vf::lbm::dir::DIR_0PM;   /*f17*/
+    static const int TS   = vf::lbm::dir::DIR_0MP;   /*f18*/
+    static const int TNE  = vf::lbm::dir::DIR_PPP;
+    static const int TNW  = vf::lbm::dir::DIR_MPP;
+    static const int TSE  = vf::lbm::dir::DIR_PMP;
+    static const int TSW  = vf::lbm::dir::DIR_MMP;
+    static const int BNE  = vf::lbm::dir::DIR_PPM;
+    static const int BNW  = vf::lbm::dir::DIR_MPM;
+    static const int BSE  = vf::lbm::dir::DIR_PMM;
+    static const int BSW  = vf::lbm::dir::DIR_MMM;
 
-    static const int INV_E   = D3Q27System::DIR_M00;
-    static const int INV_W   = D3Q27System::DIR_P00;
-    static const int INV_N   = D3Q27System::DIR_0M0;
-    static const int INV_S   = D3Q27System::DIR_0P0;
-    static const int INV_T   = D3Q27System::DIR_00M;
-    static const int INV_B   = D3Q27System::DIR_00P;
-    static const int INV_NE  = D3Q27System::DIR_MM0;
-    static const int INV_SW  = D3Q27System::DIR_PP0;
-    static const int INV_SE  = D3Q27System::DIR_MP0;
-    static const int INV_NW  = D3Q27System::DIR_PM0;
-    static const int INV_TE  = D3Q27System::DIR_M0M;
-    static const int INV_BW  = D3Q27System::DIR_P0P;
-    static const int INV_BE  = D3Q27System::DIR_M0P;
-    static const int INV_TW  = D3Q27System::DIR_P0M;
-    static const int INV_TN  = D3Q27System::DIR_0MM;
-    static const int INV_BS  = D3Q27System::DIR_0PP;
-    static const int INV_BN  = D3Q27System::DIR_0MP;
-    static const int INV_TS  = D3Q27System::DIR_0PM;
-    static const int INV_TNE = D3Q27System::DIR_MMM;
-    static const int INV_TNW = D3Q27System::DIR_PMM;
-    static const int INV_TSE = D3Q27System::DIR_MPM;
-    static const int INV_TSW = D3Q27System::DIR_PPM;
-    static const int INV_BNE = D3Q27System::DIR_MMP;
-    static const int INV_BNW = D3Q27System::DIR_PMP;
-    static const int INV_BSE = D3Q27System::DIR_MPP;
-    static const int INV_BSW = D3Q27System::DIR_PPP;
+    static const int INV_E   = vf::lbm::dir::DIR_M00;
+    static const int INV_W   = vf::lbm::dir::DIR_P00;
+    static const int INV_N   = vf::lbm::dir::DIR_0M0;
+    static const int INV_S   = vf::lbm::dir::DIR_0P0;
+    static const int INV_T   = vf::lbm::dir::DIR_00M;
+    static const int INV_B   = vf::lbm::dir::DIR_00P;
+    static const int INV_NE  = vf::lbm::dir::DIR_MM0;
+    static const int INV_SW  = vf::lbm::dir::DIR_PP0;
+    static const int INV_SE  = vf::lbm::dir::DIR_MP0;
+    static const int INV_NW  = vf::lbm::dir::DIR_PM0;
+    static const int INV_TE  = vf::lbm::dir::DIR_M0M;
+    static const int INV_BW  = vf::lbm::dir::DIR_P0P;
+    static const int INV_BE  = vf::lbm::dir::DIR_M0P;
+    static const int INV_TW  = vf::lbm::dir::DIR_P0M;
+    static const int INV_TN  = vf::lbm::dir::DIR_0MM;
+    static const int INV_BS  = vf::lbm::dir::DIR_0PP;
+    static const int INV_BN  = vf::lbm::dir::DIR_0MP;
+    static const int INV_TS  = vf::lbm::dir::DIR_0PM;
+    static const int INV_TNE = vf::lbm::dir::DIR_MMM;
+    static const int INV_TNW = vf::lbm::dir::DIR_PMM;
+    static const int INV_TSE = vf::lbm::dir::DIR_MPM;
+    static const int INV_TSW = vf::lbm::dir::DIR_PPM;
+    static const int INV_BNE = vf::lbm::dir::DIR_MMP;
+    static const int INV_BNW = vf::lbm::dir::DIR_PMP;
+    static const int INV_BSE = vf::lbm::dir::DIR_MPP;
+    static const int INV_BSW = vf::lbm::dir::DIR_PPP;
 
     static const unsigned long int etZERO; // 1;/*f0 */
     static const unsigned long int etE;    //  2;    /*f1 */
diff --git a/src/cpu/VirtualFluidsCore/Grid/Block3D.cpp b/src/cpu/VirtualFluidsCore/Grid/Block3D.cpp
index c6a751870..ed228451d 100644
--- a/src/cpu/VirtualFluidsCore/Grid/Block3D.cpp
+++ b/src/cpu/VirtualFluidsCore/Grid/Block3D.cpp
@@ -257,6 +257,8 @@ int Block3D::getNumberOfRemoteConnectors()
 //////////////////////////////////////////////////////////////////////////
 int Block3D::getNumberOfLocalConnectorsForSurfaces()
 {
+    using namespace vf::lbm::dir;
+
     int count = 0;
 
     if (connectors.size() < 6)
@@ -264,7 +266,7 @@ int Block3D::getNumberOfLocalConnectorsForSurfaces()
 
     for (SPtr<Block3DConnector> c : connectors) {
         if (c) {
-            if (c->getSendDir() >= D3Q27System::DIR_P00 && c->getSendDir() <= D3Q27System ::DIR_00M && c->isLocalConnector())
+            if (c->getSendDir() >= DIR_P00 && c->getSendDir() <= DIR_00M && c->isLocalConnector())
                 count++;
         }
     }
@@ -274,11 +276,13 @@ int Block3D::getNumberOfLocalConnectorsForSurfaces()
 //////////////////////////////////////////////////////////////////////////
 int Block3D::getNumberOfRemoteConnectorsForSurfaces()
 {
+    using namespace vf::lbm::dir;
+
     int count = 0;
 
     for (SPtr<Block3DConnector> c : connectors) {
         if (c) {
-            if (c->getSendDir() >= D3Q27System::DIR_P00 && c->getSendDir() <= D3Q27System ::DIR_00M && c->isRemoteConnector())
+            if (c->getSendDir() >= DIR_P00 && c->getSendDir() <= DIR_00M && c->isRemoteConnector())
                 count++;
         }
     }
diff --git a/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp b/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
index 8c9ccab62..b73b9d5c5 100644
--- a/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
+++ b/src/cpu/VirtualFluidsCore/Grid/Grid3D.cpp
@@ -631,8 +631,9 @@ SPtr<Block3D> Grid3D::getNeighborBlock(int dir, SPtr<Block3D> block) const
 //////////////////////////////////////////////////////////////////////////
 void Grid3D::getAllNeighbors(int ix1, int ix2, int ix3, int level, int levelDepth, std::vector<SPtr<Block3D>> &blocks)
 {
-    for (int dir = D3Q27System::STARTDIR; dir <= D3Q27System::ENDDIR; dir++)
-    {
+   // for (int dir = D3Q27System::STARTDIR; dir <= D3Q27System::ENDDIR; dir++)FSTARTDIR
+   for (int dir = D3Q27System::FSTARTDIR; dir <= D3Q27System::FENDDIR; dir++)
+   {
         this->getNeighborBlocksForDirection(dir, ix1, ix2, ix3, level, levelDepth, blocks);
     }
 }
@@ -1098,83 +1099,85 @@ void Grid3D::getNeighborsBottomSouthWest(int ix1, int ix2, int ix3, int level, i
 void Grid3D::getNeighborBlocksForDirection(int dir, int ix1, int ix2, int ix3, int level, int levelDepth,
                                            std::vector<SPtr<Block3D>> &blocks)
 {
+    using namespace vf::lbm::dir;
+
     switch (dir) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             this->getNeighborsEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             this->getNeighborsWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             this->getNeighborsNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             this->getNeighborsSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             this->getNeighborsTop(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             this->getNeighborsBottom(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             this->getNeighborsNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             this->getNeighborsSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             this->getNeighborsSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             this->getNeighborsNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             this->getNeighborsTopEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             this->getNeighborsBottomWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             this->getNeighborsBottomEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             this->getNeighborsTopWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             this->getNeighborsTopNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             this->getNeighborsBottomSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             this->getNeighborsBottomNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             this->getNeighborsTopSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             this->getNeighborsTopNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             this->getNeighborsTopNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             this->getNeighborsTopSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             this->getNeighborsTopSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             this->getNeighborsBottomNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             this->getNeighborsBottomNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             this->getNeighborsBottomSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             this->getNeighborsBottomSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
         default:
@@ -1261,86 +1264,88 @@ void Grid3D::getSubBlocksZero(int ix1, int ix2, int ix3, int level, vector<SPtr<
 void Grid3D::getNeighborBlocksForDirectionWithREST(int dir, int ix1, int ix2, int ix3, int level, int levelDepth,
                                                       std::vector<SPtr<Block3D>> &blocks)
 {
+    using namespace vf::lbm::dir;
+
     switch (dir) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             this->getNeighborsEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             this->getNeighborsWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             this->getNeighborsNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             this->getNeighborsSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             this->getNeighborsTop(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             this->getNeighborsBottom(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             this->getNeighborsNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             this->getNeighborsSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             this->getNeighborsSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             this->getNeighborsNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             this->getNeighborsTopEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             this->getNeighborsBottomWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             this->getNeighborsBottomEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             this->getNeighborsTopWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             this->getNeighborsTopNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             this->getNeighborsBottomSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             this->getNeighborsBottomNorth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             this->getNeighborsTopSouth(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             this->getNeighborsTopNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             this->getNeighborsTopNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             this->getNeighborsTopSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             this->getNeighborsTopSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             this->getNeighborsBottomNorthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             this->getNeighborsBottomNorthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             this->getNeighborsBottomSouthEast(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             this->getNeighborsBottomSouthWest(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
-        case D3Q27System::DIR_000:
+        case DIR_000:
             this->getNeighborsZero(ix1, ix2, ix3, level, levelDepth, blocks);
             break;
         default:
diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp
index a834466f8..241816260 100644
--- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp
+++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27Interactor.cpp
@@ -87,111 +87,113 @@ D3Q27Interactor::~D3Q27Interactor() = default;
 //////////////////////////////////////////////////////////////////////////
 void D3Q27Interactor::initRayVectors()
 {
+    using namespace vf::lbm::dir;
+
     int fdir;
     double c1oS2 = UbMath::one_over_sqrt2;
     double c1oS3 = UbMath::one_over_sqrt3;
-    fdir         = D3Q27System::DIR_P00;
+    fdir         = DIR_P00;
     rayX1[fdir]  = 1.0;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_M00;
+    fdir         = DIR_M00;
     rayX1[fdir]  = -1.0;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_0P0;
+    fdir         = DIR_0P0;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = 1.0;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_0M0;
+    fdir         = DIR_0M0;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = -1.0;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_00P;
+    fdir         = DIR_00P;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = 1.0;
-    fdir         = D3Q27System::DIR_00M;
+    fdir         = DIR_00M;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = -1.0;
-    fdir         = D3Q27System::DIR_PP0;
+    fdir         = DIR_PP0;
     rayX1[fdir]  = c1oS2;
     rayX2[fdir]  = c1oS2;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_MM0;
+    fdir         = DIR_MM0;
     rayX1[fdir]  = -c1oS2;
     rayX2[fdir]  = -c1oS2;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_PM0;
+    fdir         = DIR_PM0;
     rayX1[fdir]  = c1oS2;
     rayX2[fdir]  = -c1oS2;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_MP0;
+    fdir         = DIR_MP0;
     rayX1[fdir]  = -c1oS2;
     rayX2[fdir]  = c1oS2;
     rayX3[fdir]  = 0.0;
-    fdir         = D3Q27System::DIR_P0P;
+    fdir         = DIR_P0P;
     rayX1[fdir]  = c1oS2;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = c1oS2;
-    fdir         = D3Q27System::DIR_M0M;
+    fdir         = DIR_M0M;
     rayX1[fdir]  = -c1oS2;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = -c1oS2;
-    fdir         = D3Q27System::DIR_P0M;
+    fdir         = DIR_P0M;
     rayX1[fdir]  = c1oS2;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = -c1oS2;
-    fdir         = D3Q27System::DIR_M0P;
+    fdir         = DIR_M0P;
     rayX1[fdir]  = -c1oS2;
     rayX2[fdir]  = 0.0;
     rayX3[fdir]  = c1oS2;
-    fdir         = D3Q27System::DIR_0PP;
+    fdir         = DIR_0PP;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = c1oS2;
     rayX3[fdir]  = c1oS2;
-    fdir         = D3Q27System::DIR_0MM;
+    fdir         = DIR_0MM;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = -c1oS2;
     rayX3[fdir]  = -c1oS2;
-    fdir         = D3Q27System::DIR_0PM;
+    fdir         = DIR_0PM;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = c1oS2;
     rayX3[fdir]  = -c1oS2;
-    fdir         = D3Q27System::DIR_0MP;
+    fdir         = DIR_0MP;
     rayX1[fdir]  = 0.0;
     rayX2[fdir]  = -c1oS2;
     rayX3[fdir]  = c1oS2;
 
-    fdir        = D3Q27System::DIR_MPP;
+    fdir        = DIR_MPP;
     rayX1[fdir] = -c1oS3;
     rayX2[fdir] = c1oS3;
     rayX3[fdir] = c1oS3;
-    fdir        = D3Q27System::DIR_PPP;
+    fdir        = DIR_PPP;
     rayX1[fdir] = c1oS3;
     rayX2[fdir] = c1oS3;
     rayX3[fdir] = c1oS3;
-    fdir        = D3Q27System::DIR_MMP;
+    fdir        = DIR_MMP;
     rayX1[fdir] = -c1oS3;
     rayX2[fdir] = -c1oS3;
     rayX3[fdir] = c1oS3;
-    fdir        = D3Q27System::DIR_PMP;
+    fdir        = DIR_PMP;
     rayX1[fdir] = c1oS3;
     rayX2[fdir] = -c1oS3;
     rayX3[fdir] = c1oS3;
-    fdir        = D3Q27System::DIR_MPM;
+    fdir        = DIR_MPM;
     rayX1[fdir] = -c1oS3;
     rayX2[fdir] = c1oS3;
     rayX3[fdir] = -c1oS3;
-    fdir        = D3Q27System::DIR_PPM;
+    fdir        = DIR_PPM;
     rayX1[fdir] = c1oS3;
     rayX2[fdir] = c1oS3;
     rayX3[fdir] = -c1oS3;
-    fdir        = D3Q27System::DIR_MMM;
+    fdir        = DIR_MMM;
     rayX1[fdir] = -c1oS3;
     rayX2[fdir] = -c1oS3;
     rayX3[fdir] = -c1oS3;
-    fdir        = D3Q27System::DIR_PMM;
+    fdir        = DIR_PMM;
     rayX1[fdir] = c1oS3;
     rayX2[fdir] = -c1oS3;
     rayX3[fdir] = -c1oS3;
@@ -282,6 +284,8 @@ void D3Q27Interactor::updateInteractor(const double &timestep)
 // extendedBoundingGeoOfGeoObject MUST already have been magnified by delta_x_level in each direction for SOLID
 bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block)
 {
+    using namespace vf::lbm::dir;
+
     if (!block)
         return false;
 
@@ -327,18 +331,18 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block)
                 UB_EXARGS, "fuer den bei LB nicht vorkommenden Fall deltaX1!=deltaX2!=deltaX3  nicht implementiert ");
 
         vector<double> distNeigh(D3Q27System::FENDDIR + 1, UbMath::sqrt2 * deltaX1);
-        distNeigh[D3Q27System::DIR_P00] = distNeigh[D3Q27System::DIR_M00] = distNeigh[D3Q27System::DIR_0P0] = deltaX1;
-        distNeigh[D3Q27System::DIR_0M0] = distNeigh[D3Q27System::DIR_00P] = distNeigh[D3Q27System::DIR_00M] = deltaX1;
-        distNeigh[D3Q27System::DIR_PP0] = distNeigh[D3Q27System::DIR_MP0] = distNeigh[D3Q27System::DIR_MM0] =
-            distNeigh[D3Q27System::DIR_PM0]                          = UbMath::sqrt2 * deltaX1;
-        distNeigh[D3Q27System::DIR_P0P] = distNeigh[D3Q27System::DIR_0PP] = distNeigh[D3Q27System::DIR_M0P] =
-            distNeigh[D3Q27System::DIR_0MP]                          = UbMath::sqrt2 * deltaX1;
-        distNeigh[D3Q27System::DIR_P0M] = distNeigh[D3Q27System::DIR_0PM] = distNeigh[D3Q27System::DIR_M0M] =
-            distNeigh[D3Q27System::DIR_0MM]                          = UbMath::sqrt2 * deltaX1;
-        distNeigh[D3Q27System::DIR_PPP] = distNeigh[D3Q27System::DIR_MPP] = distNeigh[D3Q27System::DIR_PMP] =
-            distNeigh[D3Q27System::DIR_MMP]                           = UbMath::sqrt3 * deltaX1;
-        distNeigh[D3Q27System::DIR_PPM] = distNeigh[D3Q27System::DIR_MPM] = distNeigh[D3Q27System::DIR_PMM] =
-            distNeigh[D3Q27System::DIR_MMM]                           = UbMath::sqrt3 * deltaX1;
+        distNeigh[DIR_P00] = distNeigh[DIR_M00] = distNeigh[DIR_0P0] = deltaX1;
+        distNeigh[DIR_0M0] = distNeigh[DIR_00P] = distNeigh[DIR_00M] = deltaX1;
+        distNeigh[DIR_PP0] = distNeigh[DIR_MP0] = distNeigh[DIR_MM0] =
+            distNeigh[DIR_PM0]             = UbMath::sqrt2 * deltaX1;
+        distNeigh[DIR_P0P] = distNeigh[DIR_0PP] = distNeigh[DIR_M0P] =
+            distNeigh[DIR_0MP]             = UbMath::sqrt2 * deltaX1;
+        distNeigh[DIR_P0M] = distNeigh[DIR_0PM] = distNeigh[DIR_M0M] =
+            distNeigh[DIR_0MM]             = UbMath::sqrt2 * deltaX1;
+        distNeigh[DIR_PPP] = distNeigh[DIR_MPP] = distNeigh[DIR_PMP] =
+            distNeigh[DIR_MMP]              = UbMath::sqrt3 * deltaX1;
+        distNeigh[DIR_PPM] = distNeigh[DIR_MPM] = distNeigh[DIR_PMM] =
+            distNeigh[DIR_MMM]              = UbMath::sqrt3 * deltaX1;
         double q;
         bool pointOnBoundary = false;
 
@@ -569,6 +573,8 @@ bool D3Q27Interactor::setDifferencesToGbObject3D(const SPtr<Block3D> block)
 //////////////////////////////////////////////////////////////////////////
 void D3Q27Interactor::addQsLineSet(std::vector<UbTupleFloat3> &nodes, std::vector<UbTupleInt2> &lines)
 {
+    using namespace vf::lbm::dir;
+
     for (SPtr<Block3D> block : bcBlocks) {
         if (!block)
             continue;
@@ -613,132 +619,132 @@ void D3Q27Interactor::addQsLineSet(std::vector<UbTupleFloat3> &nodes, std::vecto
                     if (bc->hasBoundaryConditionFlag(D3Q27System::INVDIR[dir])) {
                         double x1b, x2b, x3b, q = bc->getQ(dir);
                         switch (dir) {
-                            case D3Q27System::DIR_P00:
+                            case DIR_P00:
                                 x1b = x1a + q * dx;
                                 x2b = x2a;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_0P0:
+                            case DIR_0P0:
                                 x1b = x1a;
                                 x2b = x2a + q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_M00:
+                            case DIR_M00:
                                 x1b = x1a - q * dx;
                                 x2b = x2a;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_0M0:
+                            case DIR_0M0:
                                 x1b = x1a;
                                 x2b = x2a - q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_PP0:
+                            case DIR_PP0:
                                 x1b = x1a + q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_MP0:
+                            case DIR_MP0:
                                 x1b = x1a - q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_MM0:
+                            case DIR_MM0:
                                 x1b = x1a - q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_PM0:
+                            case DIR_PM0:
                                 x1b = x1a + q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a;
                                 break;
-                            case D3Q27System::DIR_00P:
+                            case DIR_00P:
                                 x1b = x1a;
                                 x2b = x2a;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_P0P:
+                            case DIR_P0P:
                                 x1b = x1a + q * dx;
                                 x2b = x2a;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_0PP:
+                            case DIR_0PP:
                                 x1b = x1a;
                                 x2b = x2a + q * dx;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_M0P:
+                            case DIR_M0P:
                                 x1b = x1a - q * dx;
                                 x2b = x2a;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_0MP:
+                            case DIR_0MP:
                                 x1b = x1a;
                                 x2b = x2a - q * dx;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_00M:
+                            case DIR_00M:
                                 x1b = x1a;
                                 x2b = x2a;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_P0M:
+                            case DIR_P0M:
                                 x1b = x1a + q * dx;
                                 x2b = x2a;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_0PM:
+                            case DIR_0PM:
                                 x1b = x1a;
                                 x2b = x2a + q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_M0M:
+                            case DIR_M0M:
                                 x1b = x1a - q * dx;
                                 x2b = x2a;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_0MM:
+                            case DIR_0MM:
                                 x1b = x1a;
                                 x2b = x2a - q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_PPP:
+                            case DIR_PPP:
                                 x1b = x1a + q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_MMM:
+                            case DIR_MMM:
                                 x1b = x1a - q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_PPM:
+                            case DIR_PPM:
                                 x1b = x1a + q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_MMP:
+                            case DIR_MMP:
                                 x1b = x1a - q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_PMP:
+                            case DIR_PMP:
                                 x1b = x1a + q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a + q * dx;
                                 break;
-                            case D3Q27System::DIR_MPM:
+                            case DIR_MPM:
                                 x1b = x1a - q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_PMM:
+                            case DIR_PMM:
                                 x1b = x1a + q * dx;
                                 x2b = x2a - q * dx;
                                 x3b = x3a - q * dx;
                                 break;
-                            case D3Q27System::DIR_MPP:
+                            case DIR_MPP:
                                 x1b = x1a - q * dx;
                                 x2b = x2a + q * dx;
                                 x3b = x3a + q * dx;
@@ -760,6 +766,8 @@ void D3Q27Interactor::addQsLineSet(std::vector<UbTupleFloat3> &nodes, std::vecto
 ////////////////////////////////////////////////////////////////////////////
 vector<pair<GbPoint3D, GbPoint3D>> D3Q27Interactor::getQsLineSet()
 {
+    using namespace vf::lbm::dir;
+
     vector<pair<GbPoint3D, GbPoint3D>> QsLineSet;
     pair<GbPoint3D, GbPoint3D> pointpair;
 
@@ -782,17 +790,17 @@ vector<pair<GbPoint3D, GbPoint3D>> D3Q27Interactor::getQsLineSet()
         bool include_TN_Edge = false; //(x1/x2/x3)=([0..blocknx1[/blocknx2/blocknx1)
         bool include_TE_Edge = false; //(x1/x2/x3)=(blocknx1/[0..blocknx2[/blocknx2)
         if (block) {
-            if (!block->getConnector(D3Q27System::DIR_0P0))
+            if (!block->getConnector(DIR_0P0))
                 include_N_Face = true;
-            if (!block->getConnector(D3Q27System::DIR_P00))
+            if (!block->getConnector(DIR_P00))
                 include_E_Face = true;
-            if (!block->getConnector(D3Q27System::DIR_00P))
+            if (!block->getConnector(DIR_00P))
                 include_T_Face = true;
-            if (!block->getConnector(D3Q27System::DIR_PP0) && include_N_Face && include_E_Face)
+            if (!block->getConnector(DIR_PP0) && include_N_Face && include_E_Face)
                 include_NE_Edge = true;
-            if (!block->getConnector(D3Q27System::DIR_0PP) && include_T_Face && include_N_Face)
+            if (!block->getConnector(DIR_0PP) && include_T_Face && include_N_Face)
                 include_TN_Edge = true;
-            if (!block->getConnector(D3Q27System::DIR_P0P) && include_T_Face && include_E_Face)
+            if (!block->getConnector(DIR_P0P) && include_T_Face && include_E_Face)
                 include_TE_Edge = true;
         }
 
@@ -834,132 +842,132 @@ vector<pair<GbPoint3D, GbPoint3D>> D3Q27Interactor::getQsLineSet()
                         if (bc->hasBoundaryConditionFlag(D3Q27System::INVDIR[dir])) {
                             double x1b, x2b, x3b, q = bc->getQ(dir);
                             switch (dir) {
-                                case D3Q27System::DIR_P00:
+                                case DIR_P00:
                                     x1b = x1a + q * dx;
                                     x2b = x2a;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_0P0:
+                                case DIR_0P0:
                                     x1b = x1a;
                                     x2b = x2a + q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_M00:
+                                case DIR_M00:
                                     x1b = x1a - q * dx;
                                     x2b = x2a;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_0M0:
+                                case DIR_0M0:
                                     x1b = x1a;
                                     x2b = x2a - q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_PP0:
+                                case DIR_PP0:
                                     x1b = x1a + q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_MP0:
+                                case DIR_MP0:
                                     x1b = x1a - q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_MM0:
+                                case DIR_MM0:
                                     x1b = x1a - q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_PM0:
+                                case DIR_PM0:
                                     x1b = x1a + q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a;
                                     break;
-                                case D3Q27System::DIR_00P:
+                                case DIR_00P:
                                     x1b = x1a;
                                     x2b = x2a;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_P0P:
+                                case DIR_P0P:
                                     x1b = x1a + q * dx;
                                     x2b = x2a;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_0PP:
+                                case DIR_0PP:
                                     x1b = x1a;
                                     x2b = x2a + q * dx;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_M0P:
+                                case DIR_M0P:
                                     x1b = x1a - q * dx;
                                     x2b = x2a;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_0MP:
+                                case DIR_0MP:
                                     x1b = x1a;
                                     x2b = x2a - q * dx;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_00M:
+                                case DIR_00M:
                                     x1b = x1a;
                                     x2b = x2a;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_P0M:
+                                case DIR_P0M:
                                     x1b = x1a + q * dx;
                                     x2b = x2a;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_0PM:
+                                case DIR_0PM:
                                     x1b = x1a;
                                     x2b = x2a + q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_M0M:
+                                case DIR_M0M:
                                     x1b = x1a - q * dx;
                                     x2b = x2a;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_0MM:
+                                case DIR_0MM:
                                     x1b = x1a;
                                     x2b = x2a - q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_PPP:
+                                case DIR_PPP:
                                     x1b = x1a + q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_MMM:
+                                case DIR_MMM:
                                     x1b = x1a - q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_PPM:
+                                case DIR_PPM:
                                     x1b = x1a + q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_MMP:
+                                case DIR_MMP:
                                     x1b = x1a - q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_PMP:
+                                case DIR_PMP:
                                     x1b = x1a + q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a + q * dx;
                                     break;
-                                case D3Q27System::DIR_MPM:
+                                case DIR_MPM:
                                     x1b = x1a - q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_PMM:
+                                case DIR_PMM:
                                     x1b = x1a + q * dx;
                                     x2b = x2a - q * dx;
                                     x3b = x3a - q * dx;
                                     break;
-                                case D3Q27System::DIR_MPP:
+                                case DIR_MPP:
                                     x1b = x1a - q * dx;
                                     x2b = x2a + q * dx;
                                     x3b = x3a + q * dx;
diff --git a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp
index c7b13d383..0a10dae49 100644
--- a/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp
+++ b/src/cpu/VirtualFluidsCore/Interactors/D3Q27TriFaceMeshInteractor.cpp
@@ -122,6 +122,8 @@ bool D3Q27TriFaceMeshInteractor::setDifferencesToGbObject3D(const SPtr<Block3D>
 // E.F. /4/16/2013
 void D3Q27TriFaceMeshInteractor::setQs(const double &timeStep)
 {
+    using namespace vf::lbm::dir;
+
     UBLOGML(logDEBUG1, "\nLBMTriFaceMeshInteractor - setQs start ");
     if (!this->grid.lock())
         throw UbException(UB_EXARGS, "ups, no grid.lock()!!");
@@ -364,9 +366,9 @@ void D3Q27TriFaceMeshInteractor::setQs(const double &timeStep)
                 //            tmpSolidNodesFromOtherInteractors[block];
                 double q, distance;
 
-                double &nodeDx1 = nodeDeltaToNeigh[level][D3Q27System::DIR_P00];
-                double &nodeDx2 = nodeDeltaToNeigh[level][D3Q27System::DIR_0P0];
-                double &nodeDx3 = nodeDeltaToNeigh[level][D3Q27System::DIR_00P];
+                double &nodeDx1 = nodeDeltaToNeigh[level][DIR_P00];
+                double &nodeDx2 = nodeDeltaToNeigh[level][DIR_0P0];
+                double &nodeDx3 = nodeDeltaToNeigh[level][DIR_00P];
 
                 // fuer OBB-Test
                 double qEinflussDelta = 1.1 * sqrt(nodeDx1 * nodeDx1 + nodeDx2 * nodeDx2 + nodeDx3 * nodeDx3);
@@ -593,6 +595,8 @@ void D3Q27TriFaceMeshInteractor::setQs(const double &timeStep)
 //  2. fuer markiertre Bloecke wird ein rekursiver Fuellalgorithmus durchgefuehrt
 void D3Q27TriFaceMeshInteractor::initInteractor2(const double &timeStep)
 {
+    using namespace vf::lbm::dir;
+
     UBLOGML(logDEBUG1, "\nLBMTriFaceMeshInteractor - initInteractor start ");
     if (!this->grid.lock())
         throw UbException(UB_EXARGS, "ups, no grid.lock()!!");
@@ -880,9 +884,9 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const double &timeStep)
                 std::set<std::vector<int>> &solidsFromOtherInteractors = tmpSolidNodesFromOtherInteractors[block];
                 double q, internX1, internX2, internX3, distance;
 
-                double &nodeDx1 = nodeDeltaToNeigh[level][D3Q27System::DIR_P00];
-                double &nodeDx2 = nodeDeltaToNeigh[level][D3Q27System::DIR_0P0];
-                double &nodeDx3 = nodeDeltaToNeigh[level][D3Q27System::DIR_00P];
+                double &nodeDx1 = nodeDeltaToNeigh[level][DIR_P00];
+                double &nodeDx2 = nodeDeltaToNeigh[level][DIR_0P0];
+                double &nodeDx3 = nodeDeltaToNeigh[level][DIR_00P];
 
                 // fuer OBB-Test
                 double qEinflussDelta = 1.1 * sqrt(nodeDx1 * nodeDx1 + nodeDx2 * nodeDx2 + nodeDx3 * nodeDx3);
@@ -1181,9 +1185,9 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const double &timeStep)
 
                 std::set<UbTupleInt3> &solidNodeIndices = this->solidNodeIndicesMap[block];
 
-                float nodeDeltaX1 = (float)nodeDeltaToNeigh[level][D3Q27System::DIR_P00];
-                float nodeDeltaX2 = (float)nodeDeltaToNeigh[level][D3Q27System::DIR_0P0];
-                float nodeDeltaX3 = (float)nodeDeltaToNeigh[level][D3Q27System::DIR_00P];
+                float nodeDeltaX1 = (float)nodeDeltaToNeigh[level][DIR_P00];
+                float nodeDeltaX2 = (float)nodeDeltaToNeigh[level][DIR_0P0];
+                float nodeDeltaX3 = (float)nodeDeltaToNeigh[level][DIR_00P];
 
                 // flagfield matrix initialisieren
                 CbArray3D<FLAGS> flagField(blocknx1, blocknx2, blocknx3, UNDEF_FLAG);
diff --git a/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp
index 50a5339ea..9b3ec777c 100644
--- a/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/BGKLBMKernel.cpp
@@ -41,6 +41,7 @@ void BGKLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+    using namespace vf::lbm::dir;
 
     // initializing of forcing stuff
     if (withForcing) {
@@ -263,35 +264,35 @@ void BGKLBMKernel::calculate(int step)
                     //////////////////////////////////////////////////////////////////////////
                     // write distribution
                     //////////////////////////////////////////////////////////////////////////
-                    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)     = f[D3Q27System::INV_P00];
-                    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)     = f[D3Q27System::INV_0P0];
-                    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)     = f[D3Q27System::INV_00P];
-                    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)    = f[D3Q27System::INV_PP0];
-                    (*this->localDistributions)(D3Q27System::ET_NW, x1p, x2, x3)   = f[D3Q27System::INV_MP0];
-                    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)    = f[D3Q27System::INV_P0P];
-                    (*this->localDistributions)(D3Q27System::ET_TW, x1p, x2, x3)   = f[D3Q27System::INV_M0P];
-                    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)    = f[D3Q27System::INV_0PP];
-                    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2p, x3)   = f[D3Q27System::INV_0MP];
-                    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)   = f[D3Q27System::INV_PPP];
-                    (*this->localDistributions)(D3Q27System::ET_TNW, x1p, x2, x3)  = f[D3Q27System::INV_MPP];
-                    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2p, x3)  = f[D3Q27System::INV_PMP];
-                    (*this->localDistributions)(D3Q27System::ET_TSW, x1p, x2p, x3) = f[D3Q27System::INV_MMP];
+                    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3)     = f[INV_P00];
+                    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3)     = f[INV_0P0];
+                    (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3)     = f[INV_00P];
+                    (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3)    = f[INV_PP0];
+                    (*this->localDistributions)(D3Q27System::ET_NW, x1p, x2, x3)   = f[INV_MP0];
+                    (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3)    = f[INV_P0P];
+                    (*this->localDistributions)(D3Q27System::ET_TW, x1p, x2, x3)   = f[INV_M0P];
+                    (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3)    = f[INV_0PP];
+                    (*this->localDistributions)(D3Q27System::ET_TS, x1, x2p, x3)   = f[INV_0MP];
+                    (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3)   = f[INV_PPP];
+                    (*this->localDistributions)(D3Q27System::ET_TNW, x1p, x2, x3)  = f[INV_MPP];
+                    (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2p, x3)  = f[INV_PMP];
+                    (*this->localDistributions)(D3Q27System::ET_TSW, x1p, x2p, x3) = f[INV_MMP];
 
-                    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1p, x2, x3)     = f[D3Q27System::INV_M00];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2p, x3)     = f[D3Q27System::INV_0M0];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3p)     = f[D3Q27System::INV_00M];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1p, x2p, x3)   = f[D3Q27System::INV_MM0];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2p, x3)    = f[D3Q27System::INV_PM0];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1p, x2, x3p)   = f[D3Q27System::INV_M0M];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3p)    = f[D3Q27System::INV_P0M];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2p, x3p)   = f[D3Q27System::INV_0MM];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3p)    = f[D3Q27System::INV_0PM];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1p, x2p, x3p) = f[D3Q27System::INV_MMM];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2p, x3p)  = f[D3Q27System::INV_PMM];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1p, x2, x3p)  = f[D3Q27System::INV_MPM];
-                    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3p)   = f[D3Q27System::INV_PPM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_W, x1p, x2, x3)     = f[INV_M00];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2p, x3)     = f[INV_0M0];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3p)     = f[INV_00M];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1p, x2p, x3)   = f[INV_MM0];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2p, x3)    = f[INV_PM0];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1p, x2, x3p)   = f[INV_M0M];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3p)    = f[INV_P0M];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2p, x3p)   = f[INV_0MM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3p)    = f[INV_0PM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1p, x2p, x3p) = f[INV_MMM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2p, x3p)  = f[INV_PMM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1p, x2, x3p)  = f[INV_MPM];
+                    (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3p)   = f[INV_PPM];
 
-                    (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+                    (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
                     //////////////////////////////////////////////////////////////////////////
                 }
             }
diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp
index a359db9cd..ee57eb4d9 100644
--- a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp
@@ -60,6 +60,7 @@ void CompressibleOffsetInterpolationProcessor::calcMoments(const LBMReal* const
                                                     LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal drho = 0.0;
    D3Q27System::calcCompMacroscopicValues(f,drho,vx1,vx2,vx3);
@@ -457,6 +458,7 @@ void CompressibleOffsetInterpolationProcessor::calcInterpolatedCoefficiets(const
 void CompressibleOffsetInterpolationProcessor::calcInterpolatedNodeCF(LBMReal* f, LBMReal  /*omega*/, LBMReal  /*x*/, LBMReal  /*y*/, LBMReal  /*z*/, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal rho  = press ;//+ (2.*axx*x+axy*y+axz*z+axyz*y*z+ax + 2.*byy*y+bxy*x+byz*z+bxyz*x*z+by + 2.*czz*z+cxz*x+cyz*y+cxyz*x*y+cz)/3.;
    LBMReal vx1  = a0 + 0.25*( xs*ax + ys*ay + zs*az) + 0.0625*(axx + xs*ys*axy + xs*zs*axz + ayy + ys*zs*ayz + azz) + 0.015625*(xs*ys*zs*axyz);
@@ -608,6 +610,7 @@ LBMReal CompressibleOffsetInterpolationProcessor::calcPressBNE()
 void CompressibleOffsetInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal press  =  press_NET * (0.125 - 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
       press_NWT * (0.125 + 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp
index e6883626c..08eef4d95 100644
--- a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetMomentsInterpolationProcessor.cpp
@@ -89,6 +89,7 @@ void CompressibleOffsetMomentsInterpolationProcessor::calcMoments(const LBMReal*
                                                     LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal drho = 0.0;
    D3Q27System::calcCompMacroscopicValues(f,drho,vx1,vx2,vx3);
@@ -486,6 +487,7 @@ void CompressibleOffsetMomentsInterpolationProcessor::calcInterpolatedCoefficiet
 void CompressibleOffsetMomentsInterpolationProcessor::calcInterpolatedNodeCF(LBMReal* f, LBMReal omega, LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal eps_new = 0.5;
    LBMReal o = omega;
@@ -922,6 +924,7 @@ LBMReal CompressibleOffsetMomentsInterpolationProcessor::calcPressBNE()
 void CompressibleOffsetMomentsInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal press  =  press_NET * (0.125 - 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
       press_NWT * (0.125 + 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
diff --git a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetSquarePressureInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetSquarePressureInterpolationProcessor.cpp
index c9cc8138d..c71e1f782 100644
--- a/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetSquarePressureInterpolationProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/CompressibleOffsetSquarePressureInterpolationProcessor.cpp
@@ -79,6 +79,7 @@ void CompressibleOffsetSquarePressureInterpolationProcessor::calcMoments(const L
                                                     LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal drho = 0.0;
    D3Q27System::calcCompMacroscopicValues(f,drho,vx1,vx2,vx3);
@@ -476,6 +477,7 @@ void CompressibleOffsetSquarePressureInterpolationProcessor::calcInterpolatedCoe
 void CompressibleOffsetSquarePressureInterpolationProcessor::calcInterpolatedNodeCF(LBMReal* f, LBMReal omega, LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal eps_new = 0.5;
    LBMReal o = omega;
@@ -917,6 +919,7 @@ LBMReal CompressibleOffsetSquarePressureInterpolationProcessor::calcPressBNE()
 void CompressibleOffsetSquarePressureInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal press  =  press_NET * (0.125 - 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
       press_NWT * (0.125 + 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
diff --git a/src/cpu/VirtualFluidsCore/LBM/D3Q27System.cpp b/src/cpu/VirtualFluidsCore/LBM/D3Q27System.cpp
index 7e2fd17c0..e5135558b 100644
--- a/src/cpu/VirtualFluidsCore/LBM/D3Q27System.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/D3Q27System.cpp
@@ -23,16 +23,16 @@ const double WEIGTH[] = { c8o27,
                           c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,  c1o54,
                           c1o216, c1o216, c1o216, c1o216, c1o216, c1o216, c1o216, c1o216 };
 
-const int INVDIR[] = { DIR_000, INV_P00,   INV_M00,   INV_0P0,   INV_0M0,   INV_00P,   INV_00M,   INV_PP0,  INV_MM0, INV_PM0,
-                       INV_MP0,  INV_P0P,  INV_M0M,  INV_P0M,  INV_M0P,  INV_0PP,  INV_0MM,  INV_0PM, INV_0MP,
-                       INV_PPP, INV_MPP, INV_PMP, INV_MMP, INV_PPM, INV_MPM, INV_PMM, INV_MMM };
+const int INVDIR[] = { vf::lbm::dir::DIR_000, vf::lbm::dir::INV_P00,   vf::lbm::dir::INV_M00,  vf::lbm::dir::INV_0P0,  vf::lbm::dir::INV_0M0,   vf::lbm::dir::INV_00P,   vf::lbm::dir::INV_00M,   vf::lbm::dir::INV_PP0,  vf::lbm::dir::INV_MM0, vf::lbm::dir::INV_PM0,
+                       vf::lbm::dir::INV_MP0, vf::lbm::dir::INV_P0P,  vf::lbm::dir::INV_M0M,  vf::lbm::dir::INV_P0M,  vf::lbm::dir::INV_M0P,  vf::lbm::dir::INV_0PP,  vf::lbm::dir::INV_0MM,  vf::lbm::dir::INV_0PM, vf::lbm::dir::INV_0MP,
+                       vf::lbm::dir::INV_PPP, vf::lbm::dir::INV_MPP, vf::lbm::dir::INV_PMP, vf::lbm::dir::INV_MMP, vf::lbm::dir::INV_PPM, vf::lbm::dir::INV_MPM, vf::lbm::dir::INV_PMM, vf::lbm::dir::INV_MMM };
 
 // index             0   1   2   3   4   5  6   7   8    9  10  11  12  13  14  15  16  17  18
 // direction:        E,  W,  N,  S,  T,  B, NE, SW, SE, NW, TE, BW, BE, TW, TN, BS, BN, TS, TNE TNW TSE TSW BNE BNW BSE
 // BSW
-const int EX1[] = { 0, 1, -1, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, -1 };
-const int EX2[] = { 0, 0, 0, 1, -1, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1 };
-const int EX3[] = { 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1 };
+//const int EX1[] = { 0, 1, -1, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, -1 };
+//const int EX2[] = { 0, 0, 0, 1, -1, 0, 0, 1, -1, -1, 1, 0, 0, 0, 0, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1 };
+//const int EX3[] = { 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, -1, -1, -1 };
 
 //////////////////////////////////////////////////////////////////////////
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/D3Q27System.h b/src/cpu/VirtualFluidsCore/LBM/D3Q27System.h
index d88222194..fad9bb00a 100644
--- a/src/cpu/VirtualFluidsCore/LBM/D3Q27System.h
+++ b/src/cpu/VirtualFluidsCore/LBM/D3Q27System.h
@@ -38,10 +38,13 @@
 #include <string>
 #include <iostream>
 
+#include "lbm/constants/D3Q27.h"
 #include "LBMSystem.h"
 #include "UbException.h"
 #include "UbMath.h"
 
+//using namespace vf::lbm::dir;
+
 //! \brief namespace for global system-functions
 namespace D3Q27System
 {
@@ -53,7 +56,7 @@ static const int FENDDIR   = 26; // D3Q27
 static const int STARTF = 0;
 static const int ENDF   = 26; // D3Q27
 
-static const int STARTDIR = 1; //0
+//static const int STARTDIR = 1; //0
 static const int ENDDIR   = 26;//26 // all geometric directions
 
 extern const int DX1[ENDDIR + 1];
@@ -126,60 +129,60 @@ extern const int EX3[ENDDIR + 1];
 //static constexpr int BSE = 25;
 //static constexpr int BSW = 26;
 
-static constexpr int DIR_000 = 0;
-static constexpr int DIR_P00 = 1;
-static constexpr int DIR_M00 = 2;
-static constexpr int DIR_0P0 = 3;
-static constexpr int DIR_0M0 = 4;
-static constexpr int DIR_00P = 5;
-static constexpr int DIR_00M = 6;
-static constexpr int DIR_PP0 = 7;
-static constexpr int DIR_MM0 = 8;
-static constexpr int DIR_PM0 = 9;
-static constexpr int DIR_MP0 = 10;
-static constexpr int DIR_P0P = 11;
-static constexpr int DIR_M0M = 12;
-static constexpr int DIR_P0M = 13;
-static constexpr int DIR_M0P = 14;
-static constexpr int DIR_0PP = 15;
-static constexpr int DIR_0MM = 16;
-static constexpr int DIR_0PM = 17;
-static constexpr int DIR_0MP = 18;
-static constexpr int DIR_PPP = 19;
-static constexpr int DIR_MPP = 20;
-static constexpr int DIR_PMP = 21;
-static constexpr int DIR_MMP = 22;
-static constexpr int DIR_PPM = 23;
-static constexpr int DIR_MPM = 24;
-static constexpr int DIR_PMM = 25;
-static constexpr int DIR_MMM = 26;
-
-static constexpr int INV_P00 = DIR_M00;
-static constexpr int INV_M00 = DIR_P00;
-static constexpr int INV_0P0 = DIR_0M0;
-static constexpr int INV_0M0 = DIR_0P0;
-static constexpr int INV_00P = DIR_00M;
-static constexpr int INV_00M = DIR_00P;
-static constexpr int INV_PP0 = DIR_MM0;
-static constexpr int INV_MM0 = DIR_PP0;
-static constexpr int INV_PM0 = DIR_MP0;
-static constexpr int INV_MP0 = DIR_PM0;
-static constexpr int INV_P0P = DIR_M0M;
-static constexpr int INV_M0M = DIR_P0P;
-static constexpr int INV_P0M = DIR_M0P;
-static constexpr int INV_M0P = DIR_P0M;
-static constexpr int INV_0PP = DIR_0MM;
-static constexpr int INV_0MM = DIR_0PP;
-static constexpr int INV_0PM = DIR_0MP;
-static constexpr int INV_0MP = DIR_0PM;
-static constexpr int INV_PPP = DIR_MMM;
-static constexpr int INV_MPP = DIR_PMM;
-static constexpr int INV_PMP = DIR_MPM;
-static constexpr int INV_MMP = DIR_PPM;
-static constexpr int INV_PPM = DIR_MMP;
-static constexpr int INV_MPM = DIR_PMP;
-static constexpr int INV_PMM = DIR_MPP;
-static constexpr int INV_MMM = DIR_PPP;
+//static constexpr int DIR_000 = 0;
+//static constexpr int DIR_P00 = 1;
+//static constexpr int DIR_M00 = 2;
+//static constexpr int DIR_0P0 = 3;
+//static constexpr int DIR_0M0 = 4;
+//static constexpr int DIR_00P = 5;
+//static constexpr int DIR_00M = 6;
+//static constexpr int DIR_PP0 = 7;
+//static constexpr int DIR_MM0 = 8;
+//static constexpr int DIR_PM0 = 9;
+//static constexpr int DIR_MP0 = 10;
+//static constexpr int DIR_P0P = 11;
+//static constexpr int DIR_M0M = 12;
+//static constexpr int DIR_P0M = 13;
+//static constexpr int DIR_M0P = 14;
+//static constexpr int DIR_0PP = 15;
+//static constexpr int DIR_0MM = 16;
+//static constexpr int DIR_0PM = 17;
+//static constexpr int DIR_0MP = 18;
+//static constexpr int DIR_PPP = 19;
+//static constexpr int DIR_MPP = 20;
+//static constexpr int DIR_PMP = 21;
+//static constexpr int DIR_MMP = 22;
+//static constexpr int DIR_PPM = 23;
+//static constexpr int DIR_MPM = 24;
+//static constexpr int DIR_PMM = 25;
+//static constexpr int DIR_MMM = 26;
+
+//static constexpr int INV_P00 = DIR_M00;
+//static constexpr int INV_M00 = DIR_P00;
+//static constexpr int INV_0P0 = DIR_0M0;
+//static constexpr int INV_0M0 = DIR_0P0;
+//static constexpr int INV_00P = DIR_00M;
+//static constexpr int INV_00M = DIR_00P;
+//static constexpr int INV_PP0 = DIR_MM0;
+//static constexpr int INV_MM0 = DIR_PP0;
+//static constexpr int INV_PM0 = DIR_MP0;
+//static constexpr int INV_MP0 = DIR_PM0;
+//static constexpr int INV_P0P = DIR_M0M;
+//static constexpr int INV_M0M = DIR_P0P;
+//static constexpr int INV_P0M = DIR_M0P;
+//static constexpr int INV_M0P = DIR_P0M;
+//static constexpr int INV_0PP = DIR_0MM;
+//static constexpr int INV_0MM = DIR_0PP;
+//static constexpr int INV_0PM = DIR_0MP;
+//static constexpr int INV_0MP = DIR_0PM;
+//static constexpr int INV_PPP = DIR_MMM;
+//static constexpr int INV_MPP = DIR_PMM;
+//static constexpr int INV_PMP = DIR_MPM;
+//static constexpr int INV_MMP = DIR_PPM;
+//static constexpr int INV_PPM = DIR_MMP;
+//static constexpr int INV_MPM = DIR_PMP;
+//static constexpr int INV_PMM = DIR_MPP;
+//static constexpr int INV_MMM = DIR_PPP;
 
 extern const int INVDIR[ENDDIR + 1];
 
@@ -213,6 +216,8 @@ static const int ET_BNE = 12;
 //////////////////////////////////////////////////////////////////////////
 inline std::string getDirectionString(int direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
         case DIR_P00:
             return "E";
@@ -273,109 +278,111 @@ inline std::string getDirectionString(int direction)
 //////////////////////////////////////////////////////////////////////////
 static inline void setNeighborCoordinatesForDirection(int &x1, int &x2, int &x3, const int &direction)
 {
+    using namespace vf::lbm::dir;
+
     switch (direction) {
-        case D3Q27System::DIR_P00:
+        case DIR_P00:
             x1++;
             break;
-        case D3Q27System::DIR_0P0:
+        case DIR_0P0:
             x2++;
             break;
-        case D3Q27System::DIR_00P:
+        case DIR_00P:
             x3++;
             break;
-        case D3Q27System::DIR_M00:
+        case DIR_M00:
             x1--;
             break;
-        case D3Q27System::DIR_0M0:
+        case DIR_0M0:
             x2--;
             break;
-        case D3Q27System::DIR_00M:
+        case DIR_00M:
             x3--;
             break;
-        case D3Q27System::DIR_PP0:
+        case DIR_PP0:
             x1++;
             x2++;
             break;
-        case D3Q27System::DIR_MP0:
+        case DIR_MP0:
             x1--;
             x2++;
             break;
-        case D3Q27System::DIR_MM0:
+        case DIR_MM0:
             x1--;
             x2--;
             break;
-        case D3Q27System::DIR_PM0:
+        case DIR_PM0:
             x1++;
             x2--;
             break;
-        case D3Q27System::DIR_P0P:
+        case DIR_P0P:
             x1++;
             x3++;
             break;
-        case D3Q27System::DIR_M0M:
+        case DIR_M0M:
             x1--;
             x3--;
             break;
-        case D3Q27System::DIR_P0M:
+        case DIR_P0M:
             x1++;
             x3--;
             break;
-        case D3Q27System::DIR_M0P:
+        case DIR_M0P:
             x1--;
             x3++;
             break;
-        case D3Q27System::DIR_0PP:
+        case DIR_0PP:
             x2++;
             x3++;
             break;
-        case D3Q27System::DIR_0MM:
+        case DIR_0MM:
             x2--;
             x3--;
             break;
-        case D3Q27System::DIR_0PM:
+        case DIR_0PM:
             x2++;
             x3--;
             break;
-        case D3Q27System::DIR_0MP:
+        case DIR_0MP:
             x2--;
             x3++;
             break;
-        case D3Q27System::DIR_PPP:
+        case DIR_PPP:
             x1++;
             x2++;
             x3++;
             break;
-        case D3Q27System::DIR_MPP:
+        case DIR_MPP:
             x1--;
             x2++;
             x3++;
             break;
-        case D3Q27System::DIR_PMP:
+        case DIR_PMP:
             x1++;
             x2--;
             x3++;
             break;
-        case D3Q27System::DIR_MMP:
+        case DIR_MMP:
             x1--;
             x2--;
             x3++;
             break;
-        case D3Q27System::DIR_PPM:
+        case DIR_PPM:
             x1++;
             x2++;
             x3--;
             break;
-        case D3Q27System::DIR_MPM:
+        case DIR_MPM:
             x1--;
             x2++;
             x3--;
             break;
-        case D3Q27System::DIR_PMM:
+        case DIR_PMM:
             x1++;
             x2--;
             x3--;
             break;
-        case D3Q27System::DIR_MMM:
+        case DIR_MMM:
             x1--;
             x2--;
             x3--;
@@ -402,6 +409,8 @@ LBMReal getIncompVelocityX3(const LBMReal *const &f /*[27]*/);
 /*=====================================================================*/
 static void calcDensity(const LBMReal *const &f /*[27]*/, LBMReal &rho)
 {
+    using namespace vf::lbm::dir;
+
     rho = ((f[DIR_PPP] + f[DIR_MMM]) + (f[DIR_PMP] + f[DIR_MPM])) + ((f[DIR_PMM] + f[DIR_MPP]) + (f[DIR_MMP] + f[DIR_PPM])) +
           (((f[DIR_PP0] + f[DIR_MM0]) + (f[DIR_PM0] + f[DIR_MP0])) + ((f[DIR_P0P] + f[DIR_M0M]) + (f[DIR_P0M] + f[DIR_M0P])) +
            ((f[DIR_0PM] + f[DIR_0MP]) + (f[DIR_0PP] + f[DIR_0MM]))) +
@@ -410,24 +419,32 @@ static void calcDensity(const LBMReal *const &f /*[27]*/, LBMReal &rho)
 /*=====================================================================*/
 static void calcIncompVelocityX1(const LBMReal *const &f /*[27]*/, LBMReal &vx1)
 {
+    using namespace vf::lbm::dir;
+
     vx1 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_PMM] - f[DIR_MPP]) + (f[DIR_PPM] - f[DIR_MMP]))) +
            (((f[DIR_P0M] - f[DIR_M0P]) + (f[DIR_P0P] - f[DIR_M0M])) + ((f[DIR_PM0] - f[DIR_MP0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_P00] - f[DIR_M00]));
 }
 /*=====================================================================*/
 static void calcIncompVelocityX2(const LBMReal *const &f /*[27]*/, LBMReal &vx2)
 {
+    using namespace vf::lbm::dir;
+
     vx2 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_MPM] - f[DIR_PMP])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_PPM] - f[DIR_MMP]))) +
            (((f[DIR_0PM] - f[DIR_0MP]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_MP0] - f[DIR_PM0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_0P0] - f[DIR_0M0]));
 }
 /*=====================================================================*/
 static void calcIncompVelocityX3(const LBMReal *const &f /*[27]*/, LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     vx3 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_MMP] - f[DIR_PPM]))) +
            (((f[DIR_0MP] - f[DIR_0PM]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_M0P] - f[DIR_P0M]) + (f[DIR_P0P] - f[DIR_M0M]))) + (f[DIR_00P] - f[DIR_00M]));
 }
 /*=====================================================================*/
 static LBMReal getCompVelocityX1(const LBMReal *const &f /*[27]*/)
 {
+    using namespace vf::lbm::dir;
+
     return ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_PMM] - f[DIR_MPP]) + (f[DIR_PPM] - f[DIR_MMP]))) +
             (((f[DIR_P0M] - f[DIR_M0P]) + (f[DIR_P0P] - f[DIR_M0M])) + ((f[DIR_PM0] - f[DIR_MP0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_P00] - f[DIR_M00])) /
            getDensity(f);
@@ -435,6 +452,8 @@ static LBMReal getCompVelocityX1(const LBMReal *const &f /*[27]*/)
 /*=====================================================================*/
 static LBMReal getCompVelocityX2(const LBMReal *const &f /*[27]*/)
 {
+    using namespace vf::lbm::dir;
+
     return ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_MPM] - f[DIR_PMP])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_PPM] - f[DIR_MMP]))) +
             (((f[DIR_0PM] - f[DIR_0MP]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_MP0] - f[DIR_PM0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_0P0] - f[DIR_0M0])) /
            getDensity(f);
@@ -442,6 +461,8 @@ static LBMReal getCompVelocityX2(const LBMReal *const &f /*[27]*/)
 /*=====================================================================*/
 static LBMReal getCompVelocityX3(const LBMReal *const &f /*[27]*/)
 {
+    using namespace vf::lbm::dir;
+
     return ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_MMP] - f[DIR_PPM]))) +
             (((f[DIR_0MP] - f[DIR_0PM]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_M0P] - f[DIR_P0M]) + (f[DIR_P0P] - f[DIR_M0M]))) + (f[DIR_00P] - f[DIR_00M])) /
            getDensity(f);
@@ -449,6 +470,8 @@ static LBMReal getCompVelocityX3(const LBMReal *const &f /*[27]*/)
 /*=====================================================================*/
 static void calcCompVelocityX1(const LBMReal *const &f /*[27]*/, LBMReal &vx1)
 {
+    using namespace vf::lbm::dir;
+
     vx1 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_PMM] - f[DIR_MPP]) + (f[DIR_PPM] - f[DIR_MMP]))) +
            (((f[DIR_P0M] - f[DIR_M0P]) + (f[DIR_P0P] - f[DIR_M0M])) + ((f[DIR_PM0] - f[DIR_MP0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_P00] - f[DIR_M00])) /
           getDensity(f);
@@ -456,6 +479,8 @@ static void calcCompVelocityX1(const LBMReal *const &f /*[27]*/, LBMReal &vx1)
 /*=====================================================================*/
 static void calcCompVelocityX2(const LBMReal *const &f /*[27]*/, LBMReal &vx2)
 {
+    using namespace vf::lbm::dir;
+
     vx2 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_MPM] - f[DIR_PMP])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_PPM] - f[DIR_MMP]))) +
            (((f[DIR_0PM] - f[DIR_0MP]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_MP0] - f[DIR_PM0]) + (f[DIR_PP0] - f[DIR_MM0]))) + (f[DIR_0P0] - f[DIR_0M0])) /
           getDensity(f);
@@ -463,6 +488,8 @@ static void calcCompVelocityX2(const LBMReal *const &f /*[27]*/, LBMReal &vx2)
 /*=====================================================================*/
 static void calcCompVelocityX3(const LBMReal *const &f /*[27]*/, LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     vx3 = ((((f[DIR_PPP] - f[DIR_MMM]) + (f[DIR_PMP] - f[DIR_MPM])) + ((f[DIR_MPP] - f[DIR_PMM]) + (f[DIR_MMP] - f[DIR_PPM]))) +
            (((f[DIR_0MP] - f[DIR_0PM]) + (f[DIR_0PP] - f[DIR_0MM])) + ((f[DIR_M0P] - f[DIR_P0M]) + (f[DIR_P0P] - f[DIR_M0M]))) + (f[DIR_00P] - f[DIR_00M])) /
           getDensity(f);
@@ -494,6 +521,8 @@ static void calcCompMacroscopicValues(const LBMReal *const &f /*[27]*/, LBMReal
 static LBMReal getCompFeqForDirection(const int &direction, const LBMReal &drho, const LBMReal &vx1, const LBMReal &vx2,
                                       const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
     LBMReal rho   = drho + UbMath::one;
     switch (direction) {
@@ -587,6 +616,8 @@ static LBMReal getCompFeqForDirection(const int &direction, const LBMReal &drho,
 static void calcCompFeq(LBMReal *const &feq /*[27]*/, const LBMReal &drho, const LBMReal &vx1, const LBMReal &vx2,
                         const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
     LBMReal rho   = drho + UbMath::one;
 
@@ -634,6 +665,8 @@ static void calcCompFeq(LBMReal *const &feq /*[27]*/, const LBMReal &drho, const
 static LBMReal getIncompFeqForDirection(const int &direction, const LBMReal &drho, const LBMReal &vx1,
                                         const LBMReal &vx2, const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal cu_sq = 1.5f * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
 
     switch (direction) {
@@ -719,6 +752,8 @@ static LBMReal getIncompFeqForDirection(const int &direction, const LBMReal &drh
 static void calcIncompFeq(LBMReal *const &feq /*[27]*/, const LBMReal &drho, const LBMReal &vx1, const LBMReal &vx2,
                           const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
 
     feq[DIR_000] = UbMath::c8o27 * (drho - cu_sq);
@@ -761,6 +796,8 @@ static void calcIncompFeq(LBMReal *const &feq /*[27]*/, const LBMReal &drho, con
 static inline float getBoundaryVelocityForDirection(const int &direction, const float &bcVelocityX1,
                                                     const float &bcVelocityX2, const float &bcVelocityX3)
 {
+    using namespace vf::lbm::dir;
+ 
     switch (direction) {
         case DIR_P00:
             return (float)(UbMath::c4o9 * (+bcVelocityX1));
@@ -822,8 +859,9 @@ static inline float getBoundaryVelocityForDirection(const int &direction, const
 static const int &getInvertDirection(const int &direction)
 {
 #ifdef _DEBUG
-    if (direction < STARTDIR || direction > ENDDIR)
-        throw UbException(UB_EXARGS, "unknown direction");
+ //   if (direction < STARTDIR || direction > ENDDIR)
+     if (direction < FSTARTDIR || direction > FENDDIR)
+       throw UbException(UB_EXARGS, "unknown direction");
 #endif
     return INVDIR[direction];
 }
@@ -839,26 +877,26 @@ static void getLBMDirections(std::vector<int> &dirs, bool onlyLBdirs = false)
     } else /*STARTDIR->ENDDIR*/
     {
         dirs.resize(ENDDIR + 1);
-        for (int dir = STARTDIR; dir <= ENDDIR; ++dir)
+        for (int dir = STARTF; dir <= ENDF; ++dir)
             dirs[dir] = dir;
     }
 }
 //////////////////////////////////////////////////////////////////////////
-static std::vector<int> getEX(const int &exn)
+static std::vector<int> getDX(const int &exn)
 {
     std::vector<int> ex;
     ex.resize(ENDDIR + 1);
     switch (exn) {
         case 1:
-            for (int dir = STARTDIR; dir <= ENDDIR; ++dir)
+            for (int dir = FSTARTDIR; dir <= FENDDIR; ++dir)
                 ex[dir] = DX1[dir];
             break;
         case 2:
-            for (int dir = STARTDIR; dir <= ENDDIR; ++dir)
+            for (int dir = FSTARTDIR; dir <= FENDDIR; ++dir)
                 ex[dir] = DX2[dir];
             break;
         case 3:
-            for (int dir = STARTDIR; dir <= ENDDIR; ++dir)
+            for (int dir = FSTARTDIR; dir <= FENDDIR; ++dir)
                 ex[dir] = DX3[dir];
             break;
     }
@@ -867,6 +905,8 @@ static std::vector<int> getEX(const int &exn)
 //////////////////////////////////////////////////////////////////////////
 static inline void calcDistanceToNeighbors(std::vector<double> &distNeigh, const double &deltaX1)
 {
+    using namespace vf::lbm::dir;
+
     // distNeigh.resize(FENDDIR+1, UbMath::sqrt2*deltaX1);
 
     distNeigh[DIR_P00] = distNeigh[DIR_M00] = distNeigh[DIR_0P0] = deltaX1;
@@ -881,6 +921,8 @@ static inline void calcDistanceToNeighbors(std::vector<double> &distNeigh, const
 static inline void calcDistanceToNeighbors(std::vector<double> &distNeigh, const double &deltaX1, const double &deltaX2,
                                            const double &deltaX3)
 {
+    using namespace vf::lbm::dir;
+
     // distNeigh.resize(FENDDIR+1, UbMath::sqrt2*deltaX1);
     distNeigh[DIR_P00] = distNeigh[DIR_M00] = deltaX1;
     distNeigh[DIR_0P0] = distNeigh[DIR_0M0] = deltaX2;
@@ -896,6 +938,8 @@ static inline void calcDistanceToNeighbors(std::vector<double> &distNeigh, const
 //////////////////////////////////////////////////////////////////////////
 static inline void initRayVectors(double *const &rayX1, double *const &rayX2, double *const &rayX3)
 {
+    using namespace vf::lbm::dir;
+
     int fdir;
     double c1oS2 = UbMath::one_over_sqrt2;
     double c1oS3 = UbMath::one_over_sqrt3;
@@ -1007,6 +1051,8 @@ static inline void initRayVectors(double *const &rayX1, double *const &rayX2, do
 //////////////////////////////////////////////////////////////////////////
 static inline LBMReal calcPress(const LBMReal *const f, LBMReal rho, LBMReal vx1, LBMReal vx2, LBMReal vx3)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal op = 1.0;
     return ((f[DIR_P00] + f[DIR_M00] + f[DIR_0P0] + f[DIR_0M0] + f[DIR_00P] + f[DIR_00M] +
              2. * (f[DIR_PP0] + f[DIR_MM0] + f[DIR_PM0] + f[DIR_MP0] + f[DIR_P0P] + f[DIR_M0M] + f[DIR_P0M] + f[DIR_M0P] + f[DIR_0PP] + f[DIR_0MM] + f[DIR_0PM] + f[DIR_0MP]) +
@@ -1019,6 +1065,8 @@ static inline LBMReal calcPress(const LBMReal *const f, LBMReal rho, LBMReal vx1
 //////////////////////////////////////////////////////////////////////////
 static inline LBMReal getShearRate(const LBMReal *const f, LBMReal collFactorF)
 {
+    using namespace vf::lbm::dir;
+
     LBMReal mfcbb = f[DIR_P00];
     LBMReal mfbcb = f[DIR_0P0];
     LBMReal mfbbc = f[DIR_00P];
@@ -1348,6 +1396,8 @@ static inline LBMReal getShearRate(const LBMReal *const f, LBMReal collFactorF)
 static void calcMultiphaseFeq(LBMReal *const &feq /*[27]*/, const LBMReal &rho, const LBMReal &p1, const LBMReal &vx1,
                               const LBMReal &vx2, const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     using namespace UbMath;
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
 
@@ -1391,6 +1441,8 @@ static void calcMultiphaseFeq(LBMReal *const &feq /*[27]*/, const LBMReal &rho,
 static void calcMultiphaseFeqVB(LBMReal *const &feq /*[27]*/, const LBMReal &p1, const LBMReal &vx1, const LBMReal &vx2,
                                 const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
+
     using namespace UbMath;
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
 
@@ -1426,7 +1478,9 @@ static void calcMultiphaseFeqVB(LBMReal *const &feq /*[27]*/, const LBMReal &p1,
 static void calcMultiphaseHeq(LBMReal *const &heq /*[27]*/, const LBMReal &phi, const LBMReal &vx1, const LBMReal &vx2,
                               const LBMReal &vx3)
 {
+    using namespace vf::lbm::dir;
     using namespace UbMath;
+
     LBMReal cu_sq = 1.5 * (vx1 * vx1 + vx2 * vx2 + vx3 * vx3);
 
     heq[DIR_000] = c8o27 * phi * (1.0 - cu_sq);
diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp
index 90bc19984..c2f293b1b 100644
--- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleCumulantWithSpongeLayerLBMKernel.cpp
@@ -33,6 +33,8 @@ void IncompressibleCumulantWithSpongeLayerLBMKernel::setRelaxFactorParam(int vdi
 //////////////////////////////////////////////////////////////////////////
 void IncompressibleCumulantWithSpongeLayerLBMKernel::initRelaxFactor(int vdir, double vL1, double vdx, double vSP)
 {
+    using namespace vf::lbm::dir;
+
    direction = vdir;
    L1 = vL1;
    dx = vdx;
@@ -68,37 +70,37 @@ void IncompressibleCumulantWithSpongeLayerLBMKernel::initRelaxFactor(int vdir, d
          {
             switch (direction)
             {
-            case D3Q27System::DIR_P00:
+            case DIR_P00:
                muX1 = (double)(x1 + ix1 * maxX1);
                if (muX1 >= (sizeX - sizeSP) / deltaT)
                   spongeFactor = (sizeX - (muX1 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
                else spongeFactor = 1.0;
                break;
-            case D3Q27System::DIR_M00:
+            case DIR_M00:
                muX1 = (double)(x1 + ix1 * maxX1);
                if (muX1 <= sizeSP / deltaT)
                   spongeFactor = (sizeSP - (muX1 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
                else spongeFactor = 1.0;
                break;
-            case D3Q27System::DIR_0P0:
+            case DIR_0P0:
                muX2 = (double)(x2 + ix2 * maxX2);
                if (muX2 >= (sizeX - sizeSP) / deltaT)
                   spongeFactor = (sizeX - (muX2 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
                else spongeFactor = 1.0;
                break;
-            case D3Q27System::DIR_0M0:
+            case DIR_0M0:
                muX2 = (double)(x2 + ix2 * maxX2);
                if (muX2 <= sizeSP / deltaT)
                   spongeFactor = (sizeSP - (muX2 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
                else spongeFactor = 1.0;
                break;
-            case D3Q27System::DIR_00P:
+            case DIR_00P:
                muX3 = (double)(x3 + ix3 * maxX3);
                if (muX3 >= (sizeX - sizeSP) / deltaT)
                   spongeFactor = (sizeX - (muX3 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
                else spongeFactor = 1.0;
                break;
-            case D3Q27System::DIR_00M:
+            case DIR_00M:
                muX3 = (double)(x3 + ix3 * maxX3);
                if (muX3 <= sizeSP / deltaT)
                   spongeFactor = (sizeSP - (muX3 * deltaT + 1)) / sizeSP / 2.0 + 0.5;
diff --git a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp
index 39b83f72a..2d2eef1af 100644
--- a/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/IncompressibleOffsetInterpolationProcessor.cpp
@@ -60,9 +60,10 @@ void IncompressibleOffsetInterpolationProcessor::calcMoments(const LBMReal* cons
                                                     LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    //UBLOG(logINFO,"D3Q27System::DIR_M0M  = " << D3Q27System::DIR_M0M);
-   //UBLOG(logINFO,"BW  = " << BW);
+   //UBLOG(logINFO,"BW  = " << BW);;
 
    LBMReal rho = 0.0;
    D3Q27System::calcIncompMacroscopicValues(f,rho,vx1,vx2,vx3);
@@ -85,7 +86,7 @@ void IncompressibleOffsetInterpolationProcessor::calcMoments(const LBMReal* cons
    kxy   = -3.*omega*((((f[DIR_MMP]+f[DIR_PPM])-(f[DIR_MPP]+f[DIR_PMM]))+((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_MPM]+f[DIR_PMP])))+((f[DIR_MM0]+f[DIR_PP0])-(f[DIR_MP0]+f[DIR_PM0]))-(vx1*vx2));// might not be optimal MG 25.2.13
    kyz   = -3.*omega*((((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_PMP]+f[DIR_MPM]))+((f[DIR_PMM]+f[DIR_MPP])-(f[DIR_MMP]+f[DIR_PPM])))+((f[DIR_0MM]+f[DIR_0PP])-(f[DIR_0MP]+f[DIR_0PM]))-(vx2*vx3));
    kxz   = -3.*omega*((((f[DIR_MPM]+f[DIR_PMP])-(f[DIR_MMP]+f[DIR_PPM]))+((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_PMM]+f[DIR_MPP])))+((f[DIR_M0M]+f[DIR_P0P])-(f[DIR_M0P]+f[DIR_P0M]))-(vx1*vx3));
-   kxxMyy = -3./2.*omega*((((f[D3Q27System::DIR_M0M]+f[DIR_P0P])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_M0P]+f[DIR_P0M])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_0M0]+f[DIR_0P0]))-(vx1*vx1-vx2*vx2));
+   kxxMyy = -3./2.*omega*((((f[DIR_M0M]+f[DIR_P0P])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_M0P]+f[DIR_P0M])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_0M0]+f[DIR_0P0]))-(vx1*vx1-vx2*vx2));
    kxxMzz = -3./2.*omega*((((f[DIR_MP0]+f[DIR_PM0])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_MM0]+f[DIR_PP0])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_00M]+f[DIR_00P]))-(vx1*vx1-vx3*vx3));
    //kxxMzz = -3./2.*omega*(((((f[NW]+f[SE])-(f[BS]+f[TN]))+((f[SW]+f[NE])-(f[17]+f[BN])))+((f[W]+f[DIR_P00])-(f[B]+f[T])))-(vx1*vx1-vx3*vx3));
 
@@ -529,6 +530,7 @@ void IncompressibleOffsetInterpolationProcessor::calcInterpolatedCoefficiets(con
 void IncompressibleOffsetInterpolationProcessor::calcInterpolatedNode(LBMReal* f, LBMReal  /*omega*/, LBMReal  /*x*/, LBMReal  /*y*/, LBMReal  /*z*/, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal rho  = press ;//+ (2.*axx*x+axy*y+axz*z+axyz*y*z+ax + 2.*byy*y+bxy*x+byz*z+bxyz*x*z+by + 2.*czz*z+cxz*x+cyz*y+cxyz*x*y+cz)/3.;
    LBMReal vx1  = a0 + 0.25*( xs*ax + ys*ay + zs*az) + 0.0625*(axx + xs*ys*axy + xs*zs*axz + ayy + ys*zs*ayz + azz) + 0.015625*(xs*ys*zs*axyz);
@@ -680,6 +682,7 @@ LBMReal IncompressibleOffsetInterpolationProcessor::calcPressBNE()
 void IncompressibleOffsetInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal press  =  press_NET * (0.125 - 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
       press_NWT * (0.125 + 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
diff --git a/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp
index c37571337..613443942 100644
--- a/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/InitDensityLBMKernel.cpp
@@ -856,6 +856,7 @@ double InitDensityLBMKernel::getCalculationTime()
 void InitDensityLBMKernel::calculate(int  /*step*/)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    localDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
    nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
@@ -1033,35 +1034,35 @@ void InitDensityLBMKernel::calculate(int  /*step*/)
                //////////////////////////////////////////////////////////////////////////
                //write distribution
                //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[D3Q27System::INV_P00];
-               (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[D3Q27System::INV_0P0];
-               (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[D3Q27System::INV_00P];
-               (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[D3Q27System::INV_PP0];
-               (*this->localDistributions)(D3Q27System::ET_NW, x1p, x2, x3) = f[D3Q27System::INV_MP0];
-               (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[D3Q27System::INV_P0P];
-               (*this->localDistributions)(D3Q27System::ET_TW, x1p, x2, x3) = f[D3Q27System::INV_M0P];
-               (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[D3Q27System::INV_0PP];
-               (*this->localDistributions)(D3Q27System::ET_TS, x1, x2p, x3) = f[D3Q27System::INV_0MP];
-               (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[D3Q27System::INV_PPP];
-               (*this->localDistributions)(D3Q27System::ET_TNW, x1p, x2, x3) = f[D3Q27System::INV_MPP];
-               (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2p, x3) = f[D3Q27System::INV_PMP];
-               (*this->localDistributions)(D3Q27System::ET_TSW, x1p, x2p, x3) = f[D3Q27System::INV_MMP];
+               (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = f[INV_P00];
+               (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = f[INV_0P0];
+               (*this->localDistributions)(D3Q27System::ET_T, x1, x2, x3) = f[INV_00P];
+               (*this->localDistributions)(D3Q27System::ET_NE, x1, x2, x3) = f[INV_PP0];
+               (*this->localDistributions)(D3Q27System::ET_NW, x1p, x2, x3) = f[INV_MP0];
+               (*this->localDistributions)(D3Q27System::ET_TE, x1, x2, x3) = f[INV_P0P];
+               (*this->localDistributions)(D3Q27System::ET_TW, x1p, x2, x3) = f[INV_M0P];
+               (*this->localDistributions)(D3Q27System::ET_TN, x1, x2, x3) = f[INV_0PP];
+               (*this->localDistributions)(D3Q27System::ET_TS, x1, x2p, x3) = f[INV_0MP];
+               (*this->localDistributions)(D3Q27System::ET_TNE, x1, x2, x3) = f[INV_PPP];
+               (*this->localDistributions)(D3Q27System::ET_TNW, x1p, x2, x3) = f[INV_MPP];
+               (*this->localDistributions)(D3Q27System::ET_TSE, x1, x2p, x3) = f[INV_PMP];
+               (*this->localDistributions)(D3Q27System::ET_TSW, x1p, x2p, x3) = f[INV_MMP];
 
-               (*this->nonLocalDistributions)(D3Q27System::ET_W, x1p, x2, x3) = f[D3Q27System::INV_M00];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2p, x3) = f[D3Q27System::INV_0M0];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3p) = f[D3Q27System::INV_00M];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1p, x2p, x3) = f[D3Q27System::INV_MM0];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2p, x3) = f[D3Q27System::INV_PM0];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1p, x2, x3p) = f[D3Q27System::INV_M0M];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3p) = f[D3Q27System::INV_P0M];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2p, x3p) = f[D3Q27System::INV_0MM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3p) = f[D3Q27System::INV_0PM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1p, x2p, x3p) = f[D3Q27System::INV_MMM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2p, x3p) = f[D3Q27System::INV_PMM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1p, x2, x3p) = f[D3Q27System::INV_MPM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3p) = f[D3Q27System::INV_PPM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_W, x1p, x2, x3) = f[INV_M00];
+               (*this->nonLocalDistributions)(D3Q27System::ET_S, x1, x2p, x3) = f[INV_0M0];
+               (*this->nonLocalDistributions)(D3Q27System::ET_B, x1, x2, x3p) = f[INV_00M];
+               (*this->nonLocalDistributions)(D3Q27System::ET_SW, x1p, x2p, x3) = f[INV_MM0];
+               (*this->nonLocalDistributions)(D3Q27System::ET_SE, x1, x2p, x3) = f[INV_PM0];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BW, x1p, x2, x3p) = f[INV_M0M];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BE, x1, x2, x3p) = f[INV_P0M];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BS, x1, x2p, x3p) = f[INV_0MM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BN, x1, x2, x3p) = f[INV_0PM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSW, x1p, x2p, x3p) = f[INV_MMM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSE, x1, x2p, x3p) = f[INV_PMM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNW, x1p, x2, x3p) = f[INV_MPM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNE, x1, x2, x3p) = f[INV_PPM];
 
-               (*this->zeroDistributions)(x1, x2, x3) = f[D3Q27System::DIR_000];
+               (*this->zeroDistributions)(x1, x2, x3) = f[DIR_000];
                //////////////////////////////////////////////////////////////////////////
 
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp b/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp
index 1fcdf118f..ae0b01045 100644
--- a/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp
@@ -42,6 +42,7 @@ SPtr<LBMKernel> LBMKernelETD3Q27BGK::clone()
 void LBMKernelETD3Q27BGK::calculate(int  /*step*/)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    //initializing of forcing stuff 
    if (withForcing)
@@ -255,35 +256,35 @@ void LBMKernelETD3Q27BGK::calculate(int  /*step*/)
                //////////////////////////////////////////////////////////////////////////
                //write distribution
                //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[D3Q27System::INV_P00];
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[D3Q27System::INV_0P0];
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[D3Q27System::INV_00P];
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[D3Q27System::INV_PP0];
-               (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3) = f[D3Q27System::INV_MP0];
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[D3Q27System::INV_P0P];
-               (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3) = f[D3Q27System::INV_M0P];
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[D3Q27System::INV_0PP];
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3) = f[D3Q27System::INV_0MP];
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[D3Q27System::INV_PPP];
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3) = f[D3Q27System::INV_MPP];
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3) = f[D3Q27System::INV_PMP];
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3) = f[D3Q27System::INV_MMP];
+               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[INV_P00];
+               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[INV_0P0];
+               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[INV_00P];
+               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[INV_PP0];
+               (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3) = f[INV_MP0];
+               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[INV_P0P];
+               (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3) = f[INV_M0P];
+               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[INV_0PP];
+               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3) = f[INV_0MP];
+               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[INV_PPP];
+               (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3) = f[INV_MPP];
+               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3) = f[INV_PMP];
+               (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3) = f[INV_MMP];
 
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = f[D3Q27System::INV_M00 ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = f[D3Q27System::INV_0M0 ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = f[D3Q27System::INV_00M ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = f[D3Q27System::INV_MM0];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = f[D3Q27System::INV_PM0];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = f[D3Q27System::INV_M0M];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = f[D3Q27System::INV_P0M];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = f[D3Q27System::INV_0MM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = f[D3Q27System::INV_0PM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = f[D3Q27System::INV_MMM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = f[D3Q27System::INV_PMM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = f[D3Q27System::INV_MPM];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = f[D3Q27System::INV_PPM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = f[INV_M00 ];
+               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = f[INV_0M0 ];
+               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = f[INV_00M ];
+               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = f[INV_MM0];
+               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = f[INV_PM0];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = f[INV_M0M];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = f[INV_P0M];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = f[INV_0MM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = f[INV_0PM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = f[INV_MMM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = f[INV_PMM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = f[INV_MPM];
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = f[INV_PPM];
 
-               (*this->zeroDistributions)(x1,x2,x3) = f[D3Q27System::DIR_000];
+               (*this->zeroDistributions)(x1,x2,x3) = f[DIR_000];
                //////////////////////////////////////////////////////////////////////////
 
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp
index ad80b3722..edb5ee176 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseCumulantLBMKernel.cpp
@@ -84,6 +84,7 @@ void MultiphaseCumulantLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+    using namespace vf::lbm::dir;
 
     forcingX1 = 0.0;
     forcingX2 = 0.0;
@@ -1140,35 +1141,35 @@ void MultiphaseCumulantLBMKernel::calculate(int step)
                             }
                         }
 
-                        (*this->localDistributionsH)(D3Q27System::ET_E, x1, x2, x3)     = h[D3Q27System::INV_P00];
-                        (*this->localDistributionsH)(D3Q27System::ET_N, x1, x2, x3)     = h[D3Q27System::INV_0P0];
-                        (*this->localDistributionsH)(D3Q27System::ET_T, x1, x2, x3)     = h[D3Q27System::INV_00P];
-                        (*this->localDistributionsH)(D3Q27System::ET_NE, x1, x2, x3)    = h[D3Q27System::INV_PP0];
-                        (*this->localDistributionsH)(D3Q27System::ET_NW, x1p, x2, x3)   = h[D3Q27System::INV_MP0];
-                        (*this->localDistributionsH)(D3Q27System::ET_TE, x1, x2, x3)    = h[D3Q27System::INV_P0P];
-                        (*this->localDistributionsH)(D3Q27System::ET_TW, x1p, x2, x3)   = h[D3Q27System::INV_M0P];
-                        (*this->localDistributionsH)(D3Q27System::ET_TN, x1, x2, x3)    = h[D3Q27System::INV_0PP];
-                        (*this->localDistributionsH)(D3Q27System::ET_TS, x1, x2p, x3)   = h[D3Q27System::INV_0MP];
-                        (*this->localDistributionsH)(D3Q27System::ET_TNE, x1, x2, x3)   = h[D3Q27System::INV_PPP];
-                        (*this->localDistributionsH)(D3Q27System::ET_TNW, x1p, x2, x3)  = h[D3Q27System::INV_MPP];
-                        (*this->localDistributionsH)(D3Q27System::ET_TSE, x1, x2p, x3)  = h[D3Q27System::INV_PMP];
-                        (*this->localDistributionsH)(D3Q27System::ET_TSW, x1p, x2p, x3) = h[D3Q27System::INV_MMP];
-
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_W, x1p, x2, x3)     = h[D3Q27System::INV_M00];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_S, x1, x2p, x3)     = h[D3Q27System::INV_0M0];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_B, x1, x2, x3p)     = h[D3Q27System::INV_00M];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_SW, x1p, x2p, x3)   = h[D3Q27System::INV_MM0];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_SE, x1, x2p, x3)    = h[D3Q27System::INV_PM0];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BW, x1p, x2, x3p)   = h[D3Q27System::INV_M0M];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BE, x1, x2, x3p)    = h[D3Q27System::INV_P0M];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BS, x1, x2p, x3p)   = h[D3Q27System::INV_0MM];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BN, x1, x2, x3p)    = h[D3Q27System::INV_0PM];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BSW, x1p, x2p, x3p) = h[D3Q27System::INV_MMM];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BSE, x1, x2p, x3p)  = h[D3Q27System::INV_PMM];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BNW, x1p, x2, x3p)  = h[D3Q27System::INV_MPM];
-                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BNE, x1, x2, x3p)   = h[D3Q27System::INV_PPM];
-
-                        (*this->zeroDistributionsH)(x1, x2, x3) = h[D3Q27System::DIR_000];
+                        (*this->localDistributionsH)(D3Q27System::ET_E, x1, x2, x3)     = h[INV_P00];
+                        (*this->localDistributionsH)(D3Q27System::ET_N, x1, x2, x3)     = h[INV_0P0];
+                        (*this->localDistributionsH)(D3Q27System::ET_T, x1, x2, x3)     = h[INV_00P];
+                        (*this->localDistributionsH)(D3Q27System::ET_NE, x1, x2, x3)    = h[INV_PP0];
+                        (*this->localDistributionsH)(D3Q27System::ET_NW, x1p, x2, x3)   = h[INV_MP0];
+                        (*this->localDistributionsH)(D3Q27System::ET_TE, x1, x2, x3)    = h[INV_P0P];
+                        (*this->localDistributionsH)(D3Q27System::ET_TW, x1p, x2, x3)   = h[INV_M0P];
+                        (*this->localDistributionsH)(D3Q27System::ET_TN, x1, x2, x3)    = h[INV_0PP];
+                        (*this->localDistributionsH)(D3Q27System::ET_TS, x1, x2p, x3)   = h[INV_0MP];
+                        (*this->localDistributionsH)(D3Q27System::ET_TNE, x1, x2, x3)   = h[INV_PPP];
+                        (*this->localDistributionsH)(D3Q27System::ET_TNW, x1p, x2, x3)  = h[INV_MPP];
+                        (*this->localDistributionsH)(D3Q27System::ET_TSE, x1, x2p, x3)  = h[INV_PMP];
+                        (*this->localDistributionsH)(D3Q27System::ET_TSW, x1p, x2p, x3) = h[INV_MMP];
+
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_W, x1p, x2, x3)     = h[INV_M00];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_S, x1, x2p, x3)     = h[INV_0M0];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_B, x1, x2, x3p)     = h[INV_00M];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_SW, x1p, x2p, x3)   = h[INV_MM0];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_SE, x1, x2p, x3)    = h[INV_PM0];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BW, x1p, x2, x3p)   = h[INV_M0M];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BE, x1, x2, x3p)    = h[INV_P0M];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BS, x1, x2p, x3p)   = h[INV_0MM];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BN, x1, x2, x3p)    = h[INV_0PM];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BSW, x1p, x2p, x3p) = h[INV_MMM];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BSE, x1, x2p, x3p)  = h[INV_PMM];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BNW, x1p, x2, x3p)  = h[INV_MPM];
+                        (*this->nonLocalDistributionsH)(D3Q27System::ET_BNE, x1, x2, x3p)   = h[INV_PPM];
+
+                        (*this->zeroDistributionsH)(x1, x2, x3) = h[DIR_000];
 
                         /////////////////////   END OF OLD BGK SOLVER ///////////////////////////////
                     }
@@ -1213,6 +1214,8 @@ LBMReal MultiphaseCumulantLBMKernel::gradX3_phi()
 LBMReal MultiphaseCumulantLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     LBMReal sum = 0.0;
     for (int k = FSTARTDIR; k <= FENDDIR; k++) {
         sum += WEIGTH[k] * (phi[k] - phi[DIR_000]);
@@ -1223,6 +1226,8 @@ LBMReal MultiphaseCumulantLBMKernel::nabla2_phi()
 void MultiphaseCumulantLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
     int minX1 = ghostLayerWidth;
@@ -1281,6 +1286,8 @@ void MultiphaseCumulantLBMKernel::findNeighbors(CbArray3D<LBMReal, IndexerX3X2X1
                                                 int x3)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
 
     SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp
index bd4df8aea..5e08ca6ef 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterCompressibleAirLBMKernel.cpp
@@ -139,6 +139,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::calculate(int step)
 {
 	using namespace D3Q27System;
 	using namespace UbMath;
+	using namespace vf::lbm::dir;
 
 	forcingX1 = 0.0;
 	forcingX2 = 0.0;
@@ -1475,6 +1476,8 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::calculate(int step)
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX1_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -1483,6 +1486,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX1_phi()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -1491,6 +1496,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX2_phi()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX3_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -1499,6 +1506,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX3_phi()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) + (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) + (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) + (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_PM0] - phi2[DIR_MP0]) + (phi2[DIR_PP0] - phi2[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_P00] - phi2[DIR_M00]));
@@ -1507,6 +1516,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX1_phi2()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PPM] - phi2[DIR_MMP]) - (phi2[DIR_PMP] - phi2[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_0PP] - phi2[DIR_0MM]) + (phi2[DIR_0PM] - phi2[DIR_0MP])) + ((phi2[DIR_PP0] - phi2[DIR_MM0]) - (phi2[DIR_PM0] - phi2[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_0P0] - phi2[DIR_0M0]));
@@ -1515,6 +1526,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX2_phi2()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) - (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) - (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_0MP] - phi2[DIR_0PM]) + (phi2[DIR_0PP] - phi2[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_00P] - phi2[DIR_00M]));
@@ -1523,6 +1536,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::gradX3_phi2()
 LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::nabla2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -1543,6 +1558,8 @@ LBMReal MultiphasePressureFilterCompressibleAirLBMKernel::nabla2_phi()
 void MultiphasePressureFilterCompressibleAirLBMKernel::computePhasefield()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
 	int minX1 = ghostLayerWidth;
@@ -1601,6 +1618,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::findNeighbors(CbArray3D<L
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
@@ -1621,6 +1639,7 @@ void MultiphasePressureFilterCompressibleAirLBMKernel::findNeighbors2(CbArray3D<
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp
index e1d24a227..31e6ce1c7 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphasePressureFilterLBMKernel.cpp
@@ -140,6 +140,7 @@ void MultiphasePressureFilterLBMKernel::calculate(int step)
 {
 	using namespace D3Q27System;
 	using namespace UbMath;
+	using namespace vf::lbm::dir;
 
 	forcingX1 = 0.0;
 	forcingX2 = 0.0;
@@ -1624,6 +1625,8 @@ void MultiphasePressureFilterLBMKernel::calculate(int step)
 LBMReal MultiphasePressureFilterLBMKernel::gradX1_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -1632,6 +1635,8 @@ LBMReal MultiphasePressureFilterLBMKernel::gradX1_phi()
 LBMReal MultiphasePressureFilterLBMKernel::gradX2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -1640,6 +1645,8 @@ LBMReal MultiphasePressureFilterLBMKernel::gradX2_phi()
 LBMReal MultiphasePressureFilterLBMKernel::gradX3_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -1648,6 +1655,8 @@ LBMReal MultiphasePressureFilterLBMKernel::gradX3_phi()
 LBMReal MultiphasePressureFilterLBMKernel::nabla2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -1668,6 +1677,8 @@ LBMReal MultiphasePressureFilterLBMKernel::nabla2_phi()
 void MultiphasePressureFilterLBMKernel::computePhasefield()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
 	int minX1 = ghostLayerWidth;
@@ -1726,6 +1737,7 @@ void MultiphasePressureFilterLBMKernel::findNeighbors(CbArray3D<LBMReal, Indexer
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp
index 7424fdcbe..163561da8 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseScratchCumulantLBMKernel.cpp
@@ -129,6 +129,7 @@ void MultiphaseScratchCumulantLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+	using namespace vf::lbm::dir;
 
     forcingX1 = 0.0;
     forcingX2 = 0.0;
@@ -2920,7 +2921,9 @@ void MultiphaseScratchCumulantLBMKernel::calculate(int step)
 
 LBMReal MultiphaseScratchCumulantLBMKernel::gradX1_phi()
 {
+	using namespace vf::lbm::dir;
     using namespace D3Q27System;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -2933,7 +2936,9 @@ LBMReal MultiphaseScratchCumulantLBMKernel::gradX1_phi()
 
 LBMReal MultiphaseScratchCumulantLBMKernel::gradX2_phi()
 {
+	using namespace vf::lbm::dir;
     using namespace D3Q27System;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -2946,7 +2951,9 @@ LBMReal MultiphaseScratchCumulantLBMKernel::gradX2_phi()
 
 LBMReal MultiphaseScratchCumulantLBMKernel::gradX3_phi()
 {
-    using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+	using namespace D3Q27System;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -2960,6 +2967,8 @@ LBMReal MultiphaseScratchCumulantLBMKernel::gradX3_phi()
 LBMReal MultiphaseScratchCumulantLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -2982,6 +2991,8 @@ LBMReal MultiphaseScratchCumulantLBMKernel::nabla2_phi()
 void MultiphaseScratchCumulantLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
     int minX1 = ghostLayerWidth;
@@ -3040,6 +3051,7 @@ void MultiphaseScratchCumulantLBMKernel::findNeighbors(CbArray3D<LBMReal, Indexe
                                                 int x3)
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
     SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp
index 179189f86..626ad538f 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseSimpleVelocityBaseExternalPressureLBMKernel.cpp
@@ -144,6 +144,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::calculate(int step)
 {
 	using namespace D3Q27System;
 	using namespace UbMath;
+	using namespace vf::lbm::dir;
 
 	forcingX1 = 0.0;
 	forcingX2 = 0.0;
@@ -2802,7 +2803,9 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::calculate(int step)
 
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_phi()
 {
+	using namespace vf::lbm::dir;
 	using namespace D3Q27System;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -2811,6 +2814,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_phi()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -2819,6 +2824,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_phi()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -2827,6 +2834,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_phi()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_rhoInv(LBMReal rhoL,LBMReal rhoDIV)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((1.0/(rhoL+rhoDIV*phi[DIR_PPP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMM])) + (1.0 / (rhoL + rhoDIV * phi[DIR_PMM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPP]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_PMP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPM])) + (1.0 / (rhoL + rhoDIV * phi[DIR_PPM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMP]))))
 		+ WEIGTH[DIR_PP0] * (((1.0 / (rhoL + rhoDIV * phi[DIR_P0P]) - 1.0 / (rhoL + rhoDIV * phi[DIR_M0M])) + (1.0 / (rhoL + rhoDIV * phi[DIR_P0M]) - 1.0 / (rhoL + rhoDIV * phi[DIR_M0P]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_PM0]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MP0])) + (1.0 / (rhoL + rhoDIV * phi[DIR_PP0]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MM0]))))) +
 		+WEIGTH[DIR_0P0] * (1.0 / (rhoL + rhoDIV * phi[DIR_P00]) - 1.0 / (rhoL + rhoDIV * phi[DIR_M00])));
@@ -2835,6 +2844,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_rhoInv(LBM
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_rhoInv(LBMReal rhoL,LBMReal rhoDIV)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((1.0 / (rhoL + rhoDIV * phi[DIR_PPP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMM])) - (1.0 / (rhoL + rhoDIV * phi[DIR_PMM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPP]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_PPM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMP])) - (1.0 / (rhoL + rhoDIV * phi[DIR_PMP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPM]))))
 		+ WEIGTH[DIR_PP0] * (((1.0 / (rhoL + rhoDIV * phi[DIR_0PP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_0MM])) + (1.0 / (rhoL + rhoDIV * phi[DIR_0PM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_0MP]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_PP0]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MM0])) - (1.0 / (rhoL + rhoDIV * phi[DIR_PM0]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MP0]))))) +
 		+WEIGTH[DIR_0P0] * (1.0 / (rhoL + rhoDIV * phi[DIR_0P0]) - 1.0 / (rhoL + rhoDIV * phi[DIR_0M0])));
@@ -2843,6 +2854,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_rhoInv(LBM
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_rhoInv(LBMReal rhoL, LBMReal rhoDIV)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((1.0 / (rhoL + rhoDIV * phi[DIR_PPP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMM])) - (1.0 / (rhoL + rhoDIV * phi[DIR_PMM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPP]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_PMP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MPM])) - (1.0 / (rhoL + rhoDIV * phi[DIR_PPM]) - 1.0 / (rhoL + rhoDIV * phi[DIR_MMP]))))
 		+ WEIGTH[DIR_PP0] * (((1.0 / (rhoL + rhoDIV * phi[DIR_P0P]) - 1.0 / (rhoL + rhoDIV * phi[DIR_M0M])) - (1.0 / (rhoL + rhoDIV * phi[DIR_P0M]) - 1.0 / (rhoL + rhoDIV * phi[DIR_M0P]))) + ((1.0 / (rhoL + rhoDIV * phi[DIR_0MP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_0PM])) + (1.0 / (rhoL + rhoDIV * phi[DIR_0PP]) - 1.0 / (rhoL + rhoDIV * phi[DIR_0MM]))))) +
 		+WEIGTH[DIR_0P0] * (1.0 / (rhoL + rhoDIV * phi[DIR_00P]) - 1.0 / (rhoL + rhoDIV * phi[DIR_00M])));
@@ -2851,6 +2864,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_rhoInv(LBM
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) + (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) + (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) + (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_PM0] - phi2[DIR_MP0]) + (phi2[DIR_PP0] - phi2[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_P00] - phi2[DIR_M00]));
@@ -2859,6 +2874,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX1_phi2()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PPM] - phi2[DIR_MMP]) - (phi2[DIR_PMP] - phi2[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_0PP] - phi2[DIR_0MM]) + (phi2[DIR_0PM] - phi2[DIR_0MP])) + ((phi2[DIR_PP0] - phi2[DIR_MM0]) - (phi2[DIR_PM0] - phi2[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_0P0] - phi2[DIR_0M0]));
@@ -2867,6 +2884,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX2_phi2()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) - (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) - (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_0MP] - phi2[DIR_0PM]) + (phi2[DIR_0PP] - phi2[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_00P] - phi2[DIR_00M]));
@@ -2875,6 +2894,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::gradX3_phi2()
 LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::nabla2_phi()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -2896,6 +2917,8 @@ LBMReal MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::nabla2_phi()
 void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::computePhasefield()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
 	int minX1 = ghostLayerWidth;
@@ -2954,6 +2977,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::findNeighbors(CbArra
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
@@ -2978,6 +3002,7 @@ void MultiphaseSimpleVelocityBaseExternalPressureLBMKernel::findNeighbors2(CbArr
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp
index db1397374..8f41edc77 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsCumulantLBMKernel.cpp
@@ -130,6 +130,7 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+	using namespace vf::lbm::dir;
 
     forcingX1 = 0.0;
     forcingX2 = 0.0;
@@ -2984,6 +2985,8 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::calculate(int step)
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX1_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -2997,6 +3000,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX1_phi()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -3010,6 +3015,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX2_phi()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX3_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -3023,6 +3030,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX3_phi()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) + (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) + (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) + (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_PM0] - phi2[DIR_MP0]) + (phi2[DIR_PP0] - phi2[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_P00] - phi2[DIR_M00]));
@@ -3036,6 +3045,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX1_phi2()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PPM] - phi2[DIR_MMP]) - (phi2[DIR_PMP] - phi2[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_0PP] - phi2[DIR_0MM]) + (phi2[DIR_0PM] - phi2[DIR_0MP])) + ((phi2[DIR_PP0] - phi2[DIR_MM0]) - (phi2[DIR_PM0] - phi2[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_0P0] - phi2[DIR_0M0]));
@@ -3049,6 +3060,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX2_phi2()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) - (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) - (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_0MP] - phi2[DIR_0PM]) + (phi2[DIR_0PP] - phi2[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_00P] - phi2[DIR_00M]));
@@ -3066,6 +3079,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::gradX3_phi2()
 LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -3088,6 +3103,8 @@ LBMReal MultiphaseTwoPhaseFieldsCumulantLBMKernel::nabla2_phi()
 void MultiphaseTwoPhaseFieldsCumulantLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
     int minX1 = ghostLayerWidth;
@@ -3145,9 +3162,10 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::computePhasefield()
 void MultiphaseTwoPhaseFieldsCumulantLBMKernel::findNeighbors(CbArray3D<LBMReal, IndexerX3X2X1>::CbArray3DPtr ph, int x1, int x2,
                                                 int x3)
 {
-    using namespace D3Q27System;
+	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
-    SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
+	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
     phi[DIR_000] = (*ph)(x1, x2, x3);
 
@@ -3166,6 +3184,7 @@ void MultiphaseTwoPhaseFieldsCumulantLBMKernel::findNeighbors2(CbArray3D<LBMReal
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
index 3baddc4fe..89a3b4fc1 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsPressureFilterLBMKernel.cpp
@@ -143,6 +143,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+	using namespace vf::lbm::dir;
 
     forcingX1 = 0.0;
     forcingX2 = 0.0;
@@ -3349,6 +3350,8 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::calculate(int step)
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -3362,6 +3365,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -3375,6 +3380,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -3388,6 +3395,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) + (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) + (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) + (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_PM0] - phi2[DIR_MP0]) + (phi2[DIR_PP0] - phi2[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_P00] - phi2[DIR_M00]));
@@ -3401,6 +3410,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX1_phi2()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PPM] - phi2[DIR_MMP]) - (phi2[DIR_PMP] - phi2[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_0PP] - phi2[DIR_0MM]) + (phi2[DIR_0PM] - phi2[DIR_0MP])) + ((phi2[DIR_PP0] - phi2[DIR_MM0]) - (phi2[DIR_PM0] - phi2[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_0P0] - phi2[DIR_0M0]));
@@ -3414,6 +3425,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX2_phi2()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) - (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) - (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_0MP] - phi2[DIR_0PM]) + (phi2[DIR_0PP] - phi2[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_00P] - phi2[DIR_00M]));
@@ -3431,6 +3444,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::gradX3_phi2()
 LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -3453,6 +3468,8 @@ LBMReal MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::nabla2_phi()
 void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
     int minX1 = ghostLayerWidth;
@@ -3511,6 +3528,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors(CbArray3D<LB
                                                 int x3)
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
     SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
@@ -3531,6 +3549,7 @@ void MultiphaseTwoPhaseFieldsPressureFilterLBMKernel::findNeighbors2(CbArray3D<L
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp
index ffed1483c..2ff3d70f8 100644
--- a/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel.cpp
@@ -132,6 +132,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::calculate(int step)
 {
     using namespace D3Q27System;
     using namespace UbMath;
+	using namespace vf::lbm::dir;
 
     forcingX1 = 0.0;
     forcingX2 = 0.0;
@@ -3281,6 +3282,8 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::calculate(int step)
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX1_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0* ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) + (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) + (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) + (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_PM0] - phi[DIR_MP0]) + (phi[DIR_PP0] - phi[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_P00] - phi[DIR_M00]));
@@ -3294,6 +3297,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX1_phi()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PPM] - phi[DIR_MMP])- (phi[DIR_PMP] - phi[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_0PP] - phi[DIR_0MM]) + (phi[DIR_0PM] - phi[DIR_0MP])) + ((phi[DIR_PP0] - phi[DIR_MM0])- (phi[DIR_PM0] - phi[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_0P0] - phi[DIR_0M0]));
@@ -3307,6 +3312,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX2_phi()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX3_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi[DIR_PPP] - phi[DIR_MMM]) - (phi[DIR_PMM] - phi[DIR_MPP])) + ((phi[DIR_PMP] - phi[DIR_MPM]) - (phi[DIR_PPM] - phi[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi[DIR_P0P] - phi[DIR_M0M]) - (phi[DIR_P0M] - phi[DIR_M0P])) + ((phi[DIR_0MP] - phi[DIR_0PM]) + (phi[DIR_0PP] - phi[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi[DIR_00P] - phi[DIR_00M]));
@@ -3320,6 +3327,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX3_phi()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX1_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) + (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) + (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) + (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_PM0] - phi2[DIR_MP0]) + (phi2[DIR_PP0] - phi2[DIR_MM0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_P00] - phi2[DIR_M00]));
@@ -3333,6 +3342,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX1_phi2()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX2_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PPM] - phi2[DIR_MMP]) - (phi2[DIR_PMP] - phi2[DIR_MPM])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_0PP] - phi2[DIR_0MM]) + (phi2[DIR_0PM] - phi2[DIR_0MP])) + ((phi2[DIR_PP0] - phi2[DIR_MM0]) - (phi2[DIR_PM0] - phi2[DIR_MP0])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_0P0] - phi2[DIR_0M0]));
@@ -3346,6 +3357,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX2_phi2()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX3_phi2()
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
 	return 3.0 * ((WEIGTH[DIR_PPP] * (((phi2[DIR_PPP] - phi2[DIR_MMM]) - (phi2[DIR_PMM] - phi2[DIR_MPP])) + ((phi2[DIR_PMP] - phi2[DIR_MPM]) - (phi2[DIR_PPM] - phi2[DIR_MMP])))
 		+ WEIGTH[DIR_PP0] * (((phi2[DIR_P0P] - phi2[DIR_M0M]) - (phi2[DIR_P0M] - phi2[DIR_M0P])) + ((phi2[DIR_0MP] - phi2[DIR_0PM]) + (phi2[DIR_0PP] - phi2[DIR_0MM])))) +
 		+WEIGTH[DIR_0P0] * (phi2[DIR_00P] - phi2[DIR_00M]));
@@ -3363,6 +3376,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::gradX3_phi2()
 LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::nabla2_phi()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     LBMReal sum = 0.0;
 	sum += WEIGTH[DIR_PPP] * ((((phi[DIR_PPP] - phi[DIR_000]) + (phi[DIR_MMM] - phi[DIR_000])) + ((phi[DIR_MMP] - phi[DIR_000]) + (phi[DIR_PPM] - phi[DIR_000])))
 		+ (((phi[DIR_MPP] - phi[DIR_000]) + (phi[DIR_PMM] - phi[DIR_000])) + ((phi[DIR_PMP] - phi[DIR_000]) + (phi[DIR_MPM] - phi[DIR_000]))));
@@ -3385,6 +3400,8 @@ LBMReal MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::nabla2_phi()
 void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::computePhasefield()
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
+
     SPtr<DistributionArray3D> distributionsH = dataSet->getHdistributions();
 
     int minX1 = ghostLayerWidth;
@@ -3443,6 +3460,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::findNeighbors(CbArray3D<
                                                 int x3)
 {
     using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
     SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
@@ -3463,6 +3481,7 @@ void MultiphaseTwoPhaseFieldsVelocityCumulantLBMKernel::findNeighbors2(CbArray3D
 	int x3)
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	SPtr<BCArray3D> bcArray = this->getBCProcessor()->getBCArray();
 
diff --git a/src/cpu/VirtualFluidsCore/LBM/RheologyInterpolationProcessor.cpp b/src/cpu/VirtualFluidsCore/LBM/RheologyInterpolationProcessor.cpp
index 09cd40c8e..20fe44a55 100644
--- a/src/cpu/VirtualFluidsCore/LBM/RheologyInterpolationProcessor.cpp
+++ b/src/cpu/VirtualFluidsCore/LBM/RheologyInterpolationProcessor.cpp
@@ -111,6 +111,7 @@ void RheologyInterpolationProcessor::interpolateFineToCoarse(D3Q27ICell& icellF,
 void RheologyInterpolationProcessor::calcMoments(const LBMReal* const f, LBMReal omegaInf, LBMReal& press, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3, LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    rho = 0.0;
    D3Q27System::calcIncompMacroscopicValues(f,rho,vx1,vx2,vx3);
@@ -124,7 +125,7 @@ void RheologyInterpolationProcessor::calcMoments(const LBMReal* const f, LBMReal
    kxy   = -3.*omega*((((f[DIR_MMP]+f[DIR_PPM])-(f[DIR_MPP]+f[DIR_PMM]))+((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_MPM]+f[DIR_PMP])))+((f[DIR_MM0]+f[DIR_PP0])-(f[DIR_MP0]+f[DIR_PM0]))-(vx1*vx2));// might not be optimal MG 25.2.13
    kyz   = -3.*omega*((((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_PMP]+f[DIR_MPM]))+((f[DIR_PMM]+f[DIR_MPP])-(f[DIR_MMP]+f[DIR_PPM])))+((f[DIR_0MM]+f[DIR_0PP])-(f[DIR_0MP]+f[DIR_0PM]))-(vx2*vx3));
    kxz   = -3.*omega*((((f[DIR_MPM]+f[DIR_PMP])-(f[DIR_MMP]+f[DIR_PPM]))+((f[DIR_MMM]+f[DIR_PPP])-(f[DIR_PMM]+f[DIR_MPP])))+((f[DIR_M0M]+f[DIR_P0P])-(f[DIR_M0P]+f[DIR_P0M]))-(vx1*vx3));
-   kxxMyy = -3./2.*omega*((((f[D3Q27System::DIR_M0M]+f[DIR_P0P])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_M0P]+f[DIR_P0M])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_0M0]+f[DIR_0P0]))-(vx1*vx1-vx2*vx2));
+   kxxMyy = -3./2.*omega*((((f[DIR_M0M]+f[DIR_P0P])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_M0P]+f[DIR_P0M])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_0M0]+f[DIR_0P0]))-(vx1*vx1-vx2*vx2));
    kxxMzz = -3./2.*omega*((((f[DIR_MP0]+f[DIR_PM0])-(f[DIR_0MM]+f[DIR_0PP]))+((f[DIR_MM0]+f[DIR_PP0])-(f[DIR_0MP]+f[DIR_0PM])))+((f[DIR_M00]+f[DIR_P00])-(f[DIR_00M]+f[DIR_00P]))-(vx1*vx1-vx3*vx3));
 }
 //////////////////////////////////////////////////////////////////////////
@@ -434,6 +435,7 @@ void RheologyInterpolationProcessor::calcInterpolatedCoefficiets_intern(const D3
 void RheologyInterpolationProcessor::calcInterpolatedNode(LBMReal* f, /*LBMReal omega,*/ LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal rho  = press ;
    LBMReal vx1  = a0 + 0.25*( xs*ax + ys*ay + zs*az) + 0.0625*(axx + xs*ys*axy + xs*zs*axz + ayy + ys*zs*ayz + azz) + 0.015625*(xs*ys*zs*axyz);
@@ -580,6 +582,7 @@ LBMReal RheologyInterpolationProcessor::calcPressBNE()
 void RheologyInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    LBMReal press  =  press_NET * (0.125 - 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
       press_NWT * (0.125 + 0.25 * xoff - 0.25 * yoff - 0.25 * zoff) +
diff --git a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp
index 0ba49c1a0..61bd67e15 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/InitDistributionsBlockVisitor.cpp
@@ -124,6 +124,7 @@ void InitDistributionsBlockVisitor::setRho(LBMReal rho)
 void InitDistributionsBlockVisitor::visit(const SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
    using namespace D3Q27System;
+   using namespace vf::lbm::dir;
 
    if(!block) UB_THROW( UbException(UB_EXARGS,"block is not exist") );
 
diff --git a/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp
index 7546aa307..57ae2a7d8 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/MetisPartitioningGridVisitor.cpp
@@ -110,6 +110,8 @@ void MetisPartitioningGridVisitor::distributePartitionData(SPtr<Grid3D> grid, Pa
 //////////////////////////////////////////////////////////////////////////
 void MetisPartitioningGridVisitor::buildMetisGraphLevelIntersected(SPtr<Grid3D> grid, int nofSegments, PartLevel level)
 {
+    using namespace vf::lbm::dir;
+
     int edges                       = 0;
     const int edgeWeight            = 1;
     const int edgeWeightChildFactor = 8;
@@ -133,7 +135,7 @@ void MetisPartitioningGridVisitor::buildMetisGraphLevelIntersected(SPtr<Grid3D>
             // the weights of the vertices are 2^level of grid (1, 2, 4, 8 .....) 1<<level
             metis.vwgt.push_back((idx_t)(1 << block->getLevel()));
 
-            for (int dir = D3Q27System::DIR_P00; dir <= numOfDirs; dir++) {
+            for (int dir = DIR_P00; dir <= numOfDirs; dir++) {
                 SPtr<Block3D> neighBlock = grid->getNeighborBlock(dir, block);
                 if (neighBlock) {
                     if (this->getPartitionCondition(neighBlock, level)) {
@@ -169,6 +171,8 @@ void MetisPartitioningGridVisitor::buildMetisGraphLevelIntersected(SPtr<Grid3D>
 //////////////////////////////////////////////////////////////////////////
 void MetisPartitioningGridVisitor::buildMetisGraphLevelBased(SPtr<Grid3D> grid, int nofSegments, PartLevel level)
 {
+    using namespace vf::lbm::dir;
+
     int minInitLevel = grid->getCoarsestInitializedLevel();
     int maxInitLevel = grid->getFinestInitializedLevel();
 
@@ -200,7 +204,7 @@ void MetisPartitioningGridVisitor::buildMetisGraphLevelBased(SPtr<Grid3D> grid,
             metis.xadj.push_back(edges);
             metis.vwgt.push_back(vertexWeight);
 
-            for (int dir = D3Q27System::DIR_P00; dir <= numOfDirs; dir++) {
+            for (int dir = DIR_P00; dir <= numOfDirs; dir++) {
                 SPtr<Block3D> neighBlock = grid->getNeighborBlock(dir, block);
                 if (neighBlock) {
                     if (this->getPartitionCondition(neighBlock, level)) {
@@ -256,6 +260,8 @@ void MetisPartitioningGridVisitor::clear()
 int MetisPartitioningGridVisitor::getEdgeWeight(int dir)
 {
     using namespace D3Q27System;
+    using namespace vf::lbm::dir;
+
     if (dir <= DIR_00M) {
         return 100;
     } else if (dir >= DIR_PP0 && dir <= DIR_0MP) {
diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp
index a35fc289b..2a407d17f 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseInitDistributionsBlockVisitor.cpp
@@ -151,6 +151,7 @@ void MultiphaseInitDistributionsBlockVisitor::setPhi( LBMReal phi )
 void MultiphaseInitDistributionsBlockVisitor::visit(const SPtr<Grid3D> grid, SPtr<Block3D> block) 
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	if(!block) UB_THROW( UbException(UB_EXARGS,"block is not exist") );
 
diff --git a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp
index 28b035f71..0a501e8e0 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/MultiphaseVelocityFormInitDistributionsBlockVisitor.cpp
@@ -154,6 +154,7 @@ void MultiphaseVelocityFormInitDistributionsBlockVisitor::setPhi( LBMReal phi )
 void MultiphaseVelocityFormInitDistributionsBlockVisitor::visit(const SPtr<Grid3D> grid, SPtr<Block3D> block) 
 {
 	using namespace D3Q27System;
+	using namespace vf::lbm::dir;
 
 	if(!block) UB_THROW( UbException(UB_EXARGS,"block is not exist") );
 
diff --git a/src/cpu/VirtualFluidsCore/Visitors/RefineAroundGbObjectHelper.cpp b/src/cpu/VirtualFluidsCore/Visitors/RefineAroundGbObjectHelper.cpp
index b0b0cf774..c1645afeb 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/RefineAroundGbObjectHelper.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/RefineAroundGbObjectHelper.cpp
@@ -21,6 +21,8 @@ RefineAroundGbObjectHelper::~RefineAroundGbObjectHelper(void) = default;
 //////////////////////////////////////////////////////////////////////////
 void RefineAroundGbObjectHelper::refine()
 {
+    using namespace vf::lbm::dir;
+
     UBLOG(logDEBUG5, "RefineCrossAndInsideGbObjectHelper: refine - start");
 
     int rank = grid->getRank();
@@ -38,7 +40,7 @@ void RefineAroundGbObjectHelper::refine()
     grid->accept(overlapVisitor);
 
     std::vector<int> dirs;
-    for (int i = D3Q27System::DIR_P00; i <= D3Q27System::DIR_0MP; i++) {
+    for (int i = DIR_P00; i <= DIR_0MP; i++) {
         dirs.push_back(i);
     }
     SetInterpolationDirsBlockVisitor interDirsVisitor(dirs);
diff --git a/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectHelper.cpp b/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectHelper.cpp
index 3bb154689..52c7c3ac1 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectHelper.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/RefineCrossAndInsideGbObjectHelper.cpp
@@ -55,7 +55,7 @@ void RefineCrossAndInsideGbObjectHelper::refine()
 
     std::vector<int> dirs;
 
-    for (int i = D3Q27System::STARTDIR; i <= D3Q27System::ENDDIR; i++) {
+    for (int i = D3Q27System::FSTARTDIR; i <= D3Q27System::FENDDIR; i++) {
         dirs.push_back(i);
     }
     SetInterpolationDirsBlockVisitor interDirsVisitor(dirs);
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
index 793021945..7ec44a380 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.h
@@ -104,6 +104,8 @@ void SetConnectorsBlockVisitor<T1, T2>::visit(SPtr<Grid3D> grid, SPtr<Block3D> b
 template <class T1, class T2>
 void SetConnectorsBlockVisitor<T1, T2>::setSameLevelConnectors(SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
+    using namespace vf::lbm::dir;
+
     UBLOG(logDEBUG5, "SetConnectorsBlockVisitor::setSameLevelConnectors() - start");
     int blockRank = block->getRank();
     if (gridRank == blockRank && block->isActive()) {
@@ -114,7 +116,7 @@ void SetConnectorsBlockVisitor<T1, T2>::setSameLevelConnectors(SPtr<Grid3D> grid
         int ix3   = block->getX3();
         int level = block->getLevel();
 
-        for (int dir = D3Q27System::STARTDIR; dir <= D3Q27System::ENDDIR; dir++) {
+        for (int dir = D3Q27System::FSTARTDIR; dir <= D3Q27System::FENDDIR; dir++) { 
             SPtr<Block3D> neighBlock = grid->getNeighborBlock(dir, ix1, ix2, ix3, level);
 
             if (neighBlock) {
@@ -126,7 +128,7 @@ void SetConnectorsBlockVisitor<T1, T2>::setSameLevelConnectors(SPtr<Grid3D> grid
                 } else if (blockRank != neighBlockRank && neighBlock->isActive()) {
                     setRemoteConnectors(block, neighBlock, dir);
 
-                    if (dir >= D3Q27System::DIR_P00 && dir <= D3Q27System::DIR_00M) {
+                    if (dir >= DIR_P00 && dir <= DIR_00M) {
                         int weight = block->getWeight(neighBlockRank);
                         weight++;
                         block->setWeight(neighBlockRank, weight);
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationConnectorsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationConnectorsBlockVisitor.cpp
index 54f46c811..e4558f5c4 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationConnectorsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationConnectorsBlockVisitor.cpp
@@ -72,6 +72,8 @@ void SetInterpolationConnectorsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block
 //////////////////////////////////////////////////////////////////////////
 void SetInterpolationConnectorsBlockVisitor::setInterpolationConnectors(SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
+	using namespace vf::lbm::dir;
+
    UBLOG(logDEBUG5, "SetInterpolationConnectorsBlockVisitor::setInterpolationConnectors() - start");
 
 	//search for all blocks with different ranks
@@ -82,251 +84,251 @@ void SetInterpolationConnectorsBlockVisitor::setInterpolationConnectors(SPtr<Gri
 		int fbx3 = block->getX3() << 1;
 		int level = block->getLevel() + 1;
 
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_P00))
+		if( block->hasInterpolationFlagCF(DIR_P00))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1+1,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_P00);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_P00);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_M00))
+		if( block->hasInterpolationFlagCF(DIR_M00))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1,fbx2+1,fbx3+1,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_M00);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_M00);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0P0))
+		if( block->hasInterpolationFlagCF(DIR_0P0))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1,fbx2+1,fbx3+1,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0P0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0P0);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+		if( block->hasInterpolationFlagCF(DIR_0M0))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1+1,fbx2,fbx3+1,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0M0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0M0);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_00P))
+		if( block->hasInterpolationFlagCF(DIR_00P))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1,fbx2+1,fbx3+1,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_00P);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_00P);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_00M))
+		if( block->hasInterpolationFlagCF(DIR_00M))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockNW = grid->getBlock(fbx1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockNE = grid->getBlock(fbx1+1,fbx2+1,fbx3,level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_00M);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_00M);
 		}
 
 		//////NE-NW-SE-SW
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_PP0)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_P00))
+		if( block->hasInterpolationFlagCF(DIR_PP0)&&!block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_P00))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1,fbx2+1,fbx3+0,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PP0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PP0);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_MM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+		if( block->hasInterpolationFlagCF(DIR_MM0)&& !block->hasInterpolationFlagCF(DIR_M00) && !block->hasInterpolationFlagCF(DIR_0M0))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1,fbx2,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MM0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MM0);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_PM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+		if( block->hasInterpolationFlagCF(DIR_PM0)&& !block->hasInterpolationFlagCF(DIR_P00) && !block->hasInterpolationFlagCF(DIR_0M0))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1,fbx2,fbx3+0,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PM0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PM0);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_MP0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_M00))
+		if( block->hasInterpolationFlagCF(DIR_MP0)&& !block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_M00))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1,fbx2+1,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MP0);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MP0);
 		}
 
 		/////////TE-BW-BE-TW 1-0
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_P0P)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00P))
+		if( block->hasInterpolationFlagCF(DIR_P0P)&& !block->hasInterpolationFlagCF(DIR_P00) && !block->hasInterpolationFlagCF(DIR_00P))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1,fbx2+0,fbx3+1,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+0, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+0, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_P0P);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_P0P);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_M0M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00M))
+		if( block->hasInterpolationFlagCF(DIR_M0M)&& !block->hasInterpolationFlagCF(DIR_M00) && !block->hasInterpolationFlagCF(DIR_00M))
 		{
 
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2+0,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1,fbx2+1,fbx3,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+0, fbx3, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+0, fbx3, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_M0M);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_M0M);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_P0M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00M))
+		if( block->hasInterpolationFlagCF(DIR_P0M)&& !block->hasInterpolationFlagCF(DIR_P00) && !block->hasInterpolationFlagCF(DIR_00M))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1,fbx2+0,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+0, fbx3, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+0, fbx3, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_P0M);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_P0M);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_M0P)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00P))
+		if( block->hasInterpolationFlagCF(DIR_M0P)&& !block->hasInterpolationFlagCF(DIR_M00) && !block->hasInterpolationFlagCF(DIR_00P))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1,fbx2+0,fbx3+1,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1,fbx2+1,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+0, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+0, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_M0P);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_M0P);
 		}
 
 		//////TN-BS-BN-TS
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0PP)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00P))
+		if( block->hasInterpolationFlagCF(DIR_0PP)&& !block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_00P))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+0,fbx2+1,fbx3+1,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2+1, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2+1, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0PP);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0PP);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0MM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00M))
+		if( block->hasInterpolationFlagCF(DIR_0MM)&& !block->hasInterpolationFlagCF(DIR_0M0) && !block->hasInterpolationFlagCF(DIR_00M))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+0,fbx2,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2, fbx3, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2, fbx3, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0MM);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0MM);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0PM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00M))
+		if( block->hasInterpolationFlagCF(DIR_0PM)&& !block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_00M))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+0,fbx2+1,fbx3,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2+1,fbx3,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2+1, fbx3, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2+1, fbx3, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0PM);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0PM);
 		}
-		if( block->hasInterpolationFlagCF(D3Q27System::DIR_0MP)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_00P))
+		if( block->hasInterpolationFlagCF(DIR_0MP)&& !block->hasInterpolationFlagCF(DIR_0M0) && !block->hasInterpolationFlagCF(DIR_00P))
 		{
 			SPtr<Block3D> fblockSW = grid->getBlock(fbx1+0,fbx2,fbx3+1,level);
 			SPtr<Block3D> fblockSE = grid->getBlock(fbx1+1,fbx2,fbx3+1,level);
-         SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2, fbx3+1, level);
-         SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+0, fbx2, fbx3+1, level);
+			SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
 
-			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_0MP);
+			setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_0MP);
 		}
 
 
 
 
       //////corners
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_PPP)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_P0P)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0PP)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_PP0)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_00P)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_P00))
+      if (block->hasInterpolationFlagCF(DIR_PPP)&&!block->hasInterpolationFlagCF(DIR_P0P)&&!block->hasInterpolationFlagCF(DIR_0PP)&&!block->hasInterpolationFlagCF(DIR_PP0)&&!block->hasInterpolationFlagCF(DIR_00P)&&!block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_P00))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+0, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PPP);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PPP);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_MMP)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_M0P)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0MP)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_MM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00P)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+      if (block->hasInterpolationFlagCF(DIR_MMP)&&!block->hasInterpolationFlagCF(DIR_M0P)&&!block->hasInterpolationFlagCF(DIR_0MP)&& !block->hasInterpolationFlagCF(DIR_MM0)&& !block->hasInterpolationFlagCF(DIR_00P)&& !block->hasInterpolationFlagCF(DIR_M00) && !block->hasInterpolationFlagCF(DIR_0M0))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1, fbx2, fbx3, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MMP);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MMP);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_PMP)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_P0P)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0MP)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_PM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00P)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+      if (block->hasInterpolationFlagCF(DIR_PMP)&&!block->hasInterpolationFlagCF(DIR_P0P)&&!block->hasInterpolationFlagCF(DIR_0MP)&& !block->hasInterpolationFlagCF(DIR_PM0)&& !block->hasInterpolationFlagCF(DIR_00P)&& !block->hasInterpolationFlagCF(DIR_P00) && !block->hasInterpolationFlagCF(DIR_0M0))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1+1, fbx2, fbx3+0, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PMP);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PMP);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_MPP)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_M0P)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0PP)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_MP0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00P)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_M00))
+      if (block->hasInterpolationFlagCF(DIR_MPP)&&!block->hasInterpolationFlagCF(DIR_M0P)&&!block->hasInterpolationFlagCF(DIR_0PP)&& !block->hasInterpolationFlagCF(DIR_MP0)&& !block->hasInterpolationFlagCF(DIR_00P)&& !block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_M00))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1, fbx2+1, fbx3, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MPP);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MPP);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_PPM)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_P0M)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0PM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_PP0)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_00M)&&!block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_P00))
+      if (block->hasInterpolationFlagCF(DIR_PPM)&&!block->hasInterpolationFlagCF(DIR_P0M)&&!block->hasInterpolationFlagCF(DIR_0PM)&& !block->hasInterpolationFlagCF(DIR_PP0)&&!block->hasInterpolationFlagCF(DIR_00M)&&!block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_P00))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1, fbx2+1, fbx3+0, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+0, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2+1, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PPM);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PPM);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_MMM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0MM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M0M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_MM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+      if (block->hasInterpolationFlagCF(DIR_MMM)&& !block->hasInterpolationFlagCF(DIR_0MM)&& !block->hasInterpolationFlagCF(DIR_M0M)&& !block->hasInterpolationFlagCF(DIR_MM0)&& !block->hasInterpolationFlagCF(DIR_00M)&& !block->hasInterpolationFlagCF(DIR_M00) && !block->hasInterpolationFlagCF(DIR_0M0))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1, fbx2, fbx3+0, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1, fbx2, fbx3, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MMM);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MMM);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_PMM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0MM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P0M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_PM0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_P00) && !block->hasInterpolationFlagCF(D3Q27System::DIR_0M0))
+      if (block->hasInterpolationFlagCF(DIR_PMM)&& !block->hasInterpolationFlagCF(DIR_0MM)&& !block->hasInterpolationFlagCF(DIR_P0M)&& !block->hasInterpolationFlagCF(DIR_PM0)&& !block->hasInterpolationFlagCF(DIR_00M)&& !block->hasInterpolationFlagCF(DIR_P00) && !block->hasInterpolationFlagCF(DIR_0M0))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1+1, fbx2, fbx3, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1+1, fbx2, fbx3+0, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1+1, fbx2, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_PMM);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_PMM);
       }
-      if (block->hasInterpolationFlagCF(D3Q27System::DIR_MPM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0PM)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_M0M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_MP0)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_00M)&& !block->hasInterpolationFlagCF(D3Q27System::DIR_0P0) && !block->hasInterpolationFlagCF(D3Q27System::DIR_M00))
+      if (block->hasInterpolationFlagCF(DIR_MPM)&& !block->hasInterpolationFlagCF(DIR_0PM)&& !block->hasInterpolationFlagCF(DIR_M0M)&& !block->hasInterpolationFlagCF(DIR_MP0)&& !block->hasInterpolationFlagCF(DIR_00M)&& !block->hasInterpolationFlagCF(DIR_0P0) && !block->hasInterpolationFlagCF(DIR_M00))
       {
          SPtr<Block3D> fblockSW = grid->getBlock(fbx1, fbx2+1, fbx3+0, level);
          SPtr<Block3D> fblockSE;// = grid->getBlock(fbx1, fbx2+1, fbx3, level);
          SPtr<Block3D> fblockNW;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
          SPtr<Block3D> fblockNE;// = grid->getBlock(fbx1, fbx2+1, fbx3+1, level);
 
-         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, D3Q27System::DIR_MPM);
+         setInterpolationConnectors(fblockSW, fblockSE, fblockNW, fblockNE, block, DIR_MPM);
       }
 
 	}
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
index 689d84d07..dbb85c0b8 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
@@ -11,6 +11,8 @@ SetInterpolationDirsBlockVisitor::SetInterpolationDirsBlockVisitor(std::vector<i
 //////////////////////////////////////////////////////////////////////////
 void SetInterpolationDirsBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
+    using namespace vf::lbm::dir;
+
     int ix1, ix2, ix3, level;
     ix1   = block->getX1();
     ix2   = block->getX2();
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp
index 3b9eb9493..12e287f3f 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetUndefinedNodesBlockVisitor.cpp
@@ -15,6 +15,8 @@ SetUndefinedNodesBlockVisitor::SetUndefinedNodesBlockVisitor(bool twoTypeOfConne
 //////////////////////////////////////////////////////////////////////////
 void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
+    using namespace vf::lbm::dir;
+
     if (!block->hasInterpolationFlag())
         return;
 
@@ -40,7 +42,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
     // int offset = 2;
     int offset = 3;
 
-    if (block->hasInterpolationFlag(D3Q27System::DIR_P00)) {
+    if (block->hasInterpolationFlag(DIR_P00)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -51,7 +53,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_M00)) {
+    if (block->hasInterpolationFlag(DIR_M00)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -62,7 +64,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0P0)) {
+    if (block->hasInterpolationFlag(DIR_0P0)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2;
@@ -73,7 +75,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0M0)) {
+    if (block->hasInterpolationFlag(DIR_0M0)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -84,7 +86,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_00P)) {
+    if (block->hasInterpolationFlag(DIR_00P)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -95,7 +97,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_00M)) {
+    if (block->hasInterpolationFlag(DIR_00M)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -106,7 +108,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PP0)) {
+    if (block->hasInterpolationFlag(DIR_PP0)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -119,7 +121,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MM0)) {
+    if (block->hasInterpolationFlag(DIR_MM0)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -132,7 +134,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PM0)) {
+    if (block->hasInterpolationFlag(DIR_PM0)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -145,7 +147,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MP0)) {
+    if (block->hasInterpolationFlag(DIR_MP0)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -158,7 +160,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_P0P)) {
+    if (block->hasInterpolationFlag(DIR_P0P)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -171,7 +173,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_M0M)) {
+    if (block->hasInterpolationFlag(DIR_M0M)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -184,7 +186,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_P0M)) {
+    if (block->hasInterpolationFlag(DIR_P0M)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -197,7 +199,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_M0P)) {
+    if (block->hasInterpolationFlag(DIR_M0P)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -210,7 +212,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0PP)) {
+    if (block->hasInterpolationFlag(DIR_0PP)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2;
@@ -223,7 +225,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0MM)) {
+    if (block->hasInterpolationFlag(DIR_0MM)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -236,7 +238,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0PM)) {
+    if (block->hasInterpolationFlag(DIR_0PM)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2;
@@ -249,7 +251,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_0MP)) {
+    if (block->hasInterpolationFlag(DIR_0MP)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -262,7 +264,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PPP)) {
+    if (block->hasInterpolationFlag(DIR_PPP)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -277,7 +279,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MPP)) {
+    if (block->hasInterpolationFlag(DIR_MPP)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -292,7 +294,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PMP)) {
+    if (block->hasInterpolationFlag(DIR_PMP)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -307,7 +309,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MMP)) {
+    if (block->hasInterpolationFlag(DIR_MMP)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -322,7 +324,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             startix3 = startix3 - offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PPM)) {
+    if (block->hasInterpolationFlag(DIR_PPM)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -337,7 +339,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MPM)) {
+    if (block->hasInterpolationFlag(DIR_MPM)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -352,7 +354,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_PMM)) {
+    if (block->hasInterpolationFlag(DIR_PMM)) {
         int startix1 = maxX1;
         int endix1   = maxX1;
         if (block->hasInterpolationFlagCF())
@@ -367,7 +369,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
             endix3 = endix3 + offset;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlag(D3Q27System::DIR_MMM)) {
+    if (block->hasInterpolationFlag(DIR_MMM)) {
         int startix1 = minX1;
         int endix1   = minX1;
         if (block->hasInterpolationFlagCF())
@@ -395,7 +397,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
     maxX2 = static_cast<int>(bcMatrix->getNX2()) - 1 - ll;
     maxX3 = static_cast<int>(bcMatrix->getNX3()) - 1 - ll;
 
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_P00)) {
+    if (block->hasInterpolationFlagFC(DIR_P00)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -404,7 +406,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_M00)) {
+    if (block->hasInterpolationFlagFC(DIR_M00)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -413,7 +415,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0P0)) {
+    if (block->hasInterpolationFlagFC(DIR_0P0)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -422,7 +424,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0M0)) {
+    if (block->hasInterpolationFlagFC(DIR_0M0)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -431,7 +433,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_00P)) {
+    if (block->hasInterpolationFlagFC(DIR_00P)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -440,7 +442,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_00M)) {
+    if (block->hasInterpolationFlagFC(DIR_00M)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -449,7 +451,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PP0)) {
+    if (block->hasInterpolationFlagFC(DIR_PP0)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -458,7 +460,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MM0)) {
+    if (block->hasInterpolationFlagFC(DIR_MM0)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -467,7 +469,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PM0)) {
+    if (block->hasInterpolationFlagFC(DIR_PM0)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -476,7 +478,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MP0)) {
+    if (block->hasInterpolationFlagFC(DIR_MP0)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = maxX2 - offset2;
@@ -485,7 +487,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_P0P)) {
+    if (block->hasInterpolationFlagFC(DIR_P0P)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -494,7 +496,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_M0M)) {
+    if (block->hasInterpolationFlagFC(DIR_M0M)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -503,7 +505,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_P0M)) {
+    if (block->hasInterpolationFlagFC(DIR_P0M)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -512,7 +514,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_M0P)) {
+    if (block->hasInterpolationFlagFC(DIR_M0P)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -521,7 +523,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0PP)) {
+    if (block->hasInterpolationFlagFC(DIR_0PP)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -530,7 +532,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0MM)) {
+    if (block->hasInterpolationFlagFC(DIR_0MM)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -539,7 +541,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0PM)) {
+    if (block->hasInterpolationFlagFC(DIR_0PM)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -548,7 +550,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_0MP)) {
+    if (block->hasInterpolationFlagFC(DIR_0MP)) {
         int startix1 = minX1;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -557,7 +559,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PPP)) {
+    if (block->hasInterpolationFlagFC(DIR_PPP)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -566,7 +568,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MPP)) {
+    if (block->hasInterpolationFlagFC(DIR_MPP)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = maxX2 - offset2;
@@ -575,7 +577,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PMP)) {
+    if (block->hasInterpolationFlagFC(DIR_PMP)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -584,7 +586,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MMP)) {
+    if (block->hasInterpolationFlagFC(DIR_MMP)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -593,7 +595,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = maxX3;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PPM)) {
+    if (block->hasInterpolationFlagFC(DIR_PPM)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = maxX2 - offset2;
@@ -602,7 +604,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MPM)) {
+    if (block->hasInterpolationFlagFC(DIR_MPM)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = maxX2 - offset2;
@@ -611,7 +613,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_PMM)) {
+    if (block->hasInterpolationFlagFC(DIR_PMM)) {
         int startix1 = maxX1 - offset2;
         int endix1   = maxX1;
         int startix2 = minX2;
@@ -620,7 +622,7 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
         int endix3   = minX3 + offset2;
         this->setNodesUndefined(startix1, endix1, startix2, endix2, startix3, endix3, bcMatrix);
     }
-    if (block->hasInterpolationFlagFC(D3Q27System::DIR_MMM)) {
+    if (block->hasInterpolationFlagFC(DIR_MMM)) {
         int startix1 = minX1;
         int endix1   = minX1 + offset2;
         int startix2 = minX2;
@@ -633,10 +635,10 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
     // invert scaleCF blocks
     if (block->hasInterpolationFlagCF()) {
         if (block->hasInterpolationFlagFC() && twoTypeOfConnectorsCheck) {
-            for (int i = D3Q27System::DIR_P00; i <= D3Q27System::DIR_MMM; i++) {
+            for (int i = DIR_P00; i <= DIR_MMM; i++) {
                 UBLOG(logINFO, "FC in dir=" << i << " " << block->hasInterpolationFlagFC(i));
             }
-            for (int i = D3Q27System::DIR_P00; i <= D3Q27System::DIR_MMM; i++) {
+            for (int i = DIR_P00; i <= DIR_MMM; i++) {
                 UBLOG(logINFO, "CF in dir=" << i << " " << block->hasInterpolationFlagCF(i));
             }
             throw UbException(UB_EXARGS, "block " + block->toString() + " has CF and FC");
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp
index 1ef34e0e8..95594b892 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp
@@ -23,6 +23,8 @@ SpongeLayerBlockVisitor::~SpongeLayerBlockVisitor() = default;
 //////////////////////////////////////////////////////////////////////////
 void SpongeLayerBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
 {
+    using namespace vf::lbm::dir;
+
     if (!boundingBox) {
         UB_THROW(UbException(UB_EXARGS, "The bounding box isn't set!"));
     }
@@ -72,22 +74,22 @@ void SpongeLayerBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
 
             double newCollFactor;
 
-            if (dir == D3Q27System::DIR_P00) {
+            if (dir == DIR_P00) {
                 int ibX1      = block->getX1();
                 int ibMax     = val<1>(ixMax) - val<1>(ixMin) + 1;
                 double index  = (double)(ibX1 - val<1>(ixMin) + 1);
                 newCollFactor = oldCollFactor - (oldCollFactor - 1.0) / (double)(ibMax)*index;
-            } else if (dir == D3Q27System::DIR_M00) {
+            } else if (dir == DIR_M00) {
                 int ibX1      = block->getX1();
                 int ibMax     = val<1>(ixMax) - val<1>(ixMin) + 1;
                 double index  = (double)(ibX1 - val<1>(ixMin) + 1);
                 newCollFactor = (oldCollFactor - 1.0) / (double)(ibMax)*index;
-            } else if (dir == D3Q27System::DIR_00P) {
+            } else if (dir == DIR_00P) {
                 int ibX3      = block->getX3();
                 int ibMax     = val<3>(ixMax) - val<3>(ixMin) + 1;
                 double index  = (double)(ibX3 - val<3>(ixMin) + 1);
                 newCollFactor = oldCollFactor - (oldCollFactor - 1.0) / (double)(ibMax)*index;
-            } else if (dir == D3Q27System::DIR_00M) {
+            } else if (dir == DIR_00M) {
                 int ibX3      = block->getX3();
                 int ibMax     = val<3>(ixMax) - val<3>(ixMin) + 1;
                 double index  = (double)(ibX3 - val<3>(ixMin) + 1);
-- 
GitLab