diff --git a/source/Applications/BoxBenchmark/bb.cfg b/source/Applications/BoxBenchmark/bb.cfg
index d1054652a106bb1441e7306f082e63094df50f5c..d81b5fa13569f5930ad6abe6925e07cbd718571d 100644
--- a/source/Applications/BoxBenchmark/bb.cfg
+++ b/source/Applications/BoxBenchmark/bb.cfg
@@ -3,8 +3,8 @@ numOfThreads = 1
 availMem = 11e9
 
 #Grid
-length =  128 128 128 
-blocknx = 32 32 32
+length =  32 32 32 
+blocknx = 8 8 8
 
 dx = 1
 refineLevel = 0
diff --git a/source/Applications/BoxBenchmark/bb.cpp b/source/Applications/BoxBenchmark/bb.cpp
index bfffec0c61d244a34c0b4a8ef2ebedff5a5784ba..055e63577bfccccb4ee94b149d1f8841f90d84c6 100644
--- a/source/Applications/BoxBenchmark/bb.cpp
+++ b/source/Applications/BoxBenchmark/bb.cpp
@@ -204,7 +204,7 @@ void run(string configname)
       }
 
       UbSchedulerPtr visSch(new UbScheduler(outTime));
-      //MacroscopicQuantitiesCoProcessor pp(grid, visSch, pathname, WbWriterVtkXmlASCII::getInstance(), conv);
+      MacroscopicQuantitiesCoProcessor pp(grid, visSch, pathname, WbWriterVtkXmlASCII::getInstance(), conv);
 
       UbSchedulerPtr nupsSch(new UbScheduler(10, 30, 100));
       NUPSCounterCoProcessor npr(grid, nupsSch, numOfThreads, comm);
diff --git a/source/Applications/FNG/Bombadil.cfg b/source/Applications/FNG/Bombadil.cfg
index 339987f539a43a91395c1c0b2fb30728b47b8e90..0196e80f4e12cffd18d4b6d4524d148d6a7acd0a 100644
--- a/source/Applications/FNG/Bombadil.cfg
+++ b/source/Applications/FNG/Bombadil.cfg
@@ -22,4 +22,6 @@ endTime = 1000
 
 logToFile = false
 
-porousTralingEdge = true
\ No newline at end of file
+porousTralingEdge = false
+
+thinWall = false
\ No newline at end of file
diff --git a/source/Applications/FNG/fng.cpp b/source/Applications/FNG/fng.cpp
index e9ffd2b2be23f2d48ed8026f7b31d9c8872118aa..0f683374477e8e85f2d8e99521a42b8a87b57c2c 100644
--- a/source/Applications/FNG/fng.cpp
+++ b/source/Applications/FNG/fng.cpp
@@ -20,9 +20,10 @@ void run(string configname)
       string          fngFileWhole = config.getString("fngFileWhole");
       string          fngFileTrailingEdge = config.getString("fngFileTrailingEdge");
       string          fngFileBodyPart = config.getString("fngFileBodyPart");
+      string          zigZagTape = config.getString("zigZagTape");
       int             numOfThreads = config.getInt("numOfThreads");
       vector<int>     blockNx = config.getVector<int>("blockNx");
-      vector<int>     boundingBox = config.getVector<int>("boundingBox");
+      vector<double>  boundingBox = config.getVector<double>("boundingBox");
       double          uLB = config.getDouble("uLB");
       double          restartStep = config.getDouble("restartStep");
       double          restartStepStart = config.getDouble("restartStepStart");
@@ -32,7 +33,9 @@ void run(string configname)
       int             refineLevel = config.getInt("refineLevel");
       bool            logToFile = config.getBool("logToFile");
       bool            porousTralingEdge = config.getBool("porousTralingEdge");
-      double          deltaXfine = config.getDouble("deltaXfine");
+      double          deltaXfine = config.getDouble("deltaXfine")*1000.0;
+      bool            thinWall = config.getBool("thinWall");
+      double          refineDistance = config.getDouble("refineDistance");
 
       CommunicatorPtr comm = MPICommunicator::getInstance();
       int myid = comm->getProcessID();
@@ -55,44 +58,22 @@ void run(string configname)
          }
       }
 
-      GbTriFaceMesh3DPtr fngMeshWhole;
-      GbTriFaceMesh3DPtr fngMeshBodyPart;
-      GbTriFaceMesh3DPtr fngMeshTrailingEdge;
-      if (porousTralingEdge)
-      {
-         if (myid == 0) UBLOG(logINFO, "Read fngFileBodyPart:start");
-         fngMeshBodyPart = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo + "/" + fngFileBodyPart, "fngMeshBody", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
-         if (myid == 0) UBLOG(logINFO, "Read fngFileBodyPart:end");
-         if (myid == 0) GbSystem3D::writeGeoObject(fngMeshBodyPart.get(), pathOut + "/geo/fngMeshBody", WbWriterVtkXmlBinary::getInstance());
-
-         if (myid == 0) UBLOG(logINFO, "Read fngFileTrailingEdge:start");
-         fngMeshTrailingEdge = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo + "/" + fngFileTrailingEdge, "fngMeshTrailingEdge", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
-         if (myid == 0) UBLOG(logINFO, "Read fngFileTrailingEdge:end");
-         if (myid == 0) GbSystem3D::writeGeoObject(fngMeshTrailingEdge.get(), pathOut + "/geo/fngMeshTrailingEdge", WbWriterVtkXmlBinary::getInstance());
-      }
-      else
-      {
-         if (myid == 0) UBLOG(logINFO, "Read fngFileWhole:start");
-         fngMeshWhole = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo + "/" + fngFileWhole, "fngMeshWhole", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
-         if (myid == 0) UBLOG(logINFO, "Read fngFileWhole:end");
-         if (myid == 0) GbSystem3D::writeGeoObject(fngMeshWhole.get(), pathOut + "/geo/fngMeshWhole", WbWriterVtkXmlBinary::getInstance());
-      }
       
-      double g_minX1 = boundingBox[0];
-      double g_minX2 = boundingBox[2];
-      double g_minX3 = boundingBox[4];
-
-      double g_maxX1 = boundingBox[1];
-      double g_maxX2 = boundingBox[3];
-      double g_maxX3 = boundingBox[5];
-
+      double g_minX1 = boundingBox[0]*1000.0;
+      double g_minX2 = boundingBox[2]*1000.0;
+      double g_minX3 = boundingBox[4]*1000.0;
+
+      double g_maxX1 = boundingBox[1]*1000.0;
+      double g_maxX2 = boundingBox[3]*1000.0;
+      double g_maxX3 = boundingBox[5]*1000.0;
+       
       //////////////////////////////////////////////////////////////////////////
       double deltaXcoarse = deltaXfine*(double)(1 << refineLevel);
-      double nx1_temp = floor((g_maxX1 - g_minX1) / (deltaXcoarse*(double)blockNx[0]));
-
-      deltaXcoarse = (g_maxX1 - g_minX1) / (nx1_temp*(double)blockNx[0]);
+      //double nx2_temp = floor((g_maxX2 - g_minX2) / (deltaXcoarse*(double)blockNx[0]));
 
-      g_maxX1 -= 0.5* deltaXcoarse;
+      //deltaXcoarse = (g_maxX2 - g_minX2) / (nx2_temp*(double)blockNx[0]);
+      //UBLOG(logINFO, "nx2_temp:"<<nx2_temp);
+      //g_maxX2 -= 0.5* deltaXcoarse;
       //////////////////////////////////////////////////////////////////////////
       double blockLength = (double)blockNx[0] * deltaXcoarse;
 
@@ -118,8 +99,9 @@ void run(string configname)
 
       //double u_LB = uReal   * unitConverter.getFactorVelocityWToLb();
       //double nu_LB = nueReal * unitConverter.getFactorViscosityWToLb();
-      double l_LB = 0.3 / deltaXcoarse;
+      double l_LB = 300 / deltaXcoarse;
       double nuLB = (uLB*l_LB) / Re; //0.005;
+      //double nuLB = 0.005;
 
       LBMUnitConverterPtr conv = LBMUnitConverterPtr(new LBMUnitConverter());
 
@@ -138,8 +120,9 @@ void run(string configname)
       GenBlocksGridVisitor genBlocks(gridCube);
       grid->accept(genBlocks);
 
+      grid->setPeriodicX1(false);
       grid->setPeriodicX2(true);
-      grid->setPeriodicX3(true);
+      grid->setPeriodicX3(false);
 
       //////////////////////////////////////////////////////////////////////////
       //restart
@@ -159,22 +142,68 @@ void run(string configname)
             UBLOG(logINFO, "* nuReal        =" << nueReal);
             UBLOG(logINFO, "* nuLB          =" << nuLB);
             UBLOG(logINFO, "* velocity      =" << uLB);
-            UBLOG(logINFO, "* dx_base       =" << deltaXcoarse);
-            UBLOG(logINFO, "* dx_refine     =" << deltaXfine);
+            UBLOG(logINFO, "* dx_base       =" << deltaXcoarse/1000.0 << "m");
+            UBLOG(logINFO, "* dx_refine     =" << deltaXfine/1000.0 << "m");
 
             UBLOG(logINFO, "number of levels = " << refineLevel + 1);
             UBLOG(logINFO, "numOfThreads     = " << numOfThreads);
             UBLOG(logINFO, "Preprozess - start");
          }
 
+         GbTriFaceMesh3DPtr fngMeshWhole;
+         GbTriFaceMesh3DPtr fngMeshBodyPart;
+         GbTriFaceMesh3DPtr fngMeshTrailingEdge;
+         if (porousTralingEdge)
+         {
+            if (myid==0) UBLOG(logINFO, "Read fngFileBodyPart:start");
+            fngMeshBodyPart = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo+"/"+fngFileBodyPart, "fngMeshBody", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
+            if (myid==0) UBLOG(logINFO, "Read fngFileBodyPart:end");
+            fngMeshBodyPart->rotate(0.0, 0.5, 0.0);
+            if (myid==0) GbSystem3D::writeGeoObject(fngMeshBodyPart.get(), pathOut+"/geo/fngMeshBody", WbWriterVtkXmlBinary::getInstance());
+
+            if (myid==0) UBLOG(logINFO, "Read fngFileTrailingEdge:start");
+            fngMeshTrailingEdge = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo+"/"+fngFileTrailingEdge, "fngMeshTrailingEdge", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
+            if (myid==0) UBLOG(logINFO, "Read fngFileTrailingEdge:end");
+            fngMeshTrailingEdge->rotate(0.0, 0.5, 0.0);
+            fngMeshTrailingEdge->translate(0,0,1.3);
+            if (myid==0) GbSystem3D::writeGeoObject(fngMeshTrailingEdge.get(), pathOut+"/geo/fngMeshTrailingEdge", WbWriterVtkXmlBinary::getInstance());
+         }
+         else
+         {
+            if (myid==0) UBLOG(logINFO, "Read fngFileWhole:start");
+            fngMeshWhole = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(pathGeo+"/"+fngFileWhole, "fngMeshWhole", GbTriFaceMesh3D::KDTREE_SAHPLIT, false));
+            if (myid==0) UBLOG(logINFO, "Read fngFileWhole:end");
+            fngMeshWhole->rotate(0.0, 0.5, 0.0);
+            if (myid==0) GbSystem3D::writeGeoObject(fngMeshWhole.get(), pathOut+"/geo/fngMeshWhole", WbWriterVtkXmlBinary::getInstance());
+         }
 
-         //inflow
-         GbCuboid3DPtr geoInflow(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_minX3 - blockLength, g_minX1, g_maxX2 + blockLength, g_maxX3 + blockLength));
-         if (myid == 0) GbSystem3D::writeGeoObject(geoInflow.get(), pathOut + "/geo/geoInflow", WbWriterVtkXmlASCII::getInstance());
-
-         //outflow
-         GbCuboid3DPtr geoOutflow(new GbCuboid3D(g_maxX1, g_minX2 - blockLength, g_minX3 - blockLength, g_maxX1 + blockLength, g_maxX2 + blockLength, g_maxX3 + blockLength));
-         if (myid == 0) GbSystem3D::writeGeoObject(geoOutflow.get(), pathOut + "/geo/geoOutflow", WbWriterVtkXmlASCII::getInstance());
+         //////////////////////////////////////////////////////////////////////////
+         // Zackenband
+         //////////////////////////////////////////////////////////////////////////
+         //////////////////////////////////////////////////////////////////////////
+         if (myid==0) UBLOG(logINFO, "Read zigZagTape:start");
+         string ZckbndFilename = pathGeo+"/"+zigZagTape;
+         GbTriFaceMesh3DPtr meshBand1(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(ZckbndFilename, "zigZagTape1"));
+         meshBand1->rotate(0.0, 5, 0.0);
+         meshBand1->translate(15, 0, -12.65);
+         if (myid==0) GbSystem3D::writeGeoObject(meshBand1.get(), pathOut+"/geo/zigZagTape1", WbWriterVtkXmlASCII::getInstance());
+         // Zackenband2
+         GbTriFaceMesh3DPtr meshBand2(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(ZckbndFilename, "zigZagTape2"));
+         meshBand2->rotate(0.0, 5, 0.0);
+         meshBand2->translate(15, 5, -12.65);
+         if (myid==0) GbSystem3D::writeGeoObject(meshBand2.get(), pathOut+"/geo/zigZagTape2", WbWriterVtkXmlASCII::getInstance());
+         // Zackenband3
+         GbTriFaceMesh3DPtr meshBand3(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(ZckbndFilename, "zigZagTape13"));
+         meshBand3->rotate(0.0, 5, 0.0);
+         meshBand3->translate(15, 0, -12.35);
+         if (myid==0) GbSystem3D::writeGeoObject(meshBand3.get(), pathOut+"/geo/zigZagTape3", WbWriterVtkXmlASCII::getInstance());
+         // Zackenband4
+         GbTriFaceMesh3DPtr meshBand4(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(ZckbndFilename, "zigZagTape4"));
+         meshBand4->rotate(0.0, 5, 0.0);
+         meshBand4->translate(15, 5, -12.35);
+         if (myid==0) GbSystem3D::writeGeoObject(meshBand4.get(), pathOut+"/geo/zigZagTape4", WbWriterVtkXmlASCII::getInstance());
+         if (myid==0) UBLOG(logINFO, "Read zigZagTape:end");
+         //////////////////////////////////////////////////////////////////////////
 
          int bbOption = 1; //0=simple Bounce Back, 1=quadr. BB
          D3Q27BoundaryConditionAdapterPtr noSlipBCAdapter(new D3Q27NoSlipBCAdapter(bbOption));
@@ -192,6 +221,11 @@ void run(string configname)
             fngIntrWhole = D3Q27TriFaceMeshInteractorPtr(new D3Q27TriFaceMeshInteractor(fngMeshWhole, grid, noSlipBCAdapter, Interactor3D::SOLID));
          }
 
+         D3Q27TriFaceMeshInteractorPtr triBand1Interactor(new D3Q27TriFaceMeshInteractor(meshBand1, grid, noSlipBCAdapter, Interactor3D::SOLID));//, Interactor3D::EDGES));
+         D3Q27TriFaceMeshInteractorPtr triBand2Interactor(new D3Q27TriFaceMeshInteractor(meshBand2, grid, noSlipBCAdapter, Interactor3D::SOLID));//, Interactor3D::EDGES));
+         D3Q27TriFaceMeshInteractorPtr triBand3Interactor(new D3Q27TriFaceMeshInteractor(meshBand3, grid, noSlipBCAdapter, Interactor3D::SOLID));//, Interactor3D::EDGES));
+         D3Q27TriFaceMeshInteractorPtr triBand4Interactor(new D3Q27TriFaceMeshInteractor(meshBand4, grid, noSlipBCAdapter, Interactor3D::SOLID));//, Interactor3D::EDGES));
+
          if (refineLevel > 0)
          {
             if (myid == 0) UBLOG(logINFO, "Refinement - start");
@@ -203,23 +237,33 @@ void run(string configname)
             //refineHelper1.refine();
             //RefineAroundGbObjectHelper refineHelper2(grid, refineLevel, boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(geoIntr2), -1.0, 5.0, comm);
             //refineHelper2.refine();
+            
+
+            int rank = grid->getRank();
+            grid->setRank(0);
+            boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(triBand1Interactor)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
+            boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(triBand2Interactor)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
+            boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(triBand3Interactor)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
+            boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(triBand4Interactor)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
+            grid->setRank(rank);
 
             if (porousTralingEdge)
             {
                int rank = grid->getRank();
                grid->setRank(0);
-               boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(fngIntrBodyPart)->refineBlockGridToLevel(refineLevel - 1, 0.0, 10.0);
+               boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(fngIntrBodyPart)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
                grid->setRank(rank);
             }
             else
             {
                int rank = grid->getRank();
                grid->setRank(0);
-               boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(fngIntrWhole)->refineBlockGridToLevel(refineLevel - 1, 0.0, 10.0);
+               boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(fngIntrWhole)->refineBlockGridToLevel(refineLevel, 0.0, refineDistance);
                grid->setRank(rank);
             }
 
 
+
             ////////////////////////////////////////////
             //METIS
             Grid3DVisitorPtr metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::BSW, MetisPartitioner::KWAY));
@@ -257,8 +301,8 @@ void run(string configname)
                //boost::dynamic_pointer_cast<D3Q27TriFaceMeshInteractor>(fngIntrTrailingEdge)->refineBlockGridToLevel(refineLevel, -1.0, 10.0);
                //grid->setRank(rank);
 
-               GbObject3DPtr trailingEdgeCube(new GbCuboid3D(fngMeshTrailingEdge->getX1Minimum()-blockLength, fngMeshTrailingEdge->getX2Minimum(), fngMeshTrailingEdge->getX3Minimum()-blockLength,
-                  fngMeshTrailingEdge->getX1Maximum()+blockLength, fngMeshTrailingEdge->getX2Maximum(), fngMeshTrailingEdge->getX3Maximum()+blockLength));
+               GbObject3DPtr trailingEdgeCube(new GbCuboid3D(fngMeshTrailingEdge->getX1Minimum()-blockLength, fngMeshTrailingEdge->getX2Minimum(), fngMeshTrailingEdge->getX3Minimum()-blockLength/2.0,
+                  fngMeshTrailingEdge->getX1Maximum()+blockLength, fngMeshTrailingEdge->getX2Maximum(), fngMeshTrailingEdge->getX3Maximum()+blockLength/2.0));
                if (myid == 0) GbSystem3D::writeGeoObject(trailingEdgeCube.get(), pathOut + "/geo/trailingEdgeCube", WbWriterVtkXmlASCII::getInstance());
 
                RefineCrossAndInsideGbObjectBlockVisitor refVisitor(trailingEdgeCube, refineLevel);
@@ -266,10 +310,24 @@ void run(string configname)
             }
 
             RatioBlockVisitor ratioVisitor(refineLevel);
-            grid->accept(ratioVisitor);
+            CheckRatioBlockVisitor checkRatio(refineLevel);
+            int count = 0;
+            
+            do {
+               grid->accept(ratioVisitor);
+               checkRatio.resetState();
+               grid->accept(checkRatio);
+               if (myid == 0) UBLOG(logINFO, "count ="<<count++<<" state="<<checkRatio.getState());
+            } while (!checkRatio.getState());
 
-            RatioSmoothBlockVisitor ratioSmoothVisitor(refineLevel);
-            grid->accept(ratioSmoothVisitor);
+            //RatioSmoothBlockVisitor ratioSmoothVisitor(refineLevel);
+            //grid->accept(ratioSmoothVisitor);
+
+            {
+               WriteBlocksCoProcessorPtr ppblocks(new WriteBlocksCoProcessor(grid, UbSchedulerPtr(new UbScheduler(1)), pathOut, WbWriterVtkXmlBinary::getInstance(), comm));
+               ppblocks->process(0);
+               ppblocks.reset();
+            }
 
             OverlapBlockVisitor overlapVisitor(refineLevel, false);
             grid->accept(overlapVisitor);
@@ -286,9 +344,26 @@ void run(string configname)
          }
 
 
-         //geo->scale(1.0/scaleFactorX, 1.0, 1.0/scaleFactorX);
-         //geo = GbTriFaceMesh3DPtr(GbTriFaceMesh3DCreator::getInstance()->readMeshFromSTLFile(geoFile,"geo"));
-         //if (myid == 0) GbSystem3D::writeGeoObject(geo.get(), pathOut + "/geo/geo3", WbWriterVtkXmlASCII::getInstance());
+         //walls
+         GbCuboid3DPtr addWallZmin(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_minX3));
+         if (myid==0) GbSystem3D::writeGeoObject(addWallZmin.get(), pathOut+"/geo/addWallZmin", WbWriterVtkXmlASCII::getInstance());
+
+         GbCuboid3DPtr addWallZmax(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_maxX3, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength));
+         if (myid==0) GbSystem3D::writeGeoObject(addWallZmax.get(), pathOut+"/geo/addWallZmax", WbWriterVtkXmlASCII::getInstance());
+
+         D3Q27BoundaryConditionAdapterPtr slipBCAdapter(new D3Q27SlipBCAdapter(bbOption));
+
+         //wall interactors
+         D3Q27InteractorPtr addWallZminInt(new D3Q27Interactor(addWallZmin, grid, slipBCAdapter, Interactor3D::SOLID));
+         D3Q27InteractorPtr addWallZmaxInt(new D3Q27Interactor(addWallZmax, grid, slipBCAdapter, Interactor3D::SOLID));
+
+         //inflow
+         GbCuboid3DPtr geoInflow(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_minX1, g_maxX2+blockLength, g_maxX3+blockLength));
+         if (myid==0) GbSystem3D::writeGeoObject(geoInflow.get(), pathOut+"/geo/geoInflow", WbWriterVtkXmlASCII::getInstance());
+
+         //outflow
+         GbCuboid3DPtr geoOutflow(new GbCuboid3D(g_maxX1, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_maxX3+blockLength));
+         if (myid==0) GbSystem3D::writeGeoObject(geoOutflow.get(), pathOut+"/geo/geoOutflow", WbWriterVtkXmlASCII::getInstance());
 
          mu::Parser fct;
          fct.SetExpr("U");
@@ -313,9 +388,16 @@ void run(string configname)
          InteractorsHelper intHelper(grid, metisVisitor);
          intHelper.addInteractor(inflowIntr);
          intHelper.addInteractor(outflowIntr);
+         intHelper.addInteractor(addWallZminInt);
+         intHelper.addInteractor(addWallZmaxInt);
+         intHelper.addInteractor(triBand1Interactor);
+         intHelper.addInteractor(triBand2Interactor);
+         intHelper.addInteractor(triBand3Interactor);
+         intHelper.addInteractor(triBand4Interactor);
          if (porousTralingEdge)
          {
             intHelper.addInteractor(fngIntrBodyPart);
+            intHelper.addInteractor(fngIntrTrailingEdge);
          } 
          else
          {
@@ -328,8 +410,8 @@ void run(string configname)
          if (myid == 0) UBLOG(logINFO, "deleteSolidBlocks - end");
          //////////////////////////////////////
 
-         WriteBlocksCoProcessorPtr ppblocks(new WriteBlocksCoProcessor(grid, UbSchedulerPtr(new UbScheduler(1)), pathOut, WbWriterVtkXmlBinary::getInstance(), comm));
-         ppblocks->process(0);
+         WriteBlocksCoProcessorPtr ppblocks(new WriteBlocksCoProcessor(grid, UbSchedulerPtr(new UbScheduler(1)), pathOut, WbWriterVtkXmlASCII::getInstance(), comm));
+         ppblocks->process(1);
          ppblocks.reset();
 
          unsigned long long numberOfBlocks = (unsigned long long)grid->getNumberOfBlocks();
@@ -358,24 +440,29 @@ void run(string configname)
          }
 
          LBMKernel3DPtr kernel = LBMKernel3DPtr(new LBMKernelETD3Q27CCLB(blockNx[0], blockNx[1], blockNx[2], LBMKernelETD3Q27CCLB::NORMAL));
+         //LBMKernel3DPtr kernel = LBMKernel3DPtr(new CompressibleCumulantLBMKernel(blockNx[0], blockNx[1], blockNx[2], CompressibleCumulantLBMKernel::NORMAL));
 
          BCProcessorPtr bcProc;
          BoundaryConditionPtr noSlipBC;
-         BoundaryConditionPtr velBC = VelocityBoundaryConditionPtr(new VelocityBoundaryCondition());
-         BoundaryConditionPtr denBC = NonEqDensityBoundaryConditionPtr(new NonEqDensityBoundaryCondition());
+         //BoundaryConditionPtr velBC = VelocityBoundaryConditionPtr(new VelocityBoundaryCondition());
+         //BoundaryConditionPtr denBC = NonEqDensityBoundaryConditionPtr(new NonEqDensityBoundaryCondition());
+         BoundaryConditionPtr velBC = NonReflectingVelocityBoundaryConditionPtr(new NonReflectingVelocityBoundaryCondition());
+         BoundaryConditionPtr denBC = NonReflectingDensityBoundaryConditionPtr(new NonReflectingDensityBoundaryCondition());
+         BoundaryConditionPtr slipBC = SlipBoundaryConditionPtr(new SlipBoundaryCondition());
 
-         //if (thinWall)
-         //{
+         if (thinWall)
+         {
             bcProc = BCProcessorPtr(new D3Q27ETForThinWallBCProcessor());
             noSlipBC = BoundaryConditionPtr(new ThinWallNoSlipBoundaryCondition());
-         //}
-         //else
-         //{
-         //   bcProc = BCProcessorPtr(new D3Q27ETBCProcessor());
-         //   noSlipBC = BoundaryConditionPtr(new NoSlipBoundaryCondition());
-         //}
+         }
+         else
+         {
+            bcProc = BCProcessorPtr(new D3Q27ETBCProcessor());
+            noSlipBC = BoundaryConditionPtr(new NoSlipBoundaryCondition());
+         }
 
          bcProc->addBC(noSlipBC);
+         bcProc->addBC(slipBC);
          bcProc->addBC(velBC);
          bcProc->addBC(denBC);
 
@@ -401,6 +488,12 @@ void run(string configname)
          BoundaryConditionBlockVisitor bcVisitor;
          grid->accept(bcVisitor);
 
+         //sponge layer
+         GbCuboid3DPtr spCube(new GbCuboid3D(960, g_minX2, g_minX3, 1210, g_maxX2, g_maxX3));
+         if (myid == 0) GbSystem3D::writeGeoObject(spCube.get(), pathOut + "/geo/spCube", WbWriterVtkXmlASCII::getInstance());
+         SpongeLayerBlockVisitor spongeLayer(spCube);
+         grid->accept(spongeLayer);
+
          //initialization of distributions
          D3Q27ETInitDistributionsBlockVisitor initVisitor(nuLB, rhoLB);
          initVisitor.setVx1(fct);
diff --git a/source/Applications/FNG/fng15Bombadil.cfg b/source/Applications/FNG/fng15Bombadil.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..393ca8a897cab1fc5c8dbd3f5372c746ba811805
--- /dev/null
+++ b/source/Applications/FNG/fng15Bombadil.cfg
@@ -0,0 +1,39 @@
+pathOut = d:/temp/fng2
+pathGeo = d:/Projects/SFB880/FNG/A1_Forschungsdaten_Profilgeometrie_STL_CATIA_Rossian
+#fngFileWhole = f16-ascii.stl
+fngFileWhole = grundgeometrie-direkter-export.stl
+fngFileBodyPart = f16-body-part-ascii.stl
+fngFileTrailingEdge = f16-trailing-edge-ascii.stl
+zigZagTape = 2zackenbaender0.stl
+
+numOfThreads = 4
+availMem = 20e9
+refineLevel = 8
+#blockNx = 8 4 8
+blockNx = 21 6 13
+uLB = 0.01
+
+#x1min x1max x2min x2max x3min x3max [m]
+boundingBox = -0.90 1.20 0.035 0.065 -0.65 0.65
+
+#deltaXfine = 0.001
+#deltaXfine = 0.00375
+#deltaXfine = 1.46484375e-5
+#deltaXfine = 0.00001171875
+#deltaXfine = 9.765625e-6
+deltaXfine = 19.53125e-6
+#10e-6
+
+refineDistance = 0.3
+
+restartStep = 10000
+restartStepStart = 10000
+
+outTime = 1
+endTime = 2000
+
+logToFile = false
+
+porousTralingEdge = false
+
+thinWall = false
diff --git a/source/Applications/FNG/fng15BombadilTest.cfg b/source/Applications/FNG/fng15BombadilTest.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..28dd89f387d8813f35ac71fa265c3459aef1af78
--- /dev/null
+++ b/source/Applications/FNG/fng15BombadilTest.cfg
@@ -0,0 +1,39 @@
+pathOut = d:/temp/fng5
+pathGeo = d:/Projects/SFB880/FNG/A1_Forschungsdaten_Profilgeometrie_STL_CATIA_Rossian
+#fngFileWhole = f16-ascii.stl
+fngFileWhole = grundgeometrie-direkter-export.stl
+fngFileBodyPart = f16-body-part-ascii.stl
+fngFileTrailingEdge = f16-trailing-edge-ascii.stl
+zigZagTape = 2zackenbaender0.stl
+
+numOfThreads = 4
+availMem = 20e9
+refineLevel = 0
+#blockNx = 8 4 8
+blockNx = 21 6 13
+uLB = 0.01
+
+#x1min x1max x2min x2max x3min x3max [m]
+boundingBox = -0.90 1.20 0.035 0.065 -0.65 0.65
+
+deltaXfine = 0.005
+#deltaXfine = 0.00375
+#deltaXfine = 1.46484375e-5
+#deltaXfine = 0.00001171875
+#deltaXfine = 9.765625e-6
+#deltaXfine = 19.53125e-6
+
+
+refineDistance = 0.3
+
+restartStep = 10000
+restartStepStart = 10000
+
+outTime = 10000
+endTime = 2000000
+
+logToFile = false
+
+porousTralingEdge = false
+
+thinWall = false
diff --git a/source/Applications/Hagen_Poiseuille_flow/pf4.cfg b/source/Applications/Hagen_Poiseuille_flow/pf4.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..c7b2430129b76170a69cb863c76ce991c7fe3fac
--- /dev/null
+++ b/source/Applications/Hagen_Poiseuille_flow/pf4.cfg
@@ -0,0 +1,19 @@
+pathname = d:/temp/pflow4
+numOfThreads = 8
+availMem = 8e9
+logToFile = false
+blocknx = 10 10 10
+gridnx = 2 0.25 2
+nuLB = 1e-2
+forcing = 7.8125e-10
+deltax = 0.025
+
+refineLevel = 1
+logToFile=false
+thinWall = false
+
+restartStep = 400000
+
+endTime = 1600000
+#outTime = 400000
+outTime = 400
\ No newline at end of file
diff --git a/source/Applications/Hagen_Poiseuille_flow/pflow.cpp b/source/Applications/Hagen_Poiseuille_flow/pflow.cpp
index 2f0ce191bc5b6595c19f2c1907c55fd762050970..a905c5d464f0ecfc8d8b632f499ae021f035b909 100644
--- a/source/Applications/Hagen_Poiseuille_flow/pflow.cpp
+++ b/source/Applications/Hagen_Poiseuille_flow/pflow.cpp
@@ -106,19 +106,27 @@ void pflowForcing(string configname)
             UBLOG(logINFO, "Preprozess - start");
          }
 
+         //////////////////////////////////////////////////////////////////////////
+         //refinement
+         double blockLengthX3Fine = grid->getDeltaX(refineLevel) * blocknx[2];
+
+         GbCuboid3DPtr refineBoxTop(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_maxX3 - blockLengthX3Fine, g_maxX1 + blockLength, g_maxX2 + blockLength, g_maxX3 + blockLength));
+         if (myid == 0) GbSystem3D::writeGeoObject(refineBoxTop.get(), pathname + "/geo/refineBoxTop", WbWriterVtkXmlASCII::getInstance());
+
+         //GbCuboid3DPtr refineBoxBottom(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3, g_maxX1+blockLength, g_maxX2+blockLength, g_minX3+offsetMinX3+blockLengthX3Fine));
+         GbCuboid3DPtr refineBoxBottom(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_minX3 - blockLengthX3Fine, g_maxX1 + blockLength, g_maxX2 + blockLength, g_minX3 + blockLengthX3Fine));
+         if (myid == 0) GbSystem3D::writeGeoObject(refineBoxBottom.get(), pathname + "/geo/refineBoxBottom", WbWriterVtkXmlASCII::getInstance());
+
          if (refineLevel > 0)
          {
-            //GbObject3DPtr refineCube(new GbCuboid3D(g_minX1, g_minX2, g_minX3, g_maxX1, g_maxX2/3.0, g_maxX3));
-            //if(myid ==0) GbSystem3D::writeGeoObject(refineCube.get(),pathname + "/geo/refineCube", WbWriterVtkXmlBinary::getInstance());
-            GbObject3DPtr refineCube(new GbCuboid3D(g_minX1 + blockLength + 2 * dx, g_minX2 + blockLength + 2 * dx, g_minX3 + blockLength + 2 * dx, g_maxX1 - blockLength - 2 * dx, g_maxX2 - blockLength - 2 * dx, g_maxX3 - blockLength - 2 * dx));
-            if (myid == 0) GbSystem3D::writeGeoObject(refineCube.get(), pathname + "/geo/refineCube", WbWriterVtkXmlBinary::getInstance());
-
             if (myid == 0) UBLOG(logINFO, "Refinement - start");
             RefineCrossAndInsideGbObjectHelper refineHelper(grid, refineLevel);
-            refineHelper.addGbObject(refineCube, 1);
+            refineHelper.addGbObject(refineBoxTop, refineLevel);
+            refineHelper.addGbObject(refineBoxBottom, refineLevel);
             refineHelper.refine();
             if (myid == 0) UBLOG(logINFO, "Refinement - end");
          }
+         //////////////////////////////////////////////////////////////////////////
 
          //walls
          GbCuboid3DPtr addWallZmin(new GbCuboid3D(g_minX1 - blockLength, g_minX2 - blockLength, g_minX3 - blockLength, g_maxX1 + blockLength, g_maxX2 + blockLength, g_minX3));
diff --git a/source/Applications/pChannel/configBombadilpChannel.cfg b/source/Applications/pChannel/configBombadilpChannel.cfg
index ffe5cdeef4d60db2ab73e29245b7320bbc438e0f..8bd0735882a22985395dc17a9034a26830ebebb9 100644
--- a/source/Applications/pChannel/configBombadilpChannel.cfg
+++ b/source/Applications/pChannel/configBombadilpChannel.cfg
@@ -2,7 +2,7 @@
 #Simulation parameters for porous channel
 #
 
-pathname = d:/temp/pChannelNormal
+pathname = d:/temp/ChannelFlowC2
 pathGeo = d:/Projects/SFB880/GeometrienPoroeseMedien/PA80-110
 numOfThreads = 4
 availMem = 8e9
@@ -50,27 +50,27 @@ voxelDeltaX = 3.6496350365e-6 3.76789751319e-6 3.95256916996e-6
 
 #pmL = 4e-3 0.5e-3 1e-3
 
-pmL = 1e-3 1e-3 1e-3
-#pmL = 4e-3 4e-3 1e-3
+#pmL = 1e-3 1e-3 1e-3
+pmL = 4e-3 4e-3 1e-3
 
 #grid
 refineLevel = 0
 #deltaXfine  = 10e-6
 #deltaXfine  = 20e-6
-deltaXfine  = 40e-6
+deltaXfine  = 40e-5
 
-blocknx = 10 10 10
-#blocknx = 20 20 20
-lengthFactor = 6
-#lengthFactor = 16
-thinWall = true
-changeQs = true
+#blocknx = 10 10 10
+blocknx = 20 40 20
+#lengthFactor = 6
+lengthFactor = 16
+thinWall = false
+changeQs = false
 
-channelHigh = 0.002
+#channelHigh = 0.002
 
 #DLR-F15
 #channelHigh = 0.017
-#channelHigh = 0.016
+channelHigh = 0.016
 #NACA 0012
 #channelHigh = 0.008
  
@@ -82,13 +82,17 @@ Re = 51000
 #real velocity is 54.95 m/s
 u_LB = 0.1
 
-restartStep = 100000
-restartStepStart = 100000
+nupsSteps=1000
 
-timeAvStart = 100000
-timeAvStop = 200000
+restartStep = 21000000
+restartStepStart = 21000000
 
-endTime = 200000
-outTime = 10000
+averaging = false
+averagingReset = false
+timeAvStart = 21000000
+timeAvStop = 2100010000
+
+endTime = 1000000
+outTime = 1000
  
 
diff --git a/source/Applications/pChannel/pChannel.cpp b/source/Applications/pChannel/pChannel.cpp
index bac9760fc77fde2aa4702c34f6bc572c05a9b816..c7636c3c5709e01592978ba53f82f6046d788c0f 100644
--- a/source/Applications/pChannel/pChannel.cpp
+++ b/source/Applications/pChannel/pChannel.cpp
@@ -7,6 +7,18 @@ double rangeRandom(double M, double N)
    return M + (rand() / (RAND_MAX / (N - M)));
 }
 
+double rangeRandom1()
+{
+   return (2.0*rand())/RAND_MAX - 1.0;
+}
+
+//double rangeRandom(double M, double N)
+//{
+//   return rand() % (int)N+(int)M;
+//}
+
+
+
 //#include <thread>
 
 using namespace std;
@@ -47,7 +59,9 @@ void run(string configname)
       bool            changeQs          = config.getBool("changeQs"); 
       double          timeAvStart       = config.getDouble("timeAvStart");
       double          timeAvStop        = config.getDouble("timeAvStop");
-
+      bool            averaging         = config.getBool("averaging");
+      bool            averagingReset    = config.getBool("averagingReset");
+      double          nupsSteps         = config.getDouble("nupsSteps");
 
       CommunicatorPtr comm = MPICommunicator::getInstance();
       int myid = comm->getProcessID();
@@ -374,7 +388,7 @@ void run(string configname)
          BoundaryConditionBlockVisitor bcVisitor;
          grid->accept(bcVisitor);
 
-         mu::Parser inflowProfile;
+         mu::Parser inflowProfileVx1, inflowProfileVx2, inflowProfileVx3, inflowProfileRho;
      //  inflowProfile.SetExpr("x3 < h ? 0.0 : uLB+1*x1-1*x2");
 		   ////inflowProfile.SetExpr("uLB+1*x1-1*x2");
      //    //inflowProfile.SetExpr("uLB");
@@ -409,27 +423,83 @@ void run(string configname)
          //inflowProfile.SetExpr("x3 < h && x3 > 0 ? 2.3*u_tau/k*log(x3/z0) : 0.0");
 
          //inflowProfile.SetExpr("Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)");
-         //inflowProfile.SetExpr("x3 > 0 && (zMax-x3) > 0 ? (x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)) : 0");
-         inflowProfile.DefineFun("rangeRandom", rangeRandom);
-         inflowProfile.SetExpr("x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)+rangeRandom(-nois, nois) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)+rangeRandom(-nois, nois)");
-
-         inflowProfile.DefineConst("Uref", u_LB);
-         inflowProfile.DefineConst("Href", channelHigh);
-         inflowProfile.DefineConst("zg", 0.0);
-         inflowProfile.DefineConst("nois", nois);
+         //inflowProfileVx1.SetExpr("x3 > 0 && (zMax-x3) > 0 ? (x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)) : 0");
+         
+         inflowProfileVx1.DefineFun("rangeRandom1", rangeRandom1);
+         //inflowProfile.SetExpr("x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)+rangeRandom(-nois, nois) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)+rangeRandom(-nois, nois)");
 
-         inflowProfile.DefineConst("u_tau", u_tau);
-         inflowProfile.DefineConst("k", k);
-         inflowProfile.DefineConst("z0", z0);
-         inflowProfile.DefineConst("h", channelHigh / 2.0);
-         inflowProfile.DefineConst("zMax", channelHigh);
+         inflowProfileVx1.SetExpr("x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)+0.1*Uref*rangeRandom1() : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)+0.1*Uref*rangeRandom1()");
 
+         //inflowProfileVx1.SetExpr("x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)+ U*cos(8.0*PI*(x1)/(L1))*sin(8.0*PI*(x3)/L3) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)+U*cos(8.0*PI*(x1)/(L1))*sin(8.0*PI*(x3)/L3)");
+         //inflowProfileVx1.SetExpr("U*cos(4.0*PI*(x1)/(L1))*sin(4.0*PI*(x3)/L3)");
+         
+         //inflowProfileVx1.SetExpr("x3 < h ? Uref/log((Href+z0)/z0)*log((x3-zg+z0)/z0)+U*cos(rangeRandom(2,8)*PI*x1/L2)*sin(rangeRandom(2,8)*PI*x2/L2)*sin(rangeRandom(2,8)*PI*x3/L3) : Uref/log((Href+z0)/z0)*log((zMax-x3-zg+z0)/z0)+U*cos(rangeRandom(2,8)*PI*x1/L2)*sin(rangeRandom(2,8)*PI*x2/L2)*sin(rangeRandom(2,8)*PI*x3/L3)");
+         //inflowProfileVx1.SetExpr("U*cos(2.0*PI*x1/L1)*sin(2.0*PI*x2/L2)*sin(2.0*PI*x3/L3)");
+         //inflowProfileVx1.SetExpr("U*sin(2.0*PI*x1/L2)*cos(1.0*PI*x2/L2)*cos(1.0*PI*x3/L3)");
+         //inflowProfileVx1.SetExpr("U*cos(2.0*PI*(x1-L1/16.0)/(L1*2.0))*sin(2.0*PI*(x3-L3/4.0)/L3)");
+         //inflowProfileVx1.SetExpr("U*sin(2.0*PI*x1/L2)");
+
+         inflowProfileVx1.DefineConst("U", u_LB);
+         inflowProfileVx1.DefineConst("PI", PI);
+         inflowProfileVx1.DefineConst("L1", g_maxX1-g_minX1);
+         inflowProfileVx1.DefineConst("L2", g_maxX2-g_minX2);
+         inflowProfileVx1.DefineConst("L3", g_maxX3-g_minX3);
+
+         inflowProfileVx1.DefineConst("Uref", u_LB);
+         inflowProfileVx1.DefineConst("Href", channelHigh);
+         inflowProfileVx1.DefineConst("zg", 0.0);
+         inflowProfileVx1.DefineConst("nois", nois);
+
+         inflowProfileVx1.DefineConst("u_tau", u_tau);
+         inflowProfileVx1.DefineConst("k", k);
+         inflowProfileVx1.DefineConst("z0", z0);
+         inflowProfileVx1.DefineConst("h", channelHigh / 2.0);
+         inflowProfileVx1.DefineConst("zMax", channelHigh);
+
+         inflowProfileVx2.SetExpr("0.1*U*rangeRandom1()");
+         //inflowProfileVx2.SetExpr("0.0");
+         //inflowProfileVx2.SetExpr("-U*cos(2.0*PI*x1/L1)*sin(2.0*PI*x2/L2)*cos(2.0*PI*x3/L3)");
+         //inflowProfileVx2.SetExpr("-U/2.0*sin(2.0*PI*x1/L1)*cos(2.0*PI*x2/L2)*sin(2.0*PI*x3/L3)");
+         //inflowProfileVx2.SetExpr("-U/8.0*sin(rangeRandom(2,8)*PI*x1/L2)*cos(rangeRandom(2,8)*PI*x2/L2)*sin(rangeRandom(2,8)*PI*x3/L3)");
+         inflowProfileVx2.DefineConst("U", u_LB);
+         inflowProfileVx2.DefineConst("PI", PI);
+         inflowProfileVx2.DefineConst("L1", g_maxX1-g_minX1);
+         inflowProfileVx2.DefineConst("L2", g_maxX2-g_minX2);
+         inflowProfileVx2.DefineConst("L3", g_maxX3-g_minX3);
+         inflowProfileVx2.DefineFun("rangeRandom1", rangeRandom1);
+
+         inflowProfileVx3.SetExpr("0.1*U*rangeRandom1()");
+         //inflowProfileVx3.SetExpr("-U/2.0*sin(8.0*PI*(x1)/(L1))*cos(8.0*PI*(x3)/L3)");
+         //inflowProfileVx3.SetExpr("-U/2.0*sin(2.0*PI*(x1-L1/16.0)/(L1*2.0))*cos(2.0*PI*(x3-L3/4.0)/L3)");
+         //inflowProfileVx3.SetExpr("-U/2.0*sin(2.0*PI*x1/L2)*sin(2.0*PI*x3/L3)");
+         //inflowProfileVx3.SetExpr("-U*cos(1.0*PI*x1/L2)*sin(1.0*PI*x2/L2)*cos(1.0*PI*x3/L3)");
+         //inflowProfileVx3.SetExpr("-U/2.0*sin(2.0*PI*x1/L2)*sin(2.0*PI*x2/L2)*cos(2.0*PI*x3/L3)");
+         //inflowProfileVx3.SetExpr("-U/8.0*sin(rangeRandom(2,8)*PI*x1/L2)*sin(rangeRandom(2,8)*PI*x2/L2)*cos(rangeRandom(2,8)*PI*x3/L3)");
+         inflowProfileVx3.DefineConst("U", u_LB);
+         inflowProfileVx3.DefineConst("PI", PI);
+         inflowProfileVx3.DefineConst("L1", g_maxX1-g_minX1);
+         inflowProfileVx3.DefineConst("L2", g_maxX2-g_minX2);
+         inflowProfileVx3.DefineConst("L3", g_maxX3-g_minX3);
+         inflowProfileVx3.DefineFun("rangeRandom1", rangeRandom1);
+
+         inflowProfileRho.SetExpr("3.0*(rho/4.0*U^2*(sin(4.0*PI*(x1-L1/4.0)/L1)+sin(4.0*PI*(x3-L3/4.0)/L3)))");
+         //inflowProfileRho.SetExpr("3.0*(rho/3.0+((rho*U^2)/16.0)*(cos(2.0*PI*x1/L2)+cos(2.0*PI*x2/L2))*(cos(2.0*PI*x3/L3)+2.0))");
+         //inflowProfileRho.SetExpr("3.0*(rho/3.0+((rho*U^2)/32.0)*(cos(8.0*PI*x1/L2)+cos(8.0*PI*x2/L2))*(cos(8.0*PI*x3/L3)+2.0))");
+         inflowProfileRho.DefineConst("U", u_LB);
+         inflowProfileRho.DefineConst("PI", PI);
+         inflowProfileRho.DefineConst("L1", g_maxX1-g_minX1);
+         inflowProfileRho.DefineConst("L2", g_maxX2-g_minX2);
+         inflowProfileRho.DefineConst("L3", g_maxX3-g_minX3);
+         inflowProfileRho.DefineConst("rho", rho_LB);
 
          D3Q27ETInitDistributionsBlockVisitor initVisitor(nu_LB, rho_LB);
-         initVisitor.setVx1(inflowProfile);
-         //initVisitor.setVx1(u_LB);
+         initVisitor.setVx1(inflowProfileVx1);
+         initVisitor.setVx2(inflowProfileVx2);
+         initVisitor.setVx3(inflowProfileVx3);
+         //initVisitor.setRho(inflowProfileRho);
          grid->accept(initVisitor);
 
+         
 
          ////set connectors
          D3Q27InterpolationProcessorPtr iProcessor(new D3Q27IncompressibleOffsetInterpolationProcessor());
@@ -504,8 +574,78 @@ void run(string configname)
             UBLOG(logINFO, "path = " << pathname);
          }
 
-         BoundaryConditionBlockVisitor bcVisitor;
-         grid->accept(bcVisitor);
+         /////////////////////////////////////////////////////////////
+         ////bounding box
+         //double offsetMinX3 = pmL[2];
+
+         //double offsetMaxX1 = pmL[0]*lengthFactor;
+         //double offsetMaxX2 = pmL[1]*2.0;
+         //double offsetMaxX3 = channelHigh;
+
+         //double g_minX1 = origin[0];
+         //double g_minX2 = origin[1];
+         //double g_minX3 = origin[2];
+
+         //double g_maxX1 = origin[0]+offsetMaxX1;
+         //double g_maxX2 = origin[1]+offsetMaxX2;
+         //double g_maxX3 = origin[2]+offsetMaxX3;
+
+         //double blockLength = (double)blocknx[0]*deltaXcoarse;
+
+         //GbCuboid3DPtr addWallZmin(new GbCuboid3D(g_minX1-blockLength, g_minX2-blockLength, g_minX3-blockLength, g_maxX1+blockLength, g_maxX2+blockLength, g_minX3+offsetMinX3));
+         //if (myid==0) GbSystem3D::writeGeoObject(addWallZmin.get(), pathname+"/geo/addWallZmin", WbWriterVtkXmlASCII::getInstance());
+         //int bbOption = 1;
+         //D3Q27BoundaryConditionAdapterPtr bcNoSlip(new D3Q27NoSlipBCAdapter(bbOption));
+         //D3Q27InteractorPtr addWallZminInt(new D3Q27Interactor(addWallZmin, grid, bcNoSlip, Interactor3D::SOLID));
+
+         //SetSolidOrTransBlockVisitor v1(addWallZminInt, SetSolidOrTransBlockVisitor::SOLID);
+         //grid->accept(v1);
+         //SetSolidOrTransBlockVisitor v2(addWallZminInt, SetSolidOrTransBlockVisitor::TRANS);
+         //grid->accept(v2);
+
+         //std::vector<Block3DPtr> blocks;
+         //std::vector<Block3DPtr>& sb = addWallZminInt->getSolidBlockSet();
+         //if (myid==0) UBLOG(logINFO, "number of solid blocks = "<<sb.size());
+         ////blocks.insert(blocks.end(), sb.begin(), sb.end());
+         //std::vector<Block3DPtr>& tb = addWallZminInt->getTransBlockSet();
+         //if (myid==0) UBLOG(logINFO, "number of trans blocks = "<<tb.size());
+         //blocks.insert(blocks.end(), tb.begin(), tb.end());
+
+         //if (myid==0) UBLOG(logINFO, "number of blocks = "<<blocks.size());
+
+         //BOOST_FOREACH(Block3DPtr block, blocks)
+         //{
+         //   block->setActive(true);
+         //   addWallZminInt->setDifferencesToGbObject3D(block);
+         //}
+
+         ////////////////////////////////////////////////
+         //////METIS
+         ////Grid3DVisitorPtr metisVisitor(new MetisPartitioningGridVisitor(comm, MetisPartitioningGridVisitor::LevelBased, D3Q27System::BSW, MetisPartitioner::KWAY));
+         ////////////////////////////////////////////////
+         /////////delete solid blocks
+         ////if (myid==0) UBLOG(logINFO, "deleteSolidBlocks - start");
+         ////InteractorsHelper intHelper(grid, metisVisitor);
+         ////intHelper.addInteractor(addWallZminInt);
+         ////intHelper.selectBlocks();
+         ////if (myid==0) UBLOG(logINFO, "deleteSolidBlocks - end");
+         //////////////////////////////////////////
+         ////intHelper.setBC();
+         ////////////////////////////////////////////////////////////////
+
+         //BoundaryConditionBlockVisitor bcVisitor;
+         //grid->accept(bcVisitor);
+
+         //WriteBlocksCoProcessorPtr ppblocks(new WriteBlocksCoProcessor(grid, UbSchedulerPtr(new UbScheduler(1)), pathname, WbWriterVtkXmlBinary::getInstance(), comm));
+         //ppblocks->process(0);
+         //ppblocks.reset();
+
+         //UbSchedulerPtr geoSch(new UbScheduler(1));
+         //MacroscopicQuantitiesCoProcessorPtr ppgeo(
+         //   new MacroscopicQuantitiesCoProcessor(grid, geoSch, pathname, WbWriterVtkXmlBinary::getInstance(), conv, true));
+         //ppgeo->process(0);
+         //ppgeo.reset();
+         //////////////////////////////////////////////////////////////////
 
          //set connectors
          D3Q27InterpolationProcessorPtr iProcessor(new D3Q27IncompressibleOffsetInterpolationProcessor());
@@ -520,7 +660,7 @@ void run(string configname)
 
          if (myid == 0) UBLOG(logINFO, "Restart - end");
       }
-      UbSchedulerPtr nupsSch(new UbScheduler(10, 30, 100));
+      UbSchedulerPtr nupsSch(new UbScheduler(nupsSteps));
       NUPSCounterCoProcessor npr(grid, nupsSch, numOfThreads, comm);
 
       UbSchedulerPtr stepSch(new UbScheduler(outTime));
@@ -599,9 +739,17 @@ void run(string configname)
          TimeAveragedValuesCoProcessor::Velocity | TimeAveragedValuesCoProcessor::Fluctuations | TimeAveragedValuesCoProcessor::Triplecorrelations,
          levels, levelCoords, bounds));
       
+      if (averagingReset)
+      {
+         tav->reset();
+      }
+      
       //UbSchedulerPtr catalystSch(new UbScheduler(1));
       //InSituCatalystCoProcessor catalyst(grid, catalystSch, "pchannel.py");
 
+      UbSchedulerPtr exitSch(new UbScheduler(10));
+      EmergencyExitCoProcessor exitCoProc(grid, exitSch, pathname, RestartCoProcessorPtr(&rp), comm);
+
       if (myid == 0)
       {
          UBLOG(logINFO, "PID = " << myid << " Total Physical Memory (RAM): " << Utilities::getTotalPhysMem());
@@ -610,7 +758,10 @@ void run(string configname)
       }
 
       CalculationManagerPtr calculation(new CalculationManager(grid, numOfThreads, endTime, stepSch));
-      calculation->setTimeAveragedValuesCoProcessor(tav);
+      if (averaging)
+      {
+         calculation->setTimeAveragedValuesCoProcessor(tav);
+      }
       if (myid == 0) UBLOG(logINFO, "Simulation-start");
       calculation->calculate();
       if (myid == 0) UBLOG(logINFO, "Simulation-end");
diff --git a/source/IncludsList.cmake b/source/IncludsList.cmake
index ac0503e2dade7f80d12e87ba22e247d7d8a60a0d..730ed546d3c2743db77b63bab8bbe06929f33665 100644
--- a/source/IncludsList.cmake
+++ b/source/IncludsList.cmake
@@ -25,8 +25,6 @@ INCLUDE_DIRECTORIES(${SOURCE_ROOT}/ThirdParty/Library/basics/transmiitter)
 INCLUDE_DIRECTORIES(${SOURCE_ROOT}/ThirdParty/Library/basics/utilities)
 INCLUDE_DIRECTORIES(${SOURCE_ROOT}/ThirdParty/Library/basics/writer)
 
-INCLUDE_DIRECTORIES(${SOURCE_ROOT}/ThirdParty/FNV)
-
 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH})
 INCLUDE_DIRECTORIES(${METIS_INCLUDEDIR})
diff --git a/source/ThirdParty/FNV/CMakePackage.txt b/source/ThirdParty/FNV/CMakePackage.txt
deleted file mode 100644
index bea0c0b7df77f75944c36260ff48bb9353fc8394..0000000000000000000000000000000000000000
--- a/source/ThirdParty/FNV/CMakePackage.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-GET_FILENAME_COMPONENT( CURRENT_DIR  ${CMAKE_CURRENT_LIST_FILE} PATH) 
-COLLECT_PACKAGE_DATA_WITH_OPTION(${CURRENT_DIR} ALL_SOURCES outOption outSourceGroupName)
-
-IF(${outOption})
-   LIST(APPEND CAB_ADDTIONAL_COMPILER_FLAGS -DMC_CUBES  )
-ENDIF()
diff --git a/source/ThirdParty/FNV/fnv.h b/source/ThirdParty/FNV/fnv.h
deleted file mode 100644
index c49d9555fb64b3ad71f7af959dbfb532161062d6..0000000000000000000000000000000000000000
--- a/source/ThirdParty/FNV/fnv.h
+++ /dev/null
@@ -1,138 +0,0 @@
-// //////////////////////////////////////////////////////////
-// fnv.h
-// Copyright (c) 2011 Stephan Brumme. All rights reserved.
-// see http://create.stephan-brumme.com/disclaimer.html
-//
-
-// compute FNV1a hash
-// originally developed by Fowler, Noll and Vo
-// http://isthe.com/chongo/tech/comp/fnv/
-
-#pragma once
-
-#include <string>
-#include <cassert>
-
-
-// 32 bit integers
-#ifdef _MSC_VER
-typedef unsigned int uint32_t;
-#else
-#include <stdint.h>
-#endif
-
-
-namespace FNV
-{
-  // default values recommended by http://isthe.com/chongo/tech/comp/fnv/
-  const uint32_t Prime = 0x01000193; //   16777619
-  const uint32_t Seed  = 0x811C9DC5; // 2166136261
-
-  /// hash a single byte
-  inline uint32_t fnv1a(unsigned char oneByte, uint32_t hash = Seed)
-  {
-    return (oneByte ^ hash) * Prime;
-    // FNV1: return (oneByte * Prime) ^ hash;
-  }
-
-
-  /// hash a short (two bytes)
-  inline uint32_t fnv1a(unsigned short twoBytes, uint32_t hash = Seed)
-  {
-    const unsigned char* ptr = (const unsigned char*) &twoBytes;
-    hash = fnv1a(*ptr++, hash);
-    return fnv1a(*ptr  , hash);
-  }
-
-
-  /// hash a 32 bit integer (four bytes)
-  inline uint32_t fnv1a(uint32_t fourBytes, uint32_t hash = Seed)
-  {
-    const unsigned char* ptr = (const unsigned char*) &fourBytes;
-    hash = fnv1a(*ptr++, hash);
-    hash = fnv1a(*ptr++, hash);
-    hash = fnv1a(*ptr++, hash);
-    return fnv1a(*ptr  , hash);
-  }
-
-
-  /// hash a block of memory
-  inline uint32_t fnv1a(const void* data, size_t numBytes, uint32_t hash = Seed)
-  {
-    assert(data);
-    const unsigned char* ptr = (const unsigned char*)data;
-    while (numBytes--)
-      hash = (*ptr++ ^ hash) * Prime;
-      // same as hash = fnv1a(*ptr++, hash); but much faster in debug mode
-    return hash;
-  }
-
-
-  /// hash a C-style string
-  inline uint32_t fnv1a(const char* text, uint32_t hash = Seed)
-  {
-    assert(text);
-    const unsigned char* ptr = (const unsigned char*)text;
-    while (*ptr)
-      hash = (*ptr++ ^ hash) * Prime;
-      // same as hash = fnv1a(*ptr++, hash); but much faster in debug mode
-    return hash;
-  }
-
-
-  /// hash an std::string
-  inline uint32_t fnv1a(const std::string& text, uint32_t hash = Seed)
-  {
-    return fnv1a(text.c_str(), text.length(), hash);
-    // or: fnv1a(text.c_str(), hash);
-  }
-
-
-  /// hash a float
-  inline uint32_t fnv1a(float number, uint32_t hash = Seed)
-  {
-    return fnv1a(&number, sizeof(number), hash);
-  }
-
-
-  /// hash a double
-  inline uint32_t fnv1a(double number, uint32_t hash = Seed)
-  {
-    return fnv1a(&number, sizeof(number), hash);
-  }
-
-
-  /// hash a block of memory
-  template <unsigned int Unroll>
-  uint32_t fnv1a_unrolled(const void* data, size_t numBytes, uint32_t hash = Seed)
-  {
-#ifndef NDEBUG
-    // unrolling isn't performed when optimizations are disabled
-    return fnv1a(data, numBytes, hash);
-#endif
-    assert(data);
-    const unsigned char* ptr = (const unsigned char*)data;
-    // unroll
-    while (numBytes >= Unroll)
-    {
-      // Unroll is a constant and smart compilers like GCC and Visual C++ unroll properly
-      hash = fnv1a(ptr, Unroll, hash);
-      ptr += Unroll;
-      numBytes -= Unroll;
-    }
-    // process remaining bytes
-    return fnv1a(ptr, numBytes, hash);
-  }
-  /// catch invalid Unroll value
-  template <>
-  inline uint32_t fnv1a_unrolled<0>(const void* data, size_t numBytes, uint32_t hash /*= Seed*/)
-  {
-    return fnv1a(data, numBytes, hash);
-  }
-  /// not unrolled at all
-  template <>
-  inline uint32_t fnv1a_unrolled<1>(const void* data, size_t numBytes, uint32_t hash /*= Seed*/)
-  {
-    return fnv1a(data, numBytes, hash);
-  }
-}
diff --git a/source/ThirdParty/Library/basics/container/CbVectorPool.h b/source/ThirdParty/Library/basics/container/CbVectorPool.h
index 000fe51593997759bee3446501750eb2eb87db8c..569cbba55beb9e563c5fe21c1652cb2fff1bfcbc 100644
--- a/source/ThirdParty/Library/basics/container/CbVectorPool.h
+++ b/source/ThirdParty/Library/basics/container/CbVectorPool.h
@@ -70,7 +70,7 @@ public:
    typedef typename CbVector<T>::size_type  size_type;
    typedef std::vector< value_type >        Pool;
 
-   typedef unsigned int CbVectorKey;
+   typedef std::string CbVectorKey;
    typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
    typedef typename CbVectorMap::iterator CbVectorMapIter;
 
@@ -79,7 +79,7 @@ public:
    CbVectorPool( const size_type& startPoolSize = 20000) //startPoolSize*sizeof(T)/1024/1024 [MB]
       :  poolStartAdress(NULL)
        , nextCbVectorStartIndexInPool(0)
-       , nextCbVectorKey(0)
+       , nextCbVectorKey()
    {
       pool.reserve(startPoolSize);
    }
@@ -95,7 +95,7 @@ public:
 
          //allocator daten reseten
          allocator.ptrVectorPool    = NULL;
-         allocator.key              = 0;
+         allocator.key              = CbVectorKey();
          allocator.startIndexInPool = 0;
 
          //Datenzeiger/-groessen reseten
@@ -155,7 +155,7 @@ public:
          if( this->resizeData(allocator,vec,0,0) )
          {
             allocator.ptrVectorPool    = NULL;
-            allocator.key              = 0;
+            allocator.key              = CbVectorKey();
             allocator.startIndexInPool = 0;
 
             //das Datenzeiger/-groessen reseten wird bereits in resize durchgefuehrt
@@ -294,7 +294,7 @@ protected:
       allocator.dataSizeOf(vec) = dataSize;
 
       //dummDoof nextKey-Generung...
-      if( allocator.key >= this->nextCbVectorKey ) this->nextCbVectorKey = allocator.key + 1;
+      if( allocator.key >= this->nextCbVectorKey ) this->nextCbVectorKey = allocator.key + "1";
 
       return true;
    }
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpi.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpi.h
deleted file mode 100644
index 16d5f8c7f986b9b6832f999be80f6ee5dc81aa76..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpi.h
+++ /dev/null
@@ -1,237 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERMPI_H
-#define TBTRANSMITTERMPI_H
-
-#ifdef VF_MPI
-
-/*=========================================================================*/
-/*  MPI Transmitter                                                        */
-/*                                                                         */
-/**
-This Class provides the base for exception handling.
-Old TbTransmitter was renamed in TbTransmitterCPPB (C++ binding in MPI is deprecated)
-Rewrite from K. Kucher with C binding
-<BR><BR>
-@author <A HREF="mailto:kucher@irmb.tu-bs.de">K. Kucher</A>
-@version 1.0 - 21.11.11
-*/ 
-
-/*
-usage: ...
-*/
-
-#include <iostream>
-#include <mpi.h>
-#include <basics/transmitter/TbTransmitter.h>
-
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorSenderMpiUnblocked
-template< typename Vector  >
-class TbVectorSenderMpiUnblocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorSenderMpiUnblocked(const int& sendTbRank, const int& sendTag, MPI_Comm comm) 
-      : comm(comm), request(MPI_REQUEST_NULL), sendTbRank(sendTbRank), sendTag(sendTag), dataSize(0)    
-   { 
-      //temporaeren vector erstellen um den datentyp zu ermittlen
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for type="+(std::string)typeid(typename Vector::value_type).name()) );
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()   
-   {
-      dataSize = (unsigned int)this->getData().size();
-      //MPI_Isend(&dataSize, 1, MPI_UNSIGNED, sendTbRank, sendTag, comm, &request);
-      MPI_Send(&dataSize, 1, MPI_UNSIGNED, sendTbRank, sendTag, comm);
-   }  
-   void receiveDataSize()   { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   void prepareForSend()    { if(request!=MPI_REQUEST_NULL) MPI_Wait(&request, &status); }
-   void sendData()          { MPI_Isend(&this->getData()[0],(int)this->getData().size(), mpiDataType, sendTbRank, sendTag, comm, &request);  }
-
-   void prepareForReceive() { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   Vector& receiveData()    { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  sendTbRank; }
-   int  getSendTbTag()    const { return  sendTag;    }
-   int  getRecvFromRank() const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   int  getRecvFromTag()  const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   std::string toString()  const { return "TbVectorSenderMpiUnblocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(sendTbRank)+"("+UbSystem::toString(sendTag)+")"; }
-
-protected:
-   MPI_Comm comm;
-   MPI_Request   request;
-   MPI_Datatype  mpiDataType;
-   MPI_Status    status;
-   int sendTbRank, sendTag;
-   unsigned dataSize;
-};
-
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorSenderMpiBlocked
-template< typename Vector  >
-class TbVectorSenderMpiBlocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorSenderMpiBlocked(const int& sendTbRank, const int& sendTag, MPI_Comm comm) 
-      : comm(comm), request(MPI_REQUEST_NULL), sendTbRank(sendTbRank), sendTag(sendTag), dataSize(0)    
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector"+(std::string)typeid(Vector).name()) );
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()   
-   {
-      dataSize = (unsigned int)this->getData().size();
-      MPI_Isend(&dataSize, 1, MPI_UNSIGNED, sendTbRank, sendTag, comm, &request);
-   }  
-   void receiveDataSize()   { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   void sendData()          { MPI_Wait(&request, &status); MPI_Send(&this->getData()[0],(int)this->getData().size(), mpiDataType, sendTbRank, sendTag, comm); }
-
-   void prepareForReceive()  { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   value_type& receiveData() { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  sendTbRank; }
-   int  getSendTbTag()    const { return  sendTag;    }
-   int  getRecvFromRank() const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   int  getRecvFromTag()  const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   std::string toString() const { return "TbVectorSenderMpiBlocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(sendTbRank)+"("+UbSystem::toString(sendTag)+")"; }
-
-protected:
-   MPI_Comm comm;
-   MPI_Request   request;
-   MPI_Datatype  mpiDataType;
-   MPI_Status    status;
-   int sendTbRank, sendTag;
-   unsigned dataSize;
-};
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorReceiverMpiUnblocked
-template<typename Vector  >
-class TbVectorReceiverMpiUnblocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorReceiverMpiUnblocked(const int& receiveFromRank, const int& receiveTag, MPI_Comm comm) 
-      : comm(comm), request(MPI_REQUEST_NULL), receiveFromRank(receiveFromRank), receiveTag(receiveTag)       
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector"+(std::string)typeid(Vector).name()) );
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()     { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   void receiveDataSize()   
-   {
-      unsigned dataSize;
-      MPI_Recv(&dataSize, 1, MPI_UNSIGNED, receiveFromRank, receiveTag, comm, &status);
-      this->getData().resize(dataSize,0.0);
-   }  
-   void sendData()          { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-
-   void prepareForReceive() { MPI_Irecv(&this->getData()[0],(int)this->getData().size(), mpiDataType, receiveFromRank, receiveTag, comm, &request);  }
-   Vector& receiveData()    { MPI_Wait(&request, &status); return this->getData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getSendTbTag()    const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getRecvFromRank() const { return  receiveFromRank; }
-   int  getRecvFromTag()  const { return  receiveTag;      }
-
-   std::string toString() const { return "TbVectorReceiverMpiUnblocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(receiveFromRank)+"("+UbSystem::toString(receiveTag)+")"; }
-
-protected:
-   MPI_Comm comm;
-   MPI_Request   request;
-   MPI_Datatype  mpiDataType;
-   MPI_Status    status;
-   int receiveFromRank, receiveTag;
-};
-
-
-//////////////////////////////////////////////////////////////////////////
-template<typename Vector>
-class TbVectorReceiverMpiBlocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorReceiverMpiBlocked(const int& receiveFromRank, const int& receiveTag, MPI_Comm comm) 
-      : comm(comm), request(MPI_REQUEST_NULL), receiveFromRank(receiveFromRank), receiveTag(receiveTag)
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector+(std::string)typeid(Vector).name()") );
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()     { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   void receiveDataSize()   
-   {
-      unsigned dataSize;
-      MPI_Recv(&dataSize, 1, MPI_UNSIGNED, receiveFromRank, receiveTag, comm, &status);
-      this->getData().resize(dataSize,0.0);
-   }  
-   void sendData()         { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   Vector& receiveData()
-   {
-      MPI_Recv(&this->getData()[0],(int)this->getData().size(), mpiDataType, receiveFromRank, receiveTag, comm, &status);
-      return this->getData();
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getSendTbTag()    const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getRecvFromRank() const { return  receiveFromRank; }
-   int  getRecvFromTag()  const { return  receiveTag;      }
-
-   std::string toString() const { return "TbVectorReceiverMpiBlocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(receiveFromRank)+"("+UbSystem::toString(receiveTag)+")"; }
-
-protected:
-   MPI_Comm comm;
-   MPI_Request   request;
-   MPI_Datatype  mpiDataType;
-   MPI_Status    status;
-   int receiveFromRank, receiveTag;
-};
-
-#endif //VF_MPI
-
-#endif //TBTRANSMITTERMPI_H
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiCPPB.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiCPPB.h
deleted file mode 100644
index 1a08a867cb24be0dbbace7570756a5283daf953b..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiCPPB.h
+++ /dev/null
@@ -1,230 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERMPICPPB_H
-#define TBTRANSMITTERMPICPPB_H
-
-#ifdef VF_MPI
-
-/*=========================================================================*/
-/*  MPI Transmitter                                                        */
-/*                                                                         */
-/**
-This Class provides the base for exception handling.
-<BR><BR>
-@author <A HREF="mailto:muffmolch@gmx.de">S. Freudiger</A>
-@version 1.0 - 08.11.07
-*/ 
-
-/*
-usage: ...
-*/
-
-#include <iostream>
-#include <mpi.h>
-#include <basics/transmitter/TbTransmitter.h>
-
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorSenderMpiUnblocked
-template< typename Vector  >
-class TbVectorSenderMpiUnblocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorSenderMpiUnblocked(const int& sendTbRank, const int& sendTag, MPI::Intracomm comm) 
-      : comm(comm), request(MPI::REQUEST_NULL), sendTbRank(sendTbRank), sendTag(sendTag), dataSize(0)    
-   { 
-      //temporaeren vector erstellen um den datentyp zu ermittlen
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI::DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI::FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI::INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for type="+(std::string)typeid(typename Vector::value_type).name()) );
-   }
-   
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()   
-   {
-      dataSize = (unsigned int)this->getData().size();
-      request = comm.Isend(&dataSize, 1, MPI::UNSIGNED, sendTbRank, sendTag);
-   }  
-   void receiveDataSize()   { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   void prepareForSend()    { if(request!=MPI::REQUEST_NULL) request.Wait(); }
-   void sendData()          { request = comm.Isend(&this->getData()[0],(int)this->getData().size(), mpiDataType, sendTbRank, sendTag);  }
-   
-   void prepareForReceive() { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   Vector& receiveData()    { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  sendTbRank; }
-   int  getSendTbTag()    const { return  sendTag;    }
-   int  getRecvFromRank() const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   int  getRecvFromTag()  const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   std::string toString()  const { return "TbVectorSenderMpiUnblocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(sendTbRank)+"("+UbSystem::toString(sendTag)+")"; }
-
-protected:
-   MPI::Intracomm comm;
-   MPI::Request   request;
-   MPI::Datatype  mpiDataType;
-   int sendTbRank, sendTag;
-   unsigned dataSize;
-};
-
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorSenderMpiBlocked
-template< typename Vector  >
-class TbVectorSenderMpiBlocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorSenderMpiBlocked(const int& sendTbRank, const int& sendTag, MPI::Intracomm comm) 
-      : comm(comm), request(MPI::REQUEST_NULL), sendTbRank(sendTbRank), sendTag(sendTag), dataSize(0)    
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI::DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI::FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI::INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector"+(std::string)typeid(Vector).name()) );
-   }
-   
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()   
-   {
-      dataSize = (unsigned int)this->getData().size();
-      request = comm.Isend(&dataSize, 1, MPI::UNSIGNED, sendTbRank, sendTag);
-   }  
-   void receiveDataSize()   { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   void sendData()          { request.Wait(); comm.Send(&this->getData()[0],(int)this->getData().size(), mpiDataType, sendTbRank, sendTag); }
-   
-   void prepareForReceive()  { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   value_type& receiveData() { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  sendTbRank; }
-   int  getSendTbTag()    const { return  sendTag;    }
-   int  getRecvFromRank() const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-   int  getRecvFromTag()  const { UB_THROW( UbException(UB_EXARGS,"MPIVectorSender sends only") ); }
-
-   std::string toString() const { return "TbVectorSenderMpiBlocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(sendTbRank)+"("+UbSystem::toString(sendTag)+")"; }
-
-protected:
-   MPI::Intracomm comm;
-   MPI::Request   request;
-   MPI::Datatype  mpiDataType;
-   int sendTbRank, sendTag;
-   unsigned dataSize;
-};
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorReceiverMpiUnblocked
-template<typename Vector  >
-class TbVectorReceiverMpiUnblocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorReceiverMpiUnblocked(const int& receiveFromRank, const int& receiveTag, MPI::Intracomm comm) 
-      : comm(comm), request(MPI::REQUEST_NULL), receiveFromRank(receiveFromRank), receiveTag(receiveTag)       
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI::DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI::FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI::INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector"+(std::string)typeid(Vector).name()) );
-   }
-   
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()     { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   void receiveDataSize()   
-   {
-      unsigned dataSize;
-      comm.Recv(&dataSize, 1, MPI::UNSIGNED, receiveFromRank, receiveTag);
-      this->getData().resize(dataSize,0.0);
-   }  
-   void sendData()          { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   
-   void prepareForReceive() { request = comm.Irecv(&this->getData()[0],(int)this->getData().size(), mpiDataType, receiveFromRank, receiveTag);  }
-   Vector& receiveData()    { request.Wait(); return this->getData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getSendTbTag()    const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getRecvFromRank() const { return  receiveFromRank; }
-   int  getRecvFromTag()  const { return  receiveTag;      }
-
-   std::string toString() const { return "TbVectorReceiverMpiUnblocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(receiveFromRank)+"("+UbSystem::toString(receiveTag)+")"; }
-
-protected:
-   MPI::Intracomm comm;
-   MPI::Request   request;
-   MPI::Datatype  mpiDataType;
-   int receiveFromRank, receiveTag;
-};
-
-
-//////////////////////////////////////////////////////////////////////////
-template<typename Vector>
-class TbVectorReceiverMpiBlocked : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;
-
-public:
-   TbVectorReceiverMpiBlocked(const int& receiveFromRank, const int& receiveTag, MPI::Intracomm comm) 
-      : comm(comm), request(MPI::REQUEST_NULL), receiveFromRank(receiveFromRank), receiveTag(receiveTag)
-   { 
-      if     ( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI::DOUBLE;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI::FLOAT;
-      else if( (std::string)typeid(typename Vector::value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI::INT;
-      else UB_THROW( UbException(UB_EXARGS,"no MpiDataType for Vector+(std::string)typeid(Vector).name()") );
-   }
-   
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()     { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   void receiveDataSize()   
-   {
-      unsigned dataSize;
-      comm.Recv(&dataSize, 1, MPI::UNSIGNED, receiveFromRank, receiveTag);
-      this->getData().resize(dataSize,0.0);
-   }  
-   void sendData()         { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   Vector& receiveData()
-   {
-      comm.Recv(&this->getData()[0],(int)this->getData().size(), mpiDataType, receiveFromRank, receiveTag);
-      return this->getData();
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getSendTbTag()    const { UB_THROW( UbException(UB_EXARGS,"MPIVectorReceiver receives only") ); }
-   int  getRecvFromRank() const { return  receiveFromRank; }
-   int  getRecvFromTag()  const { return  receiveTag;      }
-
-   std::string toString() const { return "TbVectorReceiverMpiBlocked<"+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name()+"> > to rank (tag)"+UbSystem::toString(receiveFromRank)+"("+UbSystem::toString(receiveTag)+")"; }
-
-protected:
-   MPI::Intracomm comm;
-   MPI::Request   request;
-   MPI::Datatype  mpiDataType;
-   int receiveFromRank, receiveTag;
-};
-
-#endif //VF_MPI
-
-#endif //TBTRANSMITTERMPI_H
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool.h
index dd406ac49c4c49bd5245ea5a483bffb40fbbf75b..2ad1f5ad6829524545d5036153aa8b0323bb25bb 100644
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool.h
+++ b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool.h
@@ -45,7 +45,7 @@ public:
    typedef boost::shared_ptr< TbCbVectorMpiPool< T > > MpiPoolPtr;
 
    //////////////////////////////////////////////////////////////////////////
-   typedef std::map<unsigned int, MpiPoolPtr >      MpiPoolPtrMap;
+   typedef std::map<std::string, MpiPoolPtr >      MpiPoolPtrMap;
    typedef typename MpiPoolPtrMap::iterator MpiPoolPtrMapIter;
 
    //da BasisKlasse templateKlasse ist MUSS man hier die typedefs nochmal wiederholen!
@@ -53,7 +53,7 @@ public:
    typedef typename CbVector<T>::size_type  size_type;
    typedef std::vector< value_type >        Pool;
 
-   typedef unsigned int CbVectorKey;
+   typedef std::string CbVectorKey;
    typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
    typedef typename CbVectorMap::iterator CbVectorMapIter;
 
@@ -153,7 +153,7 @@ protected:
       , counterSend(0)                             
       , comm(comm)                                 
       , receiveRequest(MPI_REQUEST_NULL)
-      , sendRequest(MPI_REQUEST_NULL)
+      //, sendRequest(MPI_REQUEST_NULL)
       , mpiRemoteRank(mpiRemoteRank)               
       , mpiTag(mpiTag)                              
    {
@@ -161,6 +161,11 @@ protected:
       else if( (std::string)typeid(value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
       else if( (std::string)typeid(value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
       else throw UbException(UB_EXARGS,"no MpiDataType for T"+(std::string)typeid(T).name());
+
+      for (int i = 0; i < 3; i++)
+      {
+         sendRequest[i] = MPI_REQUEST_NULL;
+      }
    }
 
 public:
@@ -192,16 +197,23 @@ protected:
          if(this->nextCbVectorStartIndexInPool != this->pool.size())  throw UbException(UB_EXARGS,"an dieser Stelle sollten nextStartIndex und pool.size() identisch sein!!!");
          for(CbVectorMapIter it = this->cbVectorMap.begin(); it!=this->cbVectorMap.end(); ++it)
          {
-            CbVectorKey vectorKey=0;
+            CbVectorKey vectorKey;
             size_type   dataSize=0, startIndexInPool=0;
             this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
             if(it->first != vectorKey) throw UbException(UB_EXARGS,"key mismatch!");
 
-            tmpSendOrderVec[index++] = (unsigned)vectorKey;         //vectorKey == allocator.getAllocatorKey()
+            tmpSendOrderKeyVec += vectorKey;         //vectorKey == allocator.getAllocatorKey()
+            tmpSendOrderVec[index++] = (unsigned)vectorKey.length();
             tmpSendOrderVec[index++] = (unsigned)startIndexInPool;  //startIndex in poolVector
             tmpSendOrderVec[index++] = (unsigned)dataSize;          //dataSize
          }
-         MPI_Isend(&tmpSendOrderVec[0],(int)tmpSendOrderVec.size(), MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &sendRequest);
+         
+         MPI_Isend(&tmpSendOrderVec[0],(int)tmpSendOrderVec.size(), MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &sendRequest[0]);
+         
+         tmpSendOrderKeyVecLength = (unsigned)tmpSendOrderKeyVec.length();
+         MPI_Isend(&tmpSendOrderKeyVecLength,1, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &sendRequest[1]);
+         MPI_Isend((char *)tmpSendOrderKeyVec.c_str(),tmpSendOrderKeyVecLength, MPI_CHAR, mpiRemoteRank, mpiTag, comm, &sendRequest[2]);
+
 
          counterSendDataOrder=0;
 
@@ -228,21 +240,31 @@ protected:
          std::vector< unsigned > tmpRecvOrderVec;
          tmpRecvOrderVec.resize(nofElements);
 
+         std::vector<char> tmpRecvOrderKeyVec;
+        
          //MPI_Status status;
          MPI_Recv(&tmpRecvOrderVec[0], nofElements, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
 
+         unsigned rcount;
+         MPI_Recv(&rcount, 1, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
+         tmpRecvOrderKeyVec.resize(rcount);
+         MPI_Recv(&tmpRecvOrderKeyVec[0], rcount, MPI_CHAR, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
+
          if(nofElements!=(unsigned)tmpRecvOrderVec.size())
             throw UbException(UB_EXARGS,"error... vec size stimmt nicht");
 
          unsigned index = 0;
+         size_type index2 = 0;
          this->nextCbVectorStartIndexInPool = tmpRecvOrderVec[index++]; //= laenge des vectors
          this->pool.resize(this->nextCbVectorStartIndexInPool);
          CbVectorMapIter it = this->cbVectorMap.begin();
          for(/*index*/; index<nofElements; index+=3, ++it)
          {
-            CbVectorKey vectorKey        = (CbVectorKey)tmpRecvOrderVec.at(index  );
+            size_type   vectorKeyLength  = (size_type)tmpRecvOrderVec.at(index  );
             size_type   startIndexInPool = (size_type)tmpRecvOrderVec.at(index+1);
             size_type   dataSize         = (size_type)tmpRecvOrderVec.at(index+2);
+            CbVectorKey vectorKey = CbVectorKey(&tmpRecvOrderKeyVec[index2], vectorKeyLength);
+            index2 += vectorKeyLength;
 
             //if(it==this->cbVectorMap.end() || it->first != vectorKey ) 
                //throw UbException(UB_EXARGS, "entweder hat map nicht die gleiche reihenfolge oder vectorKey = "+UbSystem::toString(vectorKey)+" nicht vorhanden");
@@ -252,6 +274,7 @@ protected:
                throw UbException(UB_EXARGS, "vectorKey = "+UbSystem::toString(vectorKey)+" nicht vorhanden it->first =" + UbSystem::toString(it->first));
 
             this->setCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
+            
          }
          if(it!=this->cbVectorMap.end())
             throw UbException(UB_EXARGS,"error... in der map sind scheinbar noch weiter elemente vorhanden, die es auf der send seite nicht gibt...");
@@ -271,7 +294,8 @@ protected:
       if(counterPrepareForSend==0)
       {
          UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&sendRequest, MPI_STATUS_IGNORE);
+         //if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&sendRequest, MPI_STATUS_IGNORE);
+         if(sendRequest[2] != MPI_REQUEST_NULL) MPI_Waitall(3, sendRequest, MPI_STATUS_IGNORE);
          UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
       }
 
@@ -396,10 +420,13 @@ protected:
    size_type counterSend;
 
    std::vector< unsigned > tmpSendOrderVec; //wird zur temp speicherung der anordnung benoetigt
+   std::string tmpSendOrderKeyVec;
+   unsigned tmpSendOrderKeyVecLength;
 
    MPI_Comm     comm;
    MPI_Request  receiveRequest;
-   MPI_Request  sendRequest;
+   //MPI_Request  sendRequest;
+   MPI_Request  sendRequest[3];
    //MPI_Status   sendStatus;
    //MPI_Status   receiveStatus;
    MPI_Datatype mpiDataType;
@@ -424,7 +451,7 @@ public:
    typedef CbVector< T > value_type;
 
 public:
-   TbCbVectorSenderMpiPool(unsigned int cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
+   TbCbVectorSenderMpiPool(std::string cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
       : mpiVectorPool(mpiVectorPool)
    { 
       this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey,this->mpiVectorPool) );
@@ -467,7 +494,7 @@ public:
    typedef CbVector< T > value_type;   
 
 public:
-   TbCbVectorReceiverMpiPool(unsigned int cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
+   TbCbVectorReceiverMpiPool(std::string cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
       : mpiVectorPool(mpiVectorPool)
    { 
       this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey, this->mpiVectorPool) );
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool2.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool2.h
deleted file mode 100644
index e09d9f4c295be8f1e95ed84eea90389f7fe22f98..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool2.h
+++ /dev/null
@@ -1,453 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERMPIPOOL2_H
-#define TBTRANSMITTERMPIPOOL2_H
-
-#ifdef VF_MPI
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-#include <vector>
-#include <map>
-
-#include <mpi.h>
-
-#include <basics/transmitter/TbTransmitter.h>
-#include <basics/container/CbVector.h>
-#include <basics/container/CbVectorPool.h>
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//TbCbVectorMpiPoolSender/Receiver
-//diese verschicken immer einen VectorPool. Letztlich einen langen vector,
-//der eigentlich aus vielen kleinen besteht
-//jeder MpiPoolVector hat einen pointer auf die startadresse in diesem vector
-//die informationen werden im TbMpiVectorPool verwaltet
-//MpiPoolVector verhaelt sich nach aussen hin mit einschraenkungen wie ein std::vector
-//und kann somit bei den vector connector verwendet werden
-//man kann die klassen theoretisch verallgemeinern.
-
-template<typename T> class TbCbVectorSenderMpiPool2;
-template<typename T> class TbCbVectorReceiverMpiPool2;
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorMpiPool2 : public CbVectorPool<T>
-{
-public:
-   typedef boost::shared_ptr< TbCbVectorMpiPool2< T > > MpiPoolPtr;
-
-   //////////////////////////////////////////////////////////////////////////
-   typedef std::map< int, MpiPoolPtr >      MpiPoolPtrMap;
-   typedef typename MpiPoolPtrMap::iterator MpiPoolPtrMapIter;
-
-   //da BasisKlasse templateKlasse ist MUSS man hier die typedefs nochmal wiederholen!
-   typedef typename CbVector<T>::value_type value_type;
-   typedef typename CbVector<T>::size_type  size_type;
-   typedef std::vector< value_type >        Pool;
-
-   typedef unsigned CbVectorKey;
-   typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
-   typedef typename CbVectorMap::iterator CbVectorMapIter;
-
-   //////////////////////////////////////////////////////////////////////////
-   friend class TbCbVectorSenderMpiPool2< T >; 
-   friend class TbCbVectorReceiverMpiPool2< T >; 
-
-protected:
-   //////////////////////////////////////////////////////////////////////////
-   static MpiPoolPtrMap poolMap;
-public:
-   //////////////////////////////////////////////////////////////////////////
-   //STATIC MEMBERS
-   //////////////////////////////////////////////////////////////////////////
-   //createTbCbVectorMpiPool:
-   // poolKey      : Schluessel fuer eindeutige Indizierung in Map
-   // mpiRemoteRank: mpi-rank des Empfaengers/Senders
-   // mpiTag       : mpi-tag mit dem empfangen/gesendet wird
-static MpiPoolPtr createTbCbVectorMpiPool(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI_Comm comm, const size_type& startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-   {
-      if( poolMap.find(poolKey)!=poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"es ist bereits ein Pool mit dem key vorhanden!!!");
-      }
-      //pool erstellen
-      MpiPoolPtr mpiPool(new TbCbVectorMpiPool2<T>(poolKey, mpiRemoteRank, mpiTag, comm, startPoolSize) ); 
-
-      //pool "speichern"
-      TbCbVectorMpiPool2< value_type >::poolMap[poolKey] = mpiPool;
-
-      return mpiPool; 
-   }
-   static void deleteTbCbVectorMpiPool(const int& poolKey)
-   {
-      MpiPoolPtrMapIter it = TbCbVectorMpiPool2< value_type >::poolMap.find(poolKey);
-      if( it==poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"kein Pool mit dem key vorhanden");
-      }
-      TbCbVectorMpiPool2< value_type >::poolMap.erase(it);
-   }
-   /*==================================================================*/
-   static MpiPoolPtr getTbCbVectorMpiPool(const int& poolKey)
-   {
-      MpiPoolPtrMapIter it;
-      if( (it=TbCbVectorMpiPool2< T >::poolMap.find(poolKey))!=TbCbVectorMpiPool2< T >::poolMap.end() ) 
-      {
-         return it->second;
-      }
-      return MpiPoolPtr();
-   }
-   /*==================================================================*/
-   static std::string getInfoString()
-   {
-      std::stringstream out;  
-      out<<"TbCbVectorMpiPool<"<< typeid( T ).name()  << ") - Info:"<<std::endl;
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-         out<<"pool with key("            <<std::setw(15)<<it->first<<") "
-         <<"stores "                  <<std::setw(12)<<it->second->getNofStoredVectors() <<" vectors " 
-         <<", elements to transfer = "<<std::setw(15)<<it->second->getPoolSize() 
-         <<" ( "<< it->second->getPoolSize()*sizeof( T ) / ( 1024.0 * 1024.0 ) << " MB )" <<std::endl;
-      return out.str();
-   }
-   /*==================================================================*/
-   // checks if all vectors have one to one pool-entries
-   static bool consistencyCheck()
-   {
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-      {
-         if( !it->second-> CbVectorPool<T>::consistencyCheck() ) 
-         {
-            return false;         
-         }
-      }
-
-      return true;
-   }
-
-protected:
-   //////////////////////////////////////////////////////////////////////////
-TbCbVectorMpiPool2(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI_Comm comm, const size_type& startPoolSize )
-      :    CbVectorPool< value_type >( startPoolSize ) 
-      , poolKey(poolKey)                           
-      , nofStoredVectors(0) //=Anzahl an Vectoren im Pool, wird bei send/receiveDataOrder gesetzt
-      , counterPrepareReceiveDataOrder(0)          
-      , counterSendDataOrder(0)                    
-      , counterReceiveDataOrder(0)                 
-      , counterPrepareForReceive(0)                
-      , counterReceive(0)                          
-      , counterPrepareForSend(0)                   
-      , counterSend(0)                             
-      , comm(comm)                                 
-      , receiveRequest(MPI_REQUEST_NULL)
-      , sendRequest(MPI_REQUEST_NULL)
-      , mpiRemoteRank(mpiRemoteRank)               
-      , mpiTag(mpiTag)
-   {
-      if     ( (std::string)typeid(value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else throw UbException(UB_EXARGS,"no MpiDataType for T"+(std::string)typeid(T).name());
-   }
-
-public:
-   /*==================================================================*/
-   //returns key of Pool in MpiPoolMap
-   int  getPoolKey()    const { return  this->poolKey;       }
-   /*==================================================================*/
-   //returns rank of process pool data will be send to/received from
-   int  getRemoteRank() const { return  this->mpiRemoteRank; }
-   /*==================================================================*/
-   //returns tag of process pool data will be send to/received from
-   int  getRemoteTag()  const { return  this->mpiTag;        }
-
-protected:
-   /*==================================================================*/
-   void sendDataOrder()
-   {
-      counterSendDataOrder++;
-      if(counterSendDataOrder==this->cbVectorMap.size())
-      {
-         //allg.: bei MPI muss man darauf achten, dass bei unblocked operationen die puffer (aus dem oder in den 
-         //geschrieben wird auch noch vorhanden sind!!! wuerde man hier z.B. einen lokalen vector mit Isend() los-
-         //schicken, dann wurde der scope verlassen werden und der vector evtl geloescht werden, bevor mpi den
-         //vorgang abgeschlossen hat!!! ->  tmpOrderVec ist class-member!!!
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1;
-         tmpSendOrderVec.resize(nofElements);//std::vector< unsigned > vec(nofElements);
-         unsigned index = 0;
-         tmpSendOrderVec[index++] = (unsigned)this->pool.size(); //= laenge des vectors
-         if(this->nextCbVectorStartIndexInPool != this->pool.size())  throw UbException(UB_EXARGS,"an dieser Stelle sollten nextStartIndex und pool.size() identisch sein!!!");
-         for(CbVectorMapIter it = this->cbVectorMap.begin(); it!=this->cbVectorMap.end(); ++it)
-         {
-            CbVectorKey vectorKey=0;
-            size_type   dataSize=0, startIndexInPool=0;
-            this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-            if(it->first != vectorKey) throw UbException(UB_EXARGS,"key mismatch!");
-
-            tmpSendOrderVec[index++] = (unsigned)vectorKey;         //vectorKey == allocator.getAllocatorKey()
-            tmpSendOrderVec[index++] = (unsigned)startIndexInPool;  //startIndex in poolVector
-            tmpSendOrderVec[index++] = (unsigned)dataSize;          //dataSize
-         }
-
-         MPI_Isend(&tmpSendOrderVec[0],(int)tmpSendOrderVec.size(), MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &sendRequest);
-
-         counterSendDataOrder=0;
-
-         nofStoredVectors = this->cbVectorMap.size();
-
-#ifdef DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   /*==================================================================*/
-   void receiveDataOrder()
-   {
-      counterReceiveDataOrder++;
-      if(counterReceiveDataOrder==this->cbVectorMap.size())
-      {
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1; //map MUSS auf beiden seiten gleich gross sein, sonst hat man ein grundsaetzliches problem ;-)
-
-         std::vector< unsigned > tmpRecvOrderVec;
-         tmpRecvOrderVec.resize(nofElements);
-
-         MPI_Irecv(&tmpRecvOrderVec[0], nofElements, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &receiveRequest);
-         //MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-
-         //if(nofElements!=(unsigned)tmpRecvOrderVec.size())
-         //   throw UbException(UB_EXARGS,"error... vec size stimmt nicht");
-
-         //unsigned index = 0;
-         //this->nextCbVectorStartIndexInPool = tmpRecvOrderVec[index++]; //= laenge des vectors
-         //this->pool.resize(this->nextCbVectorStartIndexInPool);
-         //CbVectorMapIter it = this->cbVectorMap.begin();
-         //for(/*index*/; index<nofElements; index+=3, ++it)
-         //{
-         //   CbVectorKey vectorKey        = (CbVectorKey)tmpRecvOrderVec.at(index  );
-         //   size_type   startIndexInPool = (size_type)tmpRecvOrderVec.at(index+1);
-         //   size_type   dataSize         = (size_type)tmpRecvOrderVec.at(index+2);
-
-         //   if(it==this->cbVectorMap.end() || it->first != vectorKey ) 
-         //      throw UbException(UB_EXARGS,"entweder hat map nicht die gleiche reihenfolge oder vectorKey nicht vorhanden");
-
-         //   this->setCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-         //}
-         //if(it!=this->cbVectorMap.end())
-         //   throw UbException(UB_EXARGS,"error... in der map sind scheinbar noch weiter elemente vorhanden, die es auf der send seite nicht gibt...");
-
-         counterReceiveDataOrder = 0;
-         nofStoredVectors = this->cbVectorMap.size();
-
-#ifdef DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   //////////////////////////////////////////////////////////////////////////
-   void saveDataOrder()
-   {
-      if(counterPrepareForSend==0)
-      {
-         if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-      }
-
-      counterPrepareForSend++;
-
-      if(counterPrepareForSend==nofStoredVectors)
-      {
-         counterPrepareForSend=0;  
-      }
-   }
-   /*==================================================================*/
-   void prepareForSendData()
-   {
-      //da sendDataOrder einen request verwendet muss man hier immer abfragen
-      if(counterPrepareForSend==0)
-      {
-         if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&sendRequest, MPI_STATUS_IGNORE);
-      }
-
-      counterPrepareForSend++;
-
-      if(counterPrepareForSend==nofStoredVectors)
-      {
-         counterPrepareForSend=0;  
-      }
-
-   }
-   /*==================================================================*/
-   void sendData()
-   {
-      //A - non blocking
-      //der LETZTE is entscheidend 
-      counterSend++;
-      if(counterSend==nofStoredVectors)
-      {
-#ifdef DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-         MPI_Isend(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, &sendRequest);
-////////////////////////////////////////////////////////////////////////////////////////////
-         counterSend=0;
-      }                           
-   }
-   /*==================================================================*/
-   void prepareForReceiveData()
-   {
-
-   }
-   /*==================================================================*/
-   void receiveData()
-   {
-      //A - non blocking
-      //sobald der ERSTE reinkommt muss man warten, bis received wurde!!!
-      //denn erst anschliessend stehen die empfangenen daten zur verfuegung
-      //if(counterReceive==0)
-      //{
-      //   MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-      //}
-      //counterReceive++;
-      //if(counterReceive==this->nofStoredVectors) //alle receiver waren hier
-      //{
-      //   counterReceive=0;
-      //}
-
-      counterPrepareForReceive++;
-      if(counterPrepareForReceive==this->nofStoredVectors)
-      {
-#ifdef DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-         MPI_Irecv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, &receiveRequest);
-         MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-         counterPrepareForReceive=0;
-      }
-   }
-
-protected:
-   int       poolKey; //eindeutiger schluessel fuer pool
-   size_type nofStoredVectors;
-
-   size_type counterPrepareReceiveDataOrder;
-   size_type counterSendDataOrder;
-   size_type counterReceiveDataOrder;
-   size_type counterPrepareForReceive;
-   size_type counterReceive;
-   size_type counterPrepareForSend;
-   size_type counterSend;
-
-   std::vector< unsigned > tmpSendOrderVec; //wird zur temp speicherung der anordnung benoetigt
-
-   MPI_Comm     comm;
-   MPI_Request  receiveRequest;
-   MPI_Request  sendRequest;
-   MPI_Datatype mpiDataType;
-   int mpiRemoteRank, mpiTag;
-
-#ifdef DEBUG
-   T* orgPoolVectorStartPointer;
-#endif
-};
-
-template<typename T>
-typename TbCbVectorMpiPool2<T>::MpiPoolPtrMap TbCbVectorMpiPool2<T>::poolMap;
-
-
-//////////////////////////////////////////////////////////////////////////
-//  TbSenderMpiPool
-//////////////////////////////////////////////////////////////////////////
-template<typename T>
-class TbCbVectorSenderMpiPool2 : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   TbCbVectorSenderMpiPool2(const unsigned int& cbVectorKey, TbCbVectorMpiPool2< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey,this->mpiVectorPool) );
-   }
-   ~TbCbVectorSenderMpiPool2()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPool2< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()          { this->mpiVectorPool->sendDataOrder(); }
-   void receiveDataSize()       { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }   
-   CbVector< T >& receiveData() { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }
-   void prepareForSend()        { this->mpiVectorPool->prepareForSendData(); }
-   void sendData()              { this->mpiVectorPool->sendData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  this->mpiVectorPool->getRemoteRank(); }
-   int  getSendTbTag()    const { return  this->mpiVectorPool->getRemoteTag();  }
-   int  getRecvFromRank() const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-   int  getRecvFromTag()  const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-
-   std::string toString() const { return "TbCbVectorSenderMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getSendTbRank())+"("+UbSystem::toString(getSendTbTag())+")"; }
-
-protected:
-   TbCbVectorMpiPool2<T>* mpiVectorPool;
-};
-
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorReceiverMpiPool2 : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   TbCbVectorReceiverMpiPool2(const unsigned int& cbVectorKey, TbCbVectorMpiPool2< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey, this->mpiVectorPool) );
-   }
-   ~TbCbVectorReceiverMpiPool2()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPool2< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()      { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only");  }   
-   void receiveDataSize()   { this->mpiVectorPool->receiveDataOrder(); }  
-   void sendData()          { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   void prepareForReceive() { this->mpiVectorPool->prepareForReceiveData(); }
-   CbVector< T >& receiveData()
-   { 
-      this->mpiVectorPool->receiveData();
-      return this->getData();
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getSendTbTag()    const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getRecvFromRank() const { return  this->mpiVectorPool->getRemoteRank();  }
-   int  getRecvFromTag()  const { return  this->mpiVectorPool->getRemoteTag();  }
-
-   std::string toString() const { return "TbCbVectorReceiverMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getRecvFromRank())+"("+UbSystem::toString(getRecvFromTag())+")"; }
-
-protected:
-   TbCbVectorMpiPool2<T>* mpiVectorPool;
-};
-
-#endif //VF_MPI
-
-#endif //TBTRANSMITTERMPIPOOL_H
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool3.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool3.h
deleted file mode 100644
index 1666ecf080a9a4a1dceb22108eed952dddd1e0b0..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPool3.h
+++ /dev/null
@@ -1,530 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERMPIPOOL_H
-#define TBTRANSMITTERMPIPOOL_H
-
-#ifdef VF_MPI
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-#include <vector>
-#include <map>
-
-#include <mpi.h>
-
-#include <basics/transmitter/TbTransmitter.h>
-#include <basics/container/CbVector.h>
-#include <basics/container/CbVectorPool.h>
-
-#include <boost/shared_ptr.hpp>
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//TbCbVectorMpiPoolSender/Receiver
-//diese verschicken immer einen VectorPool. Letztlich einen langen vector,
-//der eigentlich aus vielen kleinen besteht
-//jeder MpiPoolVector hat einen pointer auf die startadresse in diesem vector
-//die informationen werden im TbMpiVectorPool verwaltet
-//MpiPoolVector verhaelt sich nach aussen hin mit einschraenkungen wie ein std::vector
-//und kann somit bei den vector connector verwendet werden
-//man kann die klassen theoretisch verallgemeinern.
-
-template<typename T> class TbCbVectorSenderMpiPool;
-template<typename T> class TbCbVectorReceiverMpiPool;
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorMpiPool : public CbVectorPool<T>
-{
-public:
-   typedef boost::shared_ptr< TbCbVectorMpiPool< T > > MpiPoolPtr;
-
-   //////////////////////////////////////////////////////////////////////////
-   typedef std::map< std::string, MpiPoolPtr >      MpiPoolPtrMap;
-   typedef typename MpiPoolPtrMap::iterator MpiPoolPtrMapIter;
-
-   //da BasisKlasse templateKlasse ist MUSS man hier die typedefs nochmal wiederholen!
-   typedef typename CbVector<T>::value_type value_type;
-   typedef typename CbVector<T>::size_type  size_type;
-   typedef std::vector< value_type >        Pool;
-
-   typedef std::string CbVectorKey;
-   typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
-   typedef typename CbVectorMap::iterator CbVectorMapIter;
-
-   //////////////////////////////////////////////////////////////////////////
-   friend class TbCbVectorSenderMpiPool< T >; 
-   friend class TbCbVectorReceiverMpiPool< T >; 
-
-protected:
-   //////////////////////////////////////////////////////////////////////////
-   static MpiPoolPtrMap poolMap;
-public:
-   //////////////////////////////////////////////////////////////////////////
-   //STATIC MEMBERS
-   //////////////////////////////////////////////////////////////////////////
-   //createTbCbVectorMpiPool:
-   // poolKey      : Schluessel fuer eindeutige Indizierung in Map
-   // mpiRemoteRank: mpi-rank des Empfaengers/Senders
-   // mpiTag       : mpi-tag mit dem empfangen/gesendet wird
-   static MpiPoolPtr createTbCbVectorMpiPool(CbVectorKey poolKey, int mpiRemoteRank, int mpiTag, MPI_Comm comm, size_type startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-
-   {
-      if( poolMap.find(poolKey)!=poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"es ist bereits ein Pool mit dem key vorhanden!!!");
-      }
-
-      //pool erstellen
-      MpiPoolPtr mpiPool(new TbCbVectorMpiPool<T>(poolKey, mpiRemoteRank, mpiTag, comm, startPoolSize) ); 
-
-      //pool "speichern"
-      TbCbVectorMpiPool< value_type >::poolMap[poolKey] = mpiPool;
-
-      return mpiPool; 
-   }
-   static void deleteTbCbVectorMpiPool(CbVectorKey poolKey)
-   {
-      MpiPoolPtrMapIter it = TbCbVectorMpiPool< value_type >::poolMap.find(poolKey);
-      if( it==poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"kein Pool mit dem key vorhanden");
-      }
-      TbCbVectorMpiPool< value_type >::poolMap.erase(it);
-   }
-   /*==================================================================*/
-   static MpiPoolPtr getTbCbVectorMpiPool(CbVectorKey poolKey)
-   {
-      MpiPoolPtrMapIter it;
-      if( (it=TbCbVectorMpiPool< T >::poolMap.find(poolKey))!=TbCbVectorMpiPool< T >::poolMap.end() ) 
-      {
-         return it->second;
-      }
-      return MpiPoolPtr();
-   }
-   /*==================================================================*/
-   static std::string getInfoString()
-   {
-      std::stringstream out;  
-      out<<"TbCbVectorMpiPool<"<< typeid( T ).name()  << ") - Info:"<<std::endl;
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-         out<<"pool with key("            <<std::setw(15)<<it->first<<") "
-         <<"stores "                  <<std::setw(12)<<it->second->getNofStoredVectors() <<" vectors " 
-         <<", elements to transfer = "<<std::setw(15)<<it->second->getPoolSize() 
-         <<" ( "<< it->second->getPoolSize()*sizeof( T ) / ( 1024.0 * 1024.0 ) << " MB )" <<std::endl;
-      return out.str();
-   }
-   /*==================================================================*/
-   // checks if all vectors have one to one pool-entries
-   static bool consistencyCheck()
-   {
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-      {
-         if( !it->second-> CbVectorPool<T>::consistencyCheck() ) 
-         {
-            return false;         
-         }
-      }
-
-      return true;
-   }
-   //////////////////////////////////////////////////////////////////////////
-   static void eraseMap()
-   {
-      poolMap.clear();
-   }
-protected:
-   //////////////////////////////////////////////////////////////////////////
-   TbCbVectorMpiPool(CbVectorKey poolKey, int mpiRemoteRank, int mpiTag, MPI_Comm comm, size_type startPoolSize )
-      :    CbVectorPool< value_type >( startPoolSize ) 
-      , poolKey(poolKey)                           
-      , nofStoredVectors(0) //=Anzahl an Vectoren im Pool, wird bei send/receiveDataOrder gesetzt
-      , counterPrepareReceiveDataOrder(0)          
-      , counterSendDataOrder(0)                    
-      , counterReceiveDataOrder(0)                 
-      , counterPrepareForReceive(0)                
-      , counterReceive(0)                          
-      , counterPrepareForSend(0)                   
-      , counterSend(0)                             
-      , comm(comm)                                 
-      , receiveRequest(MPI_REQUEST_NULL)
-      , sendRequest(MPI_REQUEST_NULL)
-      , mpiRemoteRank(mpiRemoteRank)               
-      , mpiTag(mpiTag)                              
-   {
-      if     ( (std::string)typeid(value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else throw UbException(UB_EXARGS,"no MpiDataType for T"+(std::string)typeid(T).name());
-   }
-
-public:
-   /*==================================================================*/
-   //returns key of Pool in MpiPoolMap
-   CbVectorKey  getPoolKey()    const { return  this->poolKey;       }
-   /*==================================================================*/
-   //returns rank of process pool data will be send to/received from
-   int  getRemoteRank() const { return  this->mpiRemoteRank; }
-   /*==================================================================*/
-   //returns tag of process pool data will be send to/received from
-   int  getRemoteTag()  const { return  this->mpiTag;        }
-
-protected:
-   /*==================================================================*/
-   void sendDataOrder()
-   {
-      counterSendDataOrder++;
-      if(counterSendDataOrder==this->cbVectorMap.size())
-      {
-         //allg.: bei MPI muss man darauf achten, dass bei unblocked operationen die puffer (aus dem oder in den 
-         //geschrieben wird auch noch vorhanden sind!!! wuerde man hier z.B. einen lokalen vector mit Isend() los-
-         //schicken, dann wurde der scope verlassen werden und der vector evtl geloescht werden, bevor mpi den
-         //vorgang abgeschlossen hat!!! ->  tmpOrderVec ist class-member!!!
-         //unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1;
-         //tmpSendOrderVec.resize(nofElements);//std::vector< unsigned > vec(nofElements);
-         //unsigned index = 0;
-         //tmpSendOrderVec[index++] = (unsigned)this->pool.size(); //= laenge des vectors
-         tmpSendOrderVec = "";
-         tmpSendOrderVec+= UbSystem::toString(this->pool.size()+"#";
-         if(this->nextCbVectorStartIndexInPool != this->pool.size())  throw UbException(UB_EXARGS,"an dieser Stelle sollten nextStartIndex und pool.size() identisch sein!!!");
-         
-         for(CbVectorMapIter it = this->cbVectorMap.begin(); it!=this->cbVectorMap.end(); ++it)
-         {
-            //CbVectorKey vectorKey=0;
-            //size_type   dataSize=0, startIndexInPool=0;
-            //this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-            //if(it->first != vectorKey) throw UbException(UB_EXARGS,"key mismatch!");
-
-            //tmpSendOrderVec[index++] = (unsigned)vectorKey;         //vectorKey == allocator.getAllocatorKey()
-            //tmpSendOrderVec[index++] = (unsigned)startIndexInPool;  //startIndex in poolVector
-            //tmpSendOrderVec[index++] = (unsigned)dataSize;          //dataSize
-
-            CbVectorKey vectorKey = "";
-            size_type   dataSize = 0, startIndexInPool = 0;
-            this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize);
-            if (it->first != vectorKey) throw UbException(UB_EXARGS, "key mismatch!");
-            str += vectorKey+"#"+UbSystem::toString(startIndexInPool)+"#"+UbSystem::toString(dataSize);
-            
-         }
-
-         int vsize = tmpSendOrderVec.length();
-         MPI_Isend(&vsize, 1, MPI_INT, mpiRemoteRank, mpiTag, comm, &sendRequest[0]);
-
-         MPI_Isend(&tmpSendOrderVec.c_str(), vsize, MPI_CHAR, mpiRemoteRank, mpiTag, comm, &sendRequest[1]);
-
-         counterSendDataOrder=0;
-
-         nofStoredVectors = this->cbVectorMap.size();
-
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendDataOrder()"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-
-#ifdef _DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   /*==================================================================*/
-   void receiveDataOrder()
-   {
-      counterReceiveDataOrder++;
-      if(counterReceiveDataOrder==this->cbVectorMap.size())
-      {
-         //receiveRequest.Wait();
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1; //map MUSS auf beiden seiten gleich gross sein, sonst hat man ein grundsaetzliches problem ;-)
-
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveDataOrder()"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-
-         std::vector< unsigned > tmpRecvOrderVec;
-         tmpRecvOrderVec.resize(nofElements);
-
-         //MPI_Status status;
-         //MPI_Recv(&tmpRecvOrderVec[0], nofElements, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
-
-         MPI_Irecv(&rbuf.blocksSize, 1, MPI_INT, nProcessID, 0, mpi_comm, &request[rcount]);
-
-         if(nofElements!=(unsigned)tmpRecvOrderVec.size())
-            throw UbException(UB_EXARGS,"error... vec size stimmt nicht");
-
-         unsigned index = 0;
-         this->nextCbVectorStartIndexInPool = tmpRecvOrderVec[index++]; //= laenge des vectors
-         this->pool.resize(this->nextCbVectorStartIndexInPool);
-         CbVectorMapIter it = this->cbVectorMap.begin();
-         for(/*index*/; index<nofElements; index+=3, ++it)
-         {
-            CbVectorKey vectorKey        = (CbVectorKey)tmpRecvOrderVec.at(index  );
-            size_type   startIndexInPool = (size_type)tmpRecvOrderVec.at(index+1);
-            size_type   dataSize         = (size_type)tmpRecvOrderVec.at(index+2);
-
-            //if(it==this->cbVectorMap.end() || it->first != vectorKey ) 
-               //throw UbException(UB_EXARGS, "entweder hat map nicht die gleiche reihenfolge oder vectorKey = "+UbSystem::toString(vectorKey)+" nicht vorhanden");
-            if (it==this->cbVectorMap.end())
-               throw UbException(UB_EXARGS,"map ist leer");
-            else if (it->first != vectorKey)
-               throw UbException(UB_EXARGS, "vectorKey = "+UbSystem::toString(vectorKey)+" nicht vorhanden it->first =" + UbSystem::toString(it->first));
-
-            this->setCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-         }
-         if(it!=this->cbVectorMap.end())
-            throw UbException(UB_EXARGS,"error... in der map sind scheinbar noch weiter elemente vorhanden, die es auf der send seite nicht gibt...");
-
-         counterReceiveDataOrder = 0;
-         nofStoredVectors = this->cbVectorMap.size();
-
-#ifdef _DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   /*==================================================================*/
-   void prepareForSendData()
-   {
-      //da sendDataOrder einen request verwendet muss man hier immer abfragen
-      if(counterPrepareForSend==0)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&sendRequest, MPI_STATUS_IGNORE);
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-      }
-
-      counterPrepareForSend++;
-
-      if(counterPrepareForSend==nofStoredVectors)
-      {
-         counterPrepareForSend=0;  
-      }
-
-
-      //A - non blocking
-      ////der ERSTE is entscheidend 
-      ////Grund: wenn man 
-      //// for(all trans) { trans->prepare(); trans->fillBuffer(); }
-      //// aufruft, dann wuerde u.U. der Buffer neu beschrieben werden obwohl noch nicht versendet wurde!!!
-      //counterPrepareForSend++;
-      //if(counterPrepareForSend==1)
-      //{
-      //   if(sendRequest != MPI::REQUEST_NULL) sendRequest.Wait();
-      //}
-      //
-      //if(counterPrepareForSend==nofStoredVectors)
-      //   counterPrepareForSend=0;  
-   }
-   /*==================================================================*/
-   void sendData()
-   {
-      //A - non blocking
-      //der LETZTE is entscheidend 
-      //counterSend++;
-      //if(counterSend==nofStoredVectors)
-      //{
-      //   //std::cout<<"Isend von "<<(int)nextStartIndex<<"elementen von "<<mpiRemoteRank<<" mit tag="<<mpiTag<<std::endl;
-      //   sendRequest = comm.Isend(&pool[0],(int)nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-      //   counterSend=0;
-      //}
-      //B - blocking
-      //der LETZTE is entscheidend 
-      counterSend++;
-      if(counterSend==nofStoredVectors)
-      {
-         //std::cout<<"Isend von "<<(int)nextStartIndex<<"elementen von "<<mpiRemoteRank<<" mit tag="<<mpiTag<<std::endl;
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-
-         //synchronous send 
-         //comm.Ssend(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-#ifdef _DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-
-         //standard send
-         MPI_Send(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm);
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-////////////////////////////////////////////////////////////////////////////////////////////
-//DEBUG///////////////////////////////////////
-         //int irank;
-         //MPI_Comm_rank(MPI_COMM_WORLD, &irank);
-         //std::cout << "MPI_Send: " << irank <<  " "  << mpiRemoteRank << " "  <<mpiTag<<std::endl;
-///////////////////////////////////////////////////
-         counterSend=0;
-      }                           
-   }
-   /*==================================================================*/
-   void prepareForReceiveData()
-   {
-      //A - non blocking
-      //sobald der Letzte kann man den den request holen.
-      //andernfalls kann nicht gewaehrleistet werden, dass evtl noch mit dem buffer gearbeitet wird!!!
-      counterPrepareForReceive++;
-      if(counterPrepareForReceive==this->nofStoredVectors)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForReceiveData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-#ifdef _DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-         MPI_Irecv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, &receiveRequest);
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForReceiveData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         counterPrepareForReceive=0;
-      }
-   }
-   /*==================================================================*/
-   void receiveData()
-   {
-      //A - non blocking
-      //sobald der ERSTE reinkommt muss man warten, bis received wurde!!!
-      //denn erst anschliessend stehen die empfangenen daten zur verfuegung
-      if(counterReceive==0)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-      }
-      counterReceive++;
-      if(counterReceive==this->nofStoredVectors) //alle receiver waren hier
-      {
-         counterReceive=0;
-      }
-
-      ////B - blocking
-      ////sobald der ERSTE reinkommt muss man warten, bis received wurde!!!
-      ////denn erst anschliessend stehen die empfangenen daten zur verfuegung
-      //if(counterReceive==0)
-      //{
-      //   comm.Recv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-      //}
-      //counterReceive++;
-      //if(counterReceive==this->nofStoredVectors) //alle receiver waren hier
-      //   counterReceive=0;
-   }
-
-protected:
-   CbVectorKey poolKey; //eindeutiger schluessel fuer pool
-   size_type nofStoredVectors;
-
-   size_type counterPrepareReceiveDataOrder;
-   size_type counterSendDataOrder;
-   size_type counterReceiveDataOrder;
-   size_type counterPrepareForReceive;
-   size_type counterReceive;
-   size_type counterPrepareForSend;
-   size_type counterSend;
-
-   //std::vector< char > tmpSendOrderVec; //wird zur temp speicherung der anordnung benoetigt
-   std::string tmpSendOrderVec;
-
-   MPI_Comm     comm;
-   MPI_Request  receiveRequest;
-   MPI_Request  sendRequest;
-   //MPI_Status   sendStatus;
-   //MPI_Status   receiveStatus;
-   MPI_Datatype mpiDataType;
-
-   int mpiRemoteRank, mpiTag;
-
-   std::vector<MPI_Request> request;
-   int rcount;
-
-#ifdef _DEBUG
-   T* orgPoolVectorStartPointer;
-#endif
-};
-
-template<typename T>
-typename TbCbVectorMpiPool<T>::MpiPoolPtrMap TbCbVectorMpiPool<T>::poolMap;
-
-//////////////////////////////////////////////////////////////////////////
-//  TbSenderMpiPool
-//////////////////////////////////////////////////////////////////////////
-template<typename T>
-class TbCbVectorSenderMpiPool : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;
-
-public:
-   TbCbVectorSenderMpiPool(std::string cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey,this->mpiVectorPool) );
-   }
-   ~TbCbVectorSenderMpiPool()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPool< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()          { this->mpiVectorPool->sendDataOrder(); }
-   void receiveDataSize()       { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }   
-   CbVector< T >& receiveData() { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }
-   void prepareForSend()        { this->mpiVectorPool->prepareForSendData(); }
-   void sendData()              { this->mpiVectorPool->sendData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  this->mpiVectorPool->getRemoteRank(); }
-   int  getSendTbTag()    const { return  this->mpiVectorPool->getRemoteTag();  }
-   int  getRecvFromRank() const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-   int  getRecvFromTag()  const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-
-   std::string toString() const { return "TbCbVectorSenderMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getSendTbRank())+"("+UbSystem::toString(getSendTbTag())+")"; }
-
-protected:
-   TbCbVectorMpiPool<T>* mpiVectorPool;
-};
-
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorReceiverMpiPool : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   TbCbVectorReceiverMpiPool(std::string cbVectorKey, TbCbVectorMpiPool< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey, this->mpiVectorPool) );
-   }
-   ~TbCbVectorReceiverMpiPool()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPool< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()      { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only");  }   
-   void receiveDataSize()   { this->mpiVectorPool->receiveDataOrder(); }  
-   void sendData()          { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   void prepareForReceive() { this->mpiVectorPool->prepareForReceiveData(); }
-   CbVector< T >& receiveData()
-   { 
-      this->mpiVectorPool->receiveData();
-      return this->getData();
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getSendTbTag()    const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getRecvFromRank() const { return  this->mpiVectorPool->getRemoteRank();  }
-   int  getRecvFromTag()  const { return  this->mpiVectorPool->getRemoteTag();  }
-
-   std::string toString() const { return "TbCbVectorReceiverMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getRecvFromRank())+"("+UbSystem::toString(getRecvFromTag())+")"; }
-
-protected:
-   TbCbVectorMpiPool<T>* mpiVectorPool;
-};
-
-#endif //VF_MPI
-
-#endif //TBTRANSMITTERMPIPOOL_H
- 
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPoolEx.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPoolEx.h
deleted file mode 100644
index dcb52d842363effe7dacca9ddbfb0c81efd50b9a..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterMpiPoolEx.h
+++ /dev/null
@@ -1,602 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERMPIPOOLEX_H
-#define TBTRANSMITTERMPIPOOLEX_H
-
-#ifdef VF_MPI
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-#include <vector>
-#include <map>
-
-#include <mpi.h>
-
-#include <basics/transmitter/TbTransmitter.h>
-#include <basics/container/CbVector.h>
-#include <basics/container/CbVectorPool.h>
-
-#include <boost/shared_ptr.hpp>
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//TbCbVectorMpiPoolSender/Receiver
-//diese verschicken immer einen VectorPool. Letztlich einen langen vector,
-//der eigentlich aus vielen kleinen besteht
-//jeder MpiPoolVector hat einen pointer auf die startadresse in diesem vector
-//die informationen werden im TbMpiVectorPool verwaltet
-//MpiPoolVector verhaelt sich nach aussen hin mit einschraenkungen wie ein std::vector
-//und kann somit bei den vector connector verwendet werden
-//man kann die klassen theoretisch verallgemeinern.
-
-template<typename T> class TbCbVectorSenderMpiPoolEx;
-template<typename T> class TbCbVectorReceiverMpiPoolEx;
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorMpiPoolEx : public CbVectorPool<T>
-{
-public:
-   typedef boost::shared_ptr< TbCbVectorMpiPoolEx< T > > MpiPoolPtr;
-
-   //////////////////////////////////////////////////////////////////////////
-   typedef std::map< int, MpiPoolPtr >      MpiPoolPtrMap;
-   typedef typename MpiPoolPtrMap::iterator MpiPoolPtrMapIter;
-
-   //da BasisKlasse templateKlasse ist MUSS man hier die typedefs nochmal wiederholen!
-   typedef typename CbVector<T>::value_type value_type;
-   typedef typename CbVector<T>::size_type  size_type;
-   typedef std::vector< value_type >        Pool;
-
-   typedef unsigned CbVectorKey;
-   typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
-   typedef typename CbVectorMap::iterator CbVectorMapIter;
-
-   //////////////////////////////////////////////////////////////////////////
-   friend class TbCbVectorSenderMpiPoolEx< T >; 
-   friend class TbCbVectorReceiverMpiPoolEx< T >; 
-
-protected:
-   //////////////////////////////////////////////////////////////////////////
-   static MpiPoolPtrMap poolMap;
-public:
-   //////////////////////////////////////////////////////////////////////////
-   //STATIC MEMBERS
-   //////////////////////////////////////////////////////////////////////////
-   //createTbCbVectorMpiPool:
-   // poolKey      : Schluessel fuer eindeutige Indizierung in Map
-   // mpiRemoteRank: mpi-rank des Empfaengers/Senders
-   // mpiTag       : mpi-tag mit dem empfangen/gesendet wird
-#ifdef USE_MPI_CXX_SYNTAX 
-   static MpiPoolPtr createTbCbVectorMpiPool(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI::Intracomm comm, const size_type& startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-#else
-   static MpiPoolPtr createTbCbVectorMpiPool(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI_Comm comm, const size_type& startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-#endif 
-   {
-      if( poolMap.find(poolKey)!=poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"es ist bereits ein Pool mit dem key vorhanden!!!");
-      }
-
-      //pool erstellen
-      MpiPoolPtr mpiPool(new TbCbVectorMpiPoolEx<T>(poolKey, mpiRemoteRank, mpiTag, comm, startPoolSize) ); 
-
-      //pool "speichern"
-      TbCbVectorMpiPoolEx< value_type >::poolMap[poolKey] = mpiPool;
-
-      return mpiPool; 
-   }
-   static void deleteTbCbVectorMpiPool(const int& poolKey)
-   {
-      MpiPoolPtrMapIter it = TbCbVectorMpiPoolEx< value_type >::poolMap.find(poolKey);
-      if( it==poolMap.end() )
-      {
-         throw UbException(UB_EXARGS,"kein Pool mit dem key vorhanden");
-      }
-      TbCbVectorMpiPoolEx< value_type >::poolMap.erase(it);
-   }
-   /*==================================================================*/
-   static MpiPoolPtr getTbCbVectorMpiPool(const int& poolKey)
-   {
-      MpiPoolPtrMapIter it;
-      if( (it=TbCbVectorMpiPoolEx< T >::poolMap.find(poolKey))!=TbCbVectorMpiPoolEx< T >::poolMap.end() ) 
-      {
-         return it->second;
-      }
-      return MpiPoolPtr();
-   }
-   /*==================================================================*/
-   static std::string getInfoString()
-   {
-      std::stringstream out;  
-      out<<"TbCbVectorMpiPool<"<< typeid( T ).name()  << ") - Info:"<<std::endl;
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-         out<<"pool with key("            <<std::setw(15)<<it->first<<") "
-         <<"stores "                  <<std::setw(12)<<it->second->getNofStoredVectors() <<" vectors " 
-         <<", elements to transfer = "<<std::setw(15)<<it->second->getPoolSize() 
-         <<" ( "<< it->second->getPoolSize()*sizeof( T ) / ( 1024.0 * 1024.0 ) << " MB )" <<std::endl;
-      return out.str();
-   }
-   /*==================================================================*/
-   // checks if all vectors have one to one pool-entries
-   static bool consistencyCheck()
-   {
-      for(MpiPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-      {
-         if( !it->second-> CbVectorPool<T>::consistencyCheck() ) 
-         {
-            return false;         
-         }
-      }
-
-      return true;
-   }
-   //////////////////////////////////////////////////////////////////////////
-   static void eraseMap()
-   {
-      poolMap.clear();
-   }
-protected:
-   //////////////////////////////////////////////////////////////////////////
-#ifdef USE_MPI_CXX_SYNTAX 
-   TbCbVectorMpiPoolEx(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI::Intracomm comm, const size_type& startPoolSize )
-      :    CbVectorPool< value_type >( startPoolSize ) 
-      , poolKey(poolKey)                           
-      , nofStoredVectors(0) //=Anzahl an Vectoren im Pool, wird bei send/receiveDataOrder gesetzt
-      , counterPrepareReceiveDataOrder(0)          
-      , counterSendDataOrder(0)                    
-      , counterReceiveDataOrder(0)                 
-      , counterPrepareForReceive(0)                
-      , counterReceive(0)                          
-      , counterPrepareForSend(0)                   
-      , counterSend(0)                             
-      , comm(comm)                                 
-      , receiveRequest(MPI::REQUEST_NULL)
-      , sendRequest(MPI::REQUEST_NULL)
-      , mpiRemoteRank(mpiRemoteRank)               
-      , mpiTag(mpiTag)                              
-   {
-      if     ( (std::string)typeid(value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI::DOUBLE;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI::FLOAT;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI::INT;
-      else throw UbException(UB_EXARGS,"no MpiDataType for T"+(std::string)typeid(T).name());
-   }
-#else
-   TbCbVectorMpiPoolEx(const int& poolKey, const int& mpiRemoteRank, const int& mpiTag, MPI_Comm comm, const size_type& startPoolSize )
-      :    CbVectorPool< value_type >( startPoolSize ) 
-      , poolKey(poolKey)                           
-      , nofStoredVectors(0) //=Anzahl an Vectoren im Pool, wird bei send/receiveDataOrder gesetzt
-      , counterPrepareReceiveDataOrder(0)          
-      , counterSendDataOrder(0)                    
-      , counterReceiveDataOrder(0)                 
-      , counterPrepareForReceive(0)                
-      , counterReceive(0)                          
-      , counterPrepareForSend(0)                   
-      , counterSend(0)                             
-      , comm(comm)                                 
-      , receiveRequest(MPI_REQUEST_NULL)
-      , sendRequest(MPI_REQUEST_NULL)
-      , mpiRemoteRank(mpiRemoteRank)               
-      , mpiTag(mpiTag)                              
-   {
-      if     ( (std::string)typeid(value_type).name()==(std::string)typeid(double).name() ) mpiDataType = MPI_DOUBLE;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(float).name()  ) mpiDataType = MPI_FLOAT;
-      else if( (std::string)typeid(value_type).name()==(std::string)typeid(int).name()    ) mpiDataType = MPI_INT;
-      else throw UbException(UB_EXARGS,"no MpiDataType for T"+(std::string)typeid(T).name());
-   }
-#endif
-
-
-public:
-   /*==================================================================*/
-   //returns key of Pool in MpiPoolMap
-   int  getPoolKey()    const { return  this->poolKey;       }
-   /*==================================================================*/
-   //returns rank of process pool data will be send to/received from
-   int  getRemoteRank() const { return  this->mpiRemoteRank; }
-   /*==================================================================*/
-   //returns tag of process pool data will be send to/received from
-   int  getRemoteTag()  const { return  this->mpiTag;        }
-
-protected:
-   /*==================================================================*/
-   /*==================================================================*/
-   /*==================================================================*/
-   /*==================================================================*/
-   /*==================================================================*/
-   //void prepareTbReceiveDataOrder() 
-   //{
-   //counterPrepareReceiveDataOrder++;
-   //if(counterPrepareReceiveDataOrder==nofStoredVectors)
-   //{
-   //   unsigned nofElements = relationMap.size()*3+1; //map MUSS auf beiden seiten gleich gross sein, sonst hat man ein grundsaetzliches problem ;-)
-   //   tmpOrderVec.resize(nofElements);
-   //   std::cout<<RcfSystem::getRank()<<" prepForRecv from rank="<<mpiRemoteRank<<" with tag="<<mpiTag<<"e="<<nofElements<<std::endl;
-   //   receiveRequest = comm.Irecv(&tmpOrderVec[0], nofElements, MPI::UNSIGNED, mpiRemoteRank, mpiTag);
-   //   counterPrepareReceiveDataOrder = 0;
-   //}
-   //}
-   /*==================================================================*/
-   void sendDataOrder()
-   {
-      counterSendDataOrder++;
-      if(counterSendDataOrder==this->cbVectorMap.size())
-      {
-         //allg.: bei MPI muss man darauf achten, dass bei unblocked operationen die puffer (aus dem oder in den 
-         //geschrieben wird auch noch vorhanden sind!!! wuerde man hier z.B. einen lokalen vector mit Isend() los-
-         //schicken, dann wurde der scope verlassen werden und der vector evtl geloescht werden, bevor mpi den
-         //vorgang abgeschlossen hat!!! ->  tmpOrderVec ist class-member!!!
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1;
-         tmpSendOrderVec.resize(nofElements);//std::vector< unsigned > vec(nofElements);
-         unsigned index = 0;
-         tmpSendOrderVec[index++] = (unsigned)this->pool.size(); //= laenge des vectors
-         if(this->nextCbVectorStartIndexInPool != this->pool.size())  throw UbException(UB_EXARGS,"an dieser Stelle sollten nextStartIndex und pool.size() identisch sein!!!");
-         for(CbVectorMapIter it = this->cbVectorMap.begin(); it!=this->cbVectorMap.end(); ++it)
-         {
-            CbVectorKey vectorKey=0;
-            size_type   dataSize=0, startIndexInPool=0;
-            this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-            if(it->first != vectorKey) throw UbException(UB_EXARGS,"key mismatch!");
-
-            tmpSendOrderVec[index++] = (unsigned)vectorKey;         //vectorKey == allocator.getAllocatorKey()
-            tmpSendOrderVec[index++] = (unsigned)startIndexInPool;  //startIndex in poolVector
-            tmpSendOrderVec[index++] = (unsigned)dataSize;          //dataSize
-         }
-         //std::cout<<RcfSystem::getRank()<<" send to rank="<<mpiRemoteRank<<" with tag="<<mpiTag<<" e="<<nofElements<<std::endl;
-         //comm.Send(&tmpOrderVec[0],nofElements, MPI::UNSIGNED, mpiRemoteRank, mpiTag);
-
-         ////////////////////////////
-         //int rank;
-         //MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-         //std::cout<<"rank = " << rank <<" sendDataOrder() nofElements = "<<nofElements<<std::endl;
-         ////////////////////////////
-
-#ifdef USE_MPI_CXX_SYNTAX 
-         sendRequest = comm.Isend(&tmpSendOrderVec[0],(int)tmpSendOrderVec.size(), MPI::UNSIGNED, mpiRemoteRank, mpiTag);
-#else
-         MPI_Isend(&tmpSendOrderVec[0],(int)tmpSendOrderVec.size(), MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, &sendRequest);
-#endif
-         counterSendDataOrder=0;
-
-         nofStoredVectors = this->cbVectorMap.size();
-
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendDataOrder()"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-
-#ifdef DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   /*==================================================================*/
-   void receiveDataOrder()
-   {
-      counterReceiveDataOrder++;
-      if(counterReceiveDataOrder==this->cbVectorMap.size())
-      {
-         //receiveRequest.Wait();
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1; //map MUSS auf beiden seiten gleich gross sein, sonst hat man ein grundsaetzliches problem ;-)
-
-         //////////////TODO////////////DEBUG
-         //int rank;
-         //MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-         //std::cout<<"rank = " << rank <<" receiveDataOrder() nofElements = "<<nofElements << " from " << mpiRemoteRank <<std::endl;
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveDataOrder()"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         //////////////////////////
-
-         std::vector< unsigned > tmpRecvOrderVec;
-         tmpRecvOrderVec.resize(nofElements);
-
-#ifdef USE_MPI_CXX_SYNTAX 
-         comm.Recv(&tmpRecvOrderVec[0], nofElements, MPI::UNSIGNED, mpiRemoteRank, mpiTag);
-#else
-         //MPI_Status status;
-         MPI_Recv(&tmpRecvOrderVec[0], nofElements, MPI_UNSIGNED, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
-#endif
-
-         if(nofElements!=(unsigned)tmpRecvOrderVec.size())
-            throw UbException(UB_EXARGS,"error... vec size stimmt nicht");
-
-         unsigned index = 0;
-         this->nextCbVectorStartIndexInPool = tmpRecvOrderVec[index++]; //= laenge des vectors
-         this->pool.resize(this->nextCbVectorStartIndexInPool);
-         CbVectorMapIter it = this->cbVectorMap.begin();
-         for(/*index*/; index<nofElements; index+=3, ++it)
-         {
-            CbVectorKey vectorKey        = (CbVectorKey)tmpRecvOrderVec.at(index  );
-            size_type   startIndexInPool = (size_type)tmpRecvOrderVec.at(index+1);
-            size_type   dataSize         = (size_type)tmpRecvOrderVec.at(index+2);
-
-            if(it==this->cbVectorMap.end() || it->first != vectorKey ) 
-               throw UbException(UB_EXARGS,"entweder hat map nicht die gleiche reihenfolge oder vectorKey nicht vorhanden");
-
-            this->setCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-         }
-         if(it!=this->cbVectorMap.end())
-            throw UbException(UB_EXARGS,"error... in der map sind scheinbar noch weiter elemente vorhanden, die es auf der send seite nicht gibt...");
-
-         counterReceiveDataOrder = 0;
-         nofStoredVectors = this->cbVectorMap.size();
-
-#ifdef DEBUG
-         orgPoolVectorStartPointer = &this->pool[0];
-#endif
-      }
-   }
-   /*==================================================================*/
-   void prepareForSendData()
-   {
-      //da sendDataOrder einen request verwendet muss man hier immer abfragen
-      if(counterPrepareForSend==0)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-#ifdef USE_MPI_CXX_SYNTAX 
-         if(sendRequest != MPI::REQUEST_NULL) sendRequest.Wait();
-#else
-         //if(sendRequest != MPI_REQUEST_NULL) MPI_Wait(&sendRequest, MPI_STATUS_IGNORE);
-#endif
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForSendData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-      }
-
-      counterPrepareForSend++;
-
-      if(counterPrepareForSend==nofStoredVectors)
-      {
-         counterPrepareForSend=0;  
-      }
-
-
-      //A - non blocking
-      ////der ERSTE is entscheidend 
-      ////Grund: wenn man 
-      //// for(all trans) { trans->prepare(); trans->fillBuffer(); }
-      //// aufruft, dann wuerde u.U. der Buffer neu beschrieben werden obwohl noch nicht versendet wurde!!!
-      //counterPrepareForSend++;
-      //if(counterPrepareForSend==1)
-      //{
-      //   if(sendRequest != MPI::REQUEST_NULL) sendRequest.Wait();
-      //}
-      //
-      //if(counterPrepareForSend==nofStoredVectors)
-      //   counterPrepareForSend=0;  
-   }
-   /*==================================================================*/
-   void sendData()
-   {
-      //A - non blocking
-      //der LETZTE is entscheidend 
-      //counterSend++;
-      //if(counterSend==nofStoredVectors)
-      //{
-      //   //std::cout<<"Isend von "<<(int)nextStartIndex<<"elementen von "<<mpiRemoteRank<<" mit tag="<<mpiTag<<std::endl;
-      //   sendRequest = comm.Isend(&pool[0],(int)nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-      //   counterSend=0;
-      //}
-      //B - blocking
-      //der LETZTE is entscheidend 
-      counterSend++;
-      if(counterSend==nofStoredVectors)
-      {
-         //std::cout<<"Isend von "<<(int)nextStartIndex<<"elementen von "<<mpiRemoteRank<<" mit tag="<<mpiTag<<std::endl;
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-
-         //synchronous send 
-         //comm.Ssend(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-#ifdef DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-
-         //standard send
-#ifdef USE_MPI_CXX_SYNTAX 
-         comm.Send(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-#else
-         //MPI_Send(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm);
-         MPI_Isend(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, &sendRequest);
-#endif
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::sendData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-////////////////////////////////////////////////////////////////////////////////////////////
-//DEBUG///////////////////////////////////////
-         //int irank;
-         //MPI_Comm_rank(MPI_COMM_WORLD, &irank);
-         //std::cout << "MPI_Send: " << irank <<  " "  << mpiRemoteRank << " "  <<mpiTag<<std::endl;
-///////////////////////////////////////////////////
-         counterSend=0;
-      }                           
-   }
-   /*==================================================================*/
-   void prepareForReceiveData()
-   {
-      //A - non blocking
-      //sobald der Letzte kann man den den request holen.
-      //andernfalls kann nicht gewaehrleistet werden, dass evtl noch mit dem buffer gearbeitet wird!!!
-      counterPrepareForReceive++;
-      if(counterPrepareForReceive==this->nofStoredVectors)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForReceiveData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-#ifdef DEBUG
-         if(this->orgPoolVectorStartPointer != &this->pool[0] ) throw UbException(UB_EXARGS, "ups, pool array adress changed - unknown behavoir");
-#endif
-         //std::cout<<"Irecv von "<<(int)nextStartIndex<<"elementen von "<<mpiRemoteRank<<" mit tag="<<mpiTag<<std::endl;
-#ifdef USE_MPI_CXX_SYNTAX 
-         receiveRequest = comm.Irecv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-#else
-         //MPI_Irecv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, &receiveRequest);
-#endif
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::prepareForReceiveData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-         counterPrepareForReceive=0;
-      }
-   }
-   /*==================================================================*/
-   void receiveData()
-   {
-      //A - non blocking
-      //sobald der ERSTE reinkommt muss man warten, bis received wurde!!!
-      //denn erst anschliessend stehen die empfangenen daten zur verfuegung
-      if(counterReceive==0)
-      {
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveData():start"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-#ifdef USE_MPI_CXX_SYNTAX 
-         receiveRequest.Wait();
-#else
-         //MPI_Wait(&receiveRequest, MPI_STATUS_IGNORE);
-         MPI_Recv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag, comm, MPI_STATUS_IGNORE);
-#endif
-         UBLOG(logDEBUG5, "TbCbVectorMpiPool::receiveData():end"<<" mpiRemoteRank="<<mpiRemoteRank<<" mpiTag="<<mpiTag);
-      }
-      counterReceive++;
-      if(counterReceive==this->nofStoredVectors) //alle receiver waren hier
-      {
-         counterReceive=0;
-      }
-
-      ////B - blocking
-      ////sobald der ERSTE reinkommt muss man warten, bis received wurde!!!
-      ////denn erst anschliessend stehen die empfangenen daten zur verfuegung
-      //if(counterReceive==0)
-      //{
-      //   comm.Recv(&this->pool[0],(int)this->nextCbVectorStartIndexInPool, mpiDataType, mpiRemoteRank, mpiTag);
-      //}
-      //counterReceive++;
-      //if(counterReceive==this->nofStoredVectors) //alle receiver waren hier
-      //   counterReceive=0;
-   }
-
-protected:
-   int       poolKey; //eindeutiger schluessel fuer pool
-   size_type nofStoredVectors;
-
-   size_type counterPrepareReceiveDataOrder;
-   size_type counterSendDataOrder;
-   size_type counterReceiveDataOrder;
-   size_type counterPrepareForReceive;
-   size_type counterReceive;
-   size_type counterPrepareForSend;
-   size_type counterSend;
-
-   std::vector< unsigned > tmpSendOrderVec; //wird zur temp speicherung der anordnung benoetigt
-
-#ifdef USE_MPI_CXX_SYNTAX 
-   MPI::Intracomm comm;
-   MPI::Request   receiveRequest;
-   MPI::Request   sendRequest;
-   MPI::Datatype  mpiDataType;
-#else
-   MPI_Comm     comm;
-   MPI_Request  receiveRequest;
-   MPI_Request  sendRequest;
-   //MPI_Status   sendStatus;
-   //MPI_Status   receiveStatus;
-   MPI_Datatype mpiDataType;
-#endif
-
-   int mpiRemoteRank, mpiTag;
-
-#ifdef DEBUG
-   T* orgPoolVectorStartPointer;
-#endif
-};
-
-template<typename T>
-typename TbCbVectorMpiPoolEx<T>::MpiPoolPtrMap TbCbVectorMpiPoolEx<T>::poolMap;
-
-//   static MpiPoolPtrMap poolMap;
-
-
-//////////////////////////////////////////////////////////////////////////
-//  TbSenderMpiPool
-//////////////////////////////////////////////////////////////////////////
-template<typename T>
-class TbCbVectorSenderMpiPoolEx : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   TbCbVectorSenderMpiPoolEx(const unsigned int& cbVectorKey, TbCbVectorMpiPoolEx< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey,this->mpiVectorPool) );
-   }
-   ~TbCbVectorSenderMpiPoolEx()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPoolEx< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()          { this->mpiVectorPool->sendDataOrder(); }
-   void receiveDataSize()       { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }   
-   CbVector< T >& receiveData() { throw UbException(UB_EXARGS,"TbMpiPoolSender sends only");  }
-   void prepareForSend()        { this->mpiVectorPool->prepareForSendData(); }
-   void sendData()              { this->mpiVectorPool->sendData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { return  this->mpiVectorPool->getRemoteRank(); }
-   int  getSendTbTag()    const { return  this->mpiVectorPool->getRemoteTag();  }
-   int  getRecvFromRank() const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-   int  getRecvFromTag()  const { throw UbException(UB_EXARGS,"TbCbVectorSenderMpiPool sends only"); }
-
-   std::string toString() const { return "TbCbVectorSenderMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getSendTbRank())+"("+UbSystem::toString(getSendTbTag())+")"; }
-
-protected:
-   TbCbVectorMpiPoolEx<T>* mpiVectorPool;
-};
-
-
-/*==================================================================*/
-template<typename T>
-class TbCbVectorReceiverMpiPoolEx : public TbTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   TbCbVectorReceiverMpiPoolEx(const unsigned int& cbVectorKey, TbCbVectorMpiPoolEx< T >* mpiVectorPool)
-      : mpiVectorPool(mpiVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey, this->mpiVectorPool) );
-   }
-   ~TbCbVectorReceiverMpiPoolEx()
-   {
-      if( this->mpiVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         TbCbVectorMpiPoolEx< T >::deleteTbCbVectorMpiPool(this->mpiVectorPool->getPoolKey());  
-      }
-   }
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()      { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only");  }   
-   void receiveDataSize()   { this->mpiVectorPool->receiveDataOrder(); }  
-   void sendData()          { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   void prepareForReceive() { this->mpiVectorPool->prepareForReceiveData(); }
-   CbVector< T >& receiveData()
-   { 
-      this->mpiVectorPool->receiveData();
-      return this->getData();
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()   const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getSendTbTag()    const { throw UbException(UB_EXARGS,"TbCbVectorReceiverMpiPool receives only"); }
-   int  getRecvFromRank() const { return  this->mpiVectorPool->getRemoteRank();  }
-   int  getRecvFromTag()  const { return  this->mpiVectorPool->getRemoteTag();  }
-
-   std::string toString() const { return "TbCbVectorReceiverMpiPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getRecvFromRank())+"("+UbSystem::toString(getRecvFromTag())+")"; }
-
-protected:
-   TbCbVectorMpiPoolEx<T>* mpiVectorPool;
-};
-
-#endif //VF_MPI
-
-#endif //TBTRANSMITTERMPIPOOL_H
- 
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcf.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcf.h
deleted file mode 100644
index 4ec1c25dddabe3aea4c87331df6536f3e2a58fdd..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcf.h
+++ /dev/null
@@ -1,326 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBTRANSMITTERRCF_H
-#define TBTRANSMITTERRCF_H
-
-/*=========================================================================*/
-/*  RCF Transmitter                                                        */
-/*                                                                         */
-/**
-This Class provides the base for exception handling.
-<BR><BR>
-@author <A HREF="mailto:muffmolch@gmx.de">S. Freudiger</A>
-@version 1.0 - 08.11.07
-*/ 
-
-/*
-usage: ...
-*/
-
-#include <iostream>
-#include <vector>
-#include <map>
-
-#include <basics/transmitter/TbTransmitter.h>
-#include <basics/container/CbVector.h>
-#include <basics/utilities/UbLogger.h>
-
-#ifdef CAB_RCF
-//////////////////////////////////////////////////////////////////////////
-// RCF STUFF
-//////////////////////////////////////////////////////////////////////////
-
-#include <RCF/Idl.hpp>
-#include <RCF/TcpEndpoint.hpp>
-#include <boost/shared_ptr.hpp>
-
-#include <3rdParty/rcf/RcfSerializationIncludes.h>
-#include <3rdParty/rcf/RcfSystem.h>
-#include <3rdParty/rcf/IRcfIpService.h>
-#include <3rdParty/rcf/RcfConnection.h>
-
-//zum ausstausch mittels RCF transmitter:
-RCF_BEGIN(IRcfTransmitterReceiverService, "IRcfTransmitterReceiverService")
-   RCF_METHOD_V2(void, receiveVectorForTransmitter,int /*tag*/, const std::vector<double>& /*data*/);
-   RCF_METHOD_V2(void, receiveVectorForTransmitter,int /*tag*/, const CbVector<double>& /*data*/);
-   RCF_METHOD_V2(void, receiveVectorForTransmitter,int /*tag*/, const std::vector<float>& /*data*/);
-   RCF_METHOD_V2(void, receiveVectorForTransmitter,int /*tag*/, const CbVector<float>& /*data*/);
-RCF_END(IRcfTransmitterReceiverService);
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorSenderRcf< Vector > 
-//////////////////////////////////////////////////////////////////////////
-template< typename Vector >
-class TbVectorSenderRcf : public TbTransmitter< Vector >
-{
-public:
-   typedef Vector value_type;   
-   
-   //static members
-private:
-   static std::vector< RcfClient<IRcfTransmitterReceiverService> >  recvServices;
-
-   static void setRcfClients(const std::string& recvServiceID);
-
-public:
-   TbVectorSenderRcf(const std::string& recvServiceName,const RcfConnection& receiveProcess, const int& tag) 
-      : TbTransmitter< Vector >()
-   { 
-      if( recvServices.empty() ) setRcfClients(recvServiceName);
-      this->receiveRank	   = receiveProcess.getRank();
-      this->tag            = tag;
-      this->receiveProcess = receiveProcess;
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()    { this->sendData(); }
-   void receiveDataSize() { UB_THROW( UbException(UB_EXARGS,"TbRcfVectorSender sends only") ); } 
-
-   void sendData() 
-   { 
-      //remote prozess=client erhaelt daten
-      recvServices[receiveRank].receiveVectorForTransmitter(tag, TbTransmitter< Vector >::getData());
-   }
-   void prepareForReceive() { UB_THROW( UbException(UB_EXARGS,"TbRcfVectorSender sends only") ); }
-   Vector& receiveData()    { UB_THROW( UbException(UB_EXARGS,"TbRcfVectorSender sends only") ); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()    const { return  this->receiveRank; /*=der rank an den gesendet wird*/}
-   int  getSendTbTag()     const { return  this->tag;                                           }
-   int  getRecvFromRank()  const { UB_THROW( UbException(UB_EXARGS,"TbVectorSenderRcf sends only") ); }
-   int  getRecvFromTag()   const { UB_THROW( UbException(UB_EXARGS,"TbVectorSenderRcf sends only") ); }
-
-   std::string toString() const { return "TbVectorSenderRcf< "+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name() +"> > to rank (tag)"+UbSystem::toString(receiveRank)+"("+UbSystem::toString(tag)+") connection "+receiveProcess.toString(); }
-
-private:
-   RcfConnection receiveProcess;
-   int tag;
-   int receiveRank;
-};
-
-//////////////////////////////////////////////////////////////////////////
-template< typename Vector >
-std::vector< RcfClient<IRcfTransmitterReceiverService> >  TbVectorSenderRcf< Vector >::recvServices;
-
-template< typename Vector >
-void TbVectorSenderRcf< Vector >::setRcfClients(const std::string& recvServiceID)
-{
-   UBLOG(logINFO,"invoked setRcfClients");
-   RcfConnection ipConnection = RcfSystem::getIpServiceConnection();
-   if(!ipConnection) UB_THROW( UbException(UB_EXARGS,"ups, no IpServiceConnection") );
-   RcfClient<IRcfIpService> ipService(RCF::TcpEndpoint(ipConnection.getIp(), ipConnection.getPort()));
-
-   //Mit RecvServices verbinden
-   std::vector<RcfConnection> connections = ipService.getServiceConnections(recvServiceID);
-   if(connections.empty()) 
-      UB_THROW( UbException(UB_EXARGS,"no existing RecvService with ID = "+recvServiceID) );
-   std::sort(connections.begin(),connections.end(),RcfConnection::compareRank());
-
-   for(std::size_t i=0; i<connections.size(); i++)
-   {
-      if( (int)i != connections[i].getRank() )
-         UB_THROW( UbException(UB_EXARGS,"recvServices must have continougs ranks sarting from 0") );
-      recvServices.push_back(RcfClient<IRcfTransmitterReceiverService>(RCF::TcpEndpoint(connections[i].getIp(), connections[i].getPort())) );
-   }
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-// TbVectorReceiverRcf
-//////////////////////////////////////////////////////////////////////////
-template< typename Vector >
-class TbVectorReceiverRcf : public TbTransmitter< Vector >
-{
-   typedef std::map<int, TbVectorReceiverRcf< Vector >* >  ReceiverMap;
-   typedef typename ReceiverMap::iterator                  ReceiverMapIt;
-   
-public:
-   typedef Vector value_type;
-
-   //static members
-private:
-   static ReceiverMap  receiverMap;
-   static boost::mutex staticReceiverMapMutex;
-
-public:
-   static void receiveVectorForTransmitter(int tag, const Vector& data)
-   {
-      TbVectorReceiverRcf< Vector >* receiver = NULL;
-      
-      //receiver ermitteln (map nicht thread-safe->lock! aber nur kurz, ansonsten ab einer gewissen anzahl an clients/blöcken->deadlock)
-      //vermutlich brauch man den nicht mal... (denn das registrieren sollte zu diesem zeitpunkt abgeschlossen sein)
-      //allerdings sollte man nicht gleichzeitig Suchoperationen in ner nich thread sicheren map durchführen!!!
-      {
-         boost::mutex::scoped_lock lock(staticReceiverMapMutex); //wenn man das ausserhalb macht, gibt es ab einer bestimmten anzahl an clients/bloecke einen deadlock
-         
-         ReceiverMapIt result = TbVectorReceiverRcf< Vector >::receiverMap.find(tag);
-         if( result == TbVectorReceiverRcf< Vector >::receiverMap.end() )
-            UB_THROW( UbException(UB_EXARGS,"receiver is not registered") );
-         
-         receiver = result->second;
-         if(!receiver) 
-            UB_THROW( UbException(UB_EXARGS,"receiver is NULL") );
-      }
-      
-      boost::mutex::scoped_lock lock(receiver->bufferMutex); 
-
-      // wait until buffer is empty 
-      while(receiver->isBufferFull) 
-         receiver->bufferEmptiedCondition.wait(lock); 
-
-      //////////////////////////////////////////////////////////////////////////
-      // put data in buffer 
-      //old: receiver->buffer = data;
-      
-      //new:
-      if( receiver->buffer.size() != data.size() )
-      {
-         receiver->buffer.resize( data.size() );
-      }
-      memcpy( (char*)&receiver->buffer[0], (char*)&data[0],  data.size()*sizeof(typename Vector::value_type) ); 
-      
-      //////////////////////////////////////////////////////////////////////////
-      //evtl wartende clients benachrichtigen
-      //notify "buffer filled" waiters 
-      receiver->isBufferFull = true; 
-      receiver->bufferFilledCondition.notify_all(); // notify_one muesste eigentlich reichen 
-   }
-
-public:
-   TbVectorReceiverRcf(const int& tag, const int& recvFromRank/*just for info section*/) 
-      : TbTransmitter< Vector >(), tag(tag), recvFromRank(recvFromRank)
-   {
-      {
-         //receiver registrieren
-         boost::mutex::scoped_lock lock( TbVectorReceiverRcf< Vector >::staticReceiverMapMutex ); 
-
-         std::pair< ReceiverMapIt, bool> result = receiverMap.insert(std::make_pair(tag, this));
-         if( !result.second )
-         {
-            ReceiverMapIt existingReceiver = TbVectorReceiverRcf< Vector >::receiverMap.find(tag);
-            TbVectorReceiverRcf< Vector >::receiverMap.erase(existingReceiver);
-            TbVectorReceiverRcf< Vector >::receiverMap.insert(std::pair<int, TbVectorReceiverRcf< Vector >* >(tag, this));
-         }
-      }
-      isBufferFull = false; 
-   }
-
-   ~TbVectorReceiverRcf()
-   {
-      ReceiverMapIt existingReceiver = receiverMap.find(tag);
-      TbVectorReceiverRcf< Vector >::receiverMap.erase(existingReceiver);
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()    { UB_THROW( UbException(UB_EXARGS,"TbRcfVectorReceiver receives only") ); }
-   void receiveDataSize() { this->receiveData(); } 
-
-   void sendData()        { UB_THROW( UbException(UB_EXARGS,"TbRcfVectorReceiver receives only") ); }
-
-   Vector& receiveData()
-   {
-      boost::mutex::scoped_lock lock(bufferMutex); 
-
-      // wait until buffer is full 
-      while(!isBufferFull) 
-         bufferFilledCondition.wait(lock); 
-
-      // get data from buffer 
-      //std::size_t dataSize = this->buffer.size();
-      //if( this->getData().size()!=dataSize ) this->getData().resize(dataSize);
-      //for(std::size_t i=0; i<dataSize; ++i)
-      //   this->getData()[i]=buffer[i]; 
-      
-      //folgende assert schlaegt bei receiveDataSize(), das receiveData() aufgerufen wird fehl...
-      //daher ausdokumentiert
-      //assert( this->getData().size() == this->buffer.size() );
-      
-      this->getData().swap(this->buffer);
-      
-      isBufferFull = false; 
-
-      // notify "buffer emptied" waiters 
-      bufferEmptiedCondition.notify_all(); // notify_one sollte auch hier reichen 
-      return this->getData(); 
-   }
-
-   //info-section (usable for remote transmitter)
-   int  getSendTbRank()    const { UB_THROW( UbException(UB_EXARGS,"getSendTbRank  sends only") ); }
-   int  getSendTbTag()     const { UB_THROW( UbException(UB_EXARGS,"getSendTbTag  sends only") ); }
-   int  getRecvFromRank()  const { return  this->recvFromRank; /*=der rank an den gesendet wird*/ }
-   int  getRecvFromTag()   const { return  this->tag;                                             }
-
-   std::string toString() const { return "TbVectorReceiverRcf< "+(std::string)typeid(Vector).name()+"<"+(std::string)typeid(typename Vector::value_type).name() +"> > to rank (tag)"+UbSystem::toString(recvFromRank)+"("+UbSystem::toString(tag)+")"; }
-
-private:
-   int tag;
-   int recvFromRank; //just for info-section
-
-   boost::mutex     bufferMutex; 
-   boost::condition bufferFilledCondition; 
-   boost::condition bufferEmptiedCondition; 
-   bool isBufferFull; 
-
-   Vector buffer; 
-};
-
-//////////////////////////////////////////////////////////////////////////
-// template< typename Vector >
-// std::map<int, TbVectorReceiverRcf< Vector >* > TbVectorReceiverRcf< Vector >::receiverMap;
-template< typename Vector >
-typename TbVectorReceiverRcf< Vector >::ReceiverMap TbVectorReceiverRcf< Vector >::receiverMap;
-
-template< typename Vector >
-boost::mutex TbVectorReceiverRcf< Vector >::staticReceiverMapMutex;
-
-
-// 
-// 
-// 
-// 
-// //derzeit funzt es nur mit vector<double> dafuer gibt es weiter unten eine spezialisierung
-// //Grund: man muss  fuer jeden datentyp eine RCF methode beim service registrieren
-// //        und derzeit ist eben nur eine fuer vector<double> vorhanden
-// template< typename Vector >
-// class TbVectorSenderRcf : public TbTransmitter< Vector >
-// {
-// public:
-//    TbVectorSenderRcf(const std::string& calcServiceName, const RcfConnection& receiveProcess, const int& tag) 
-//       : TbTransmitter< Vector >()
-//    {  
-//       UB_THROW( UbException("TbVectorSenderRcf::TbVectorSenderRcf() - TbRcfVectorSender not implmeneted for that type ") );    
-//    }
-//    void sendDataSize()      { UB_THROW( UbException("TbVectorSenderRcf::sendDataSize() - not defined for that type") );         }
-//    void receiveDataSize()   { UB_THROW( UbException("TbVectorSenderRcf::receiveDataSize() - not defined for that type") );      } 
-//    void sendData()          { UB_THROW( UbException("TbVectorSenderRcf::sendData() - not defined for that type") );             }
-//    void prepareForReceive() { UB_THROW( UbException("TbVectorSenderRcf::prepareForReceive() - TbRcfVectorSender sends only") ); }
-//    Vector& receiveData()         { UB_THROW( UbException("TbVectorSenderRcf::receiveData() - TbRcfVectorSender sends only") );       } 
-//    std::string toString()   { return "undefined TbVectorSenderRcf"; }
-// };
-// 
-// template< typename Vector  >
-// class TbVectorReceiverRcf : public TbTransmitter< Vector >
-// {
-// public:
-//    TbVectorReceiverRcf(const int& tag, const int& receiveRank) : TbTransmitter< Vector >()
-//    {
-//       UB_THROW( UbException("TbVectorReceiverRcf::TbVectorReceiverRcf() - not defined for that type") );  
-//    }
-//    void sendDataSize()    { UB_THROW( UbException("TbVectorReceiverRcf::sendDataSize() - not defined for that type") );     }    
-//    void receiveDataSize() { UB_THROW( UbException("TbVectorReceiverRcf::receiveDataSize() - not defined for that type") );  } 
-//    void sendData()        { UB_THROW( UbException("TbVectorReceiverRcf::sendData() - TbRcfVectorReceiver receives only") ); }
-//    Vector& receiveData()       { UB_THROW( UbException("TbVectorReceiverRcf::receiveData() - not defined for that type") );      }
-//    std::string toString() { return "undefined TbVectorReceiverRcf"; }
-// };
-// 
-#endif // CAB_RCF
-
-#endif //TBTRANSMITTERRCF_H
diff --git a/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcfPool.h b/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcfPool.h
deleted file mode 100644
index 361cd7a4475806aeb98bce5a82899147fffe1c65..0000000000000000000000000000000000000000
--- a/source/ThirdParty/Library/basics/transmitter/TbTransmitterRcfPool.h
+++ /dev/null
@@ -1,593 +0,0 @@
-//  _    ___      __              __________      _     __
-// | |  / (_)____/ /___  ______ _/ / ____/ /_  __(_)___/ /____
-// | | / / / ___/ __/ / / / __ `/ / /_  / / / / / / __  / ___/
-// | |/ / / /  / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__  )
-// |___/_/_/   \__/\__,_/\__,_/_/_/   /_/\__,_/_/\__,_/____/
-//
-#ifndef TBCBVECTORRCFPOOL_H
-#define TBCBVECTORRCFPOOL_H
-
-#ifdef CAB_RCF
-
-/*=========================================================================*/
-/*  ToCbVectorRcfPool                                                      */
-/*                                                                         */
-/**
-This Class provides the base for exception handling.
-<BR><BR>
-@author <A HREF="mailto:muffmolch@gmx.de">S. Freudiger</A>
-@version 1.0 - 09.10.08
-*/ 
-
-#include <iostream>
-#include <sstream>
-#include <iomanip>
-#include <vector>
-#include <map>
-#include <cassert>
-
-#include <RCF/Idl.hpp>
-#include <RCF/TcpEndpoint.hpp>
-#include <RCF/ByteBuffer.hpp>
-
-#include <boost/shared_ptr.hpp>
-
-#include <3rdParty/rcf/RcfSerializationIncludes.h>
-#include <3rdParty/rcf/RcfSystem.h>
-#include <3rdParty/rcf/IRcfIpService.h>
-#include <3rdParty/rcf/RcfConnection.h>
-
-#include <basics/transmitter/ToTransmitter.h>
-#include <basics/container/CbVector.h>
-#include <basics/container/CbVectorPool.h>
-#include <basics/utilities/UbLogger.h>
-#include <basics/utilities/UbLogger.h>
-
-
-// zum ausstausch mittels RCF transmitter:
-RCF_BEGIN(IRcfTransmitterReceiverPoolService, "IRcfTransmitterReceiverPoolService")
-RCF_METHOD_V3(void, receiveRcfPoolData     , const float&  /*dummy*/, const int& /*poolKey*/, const RCF::ByteBuffer&         /*databuffer*/ )
-RCF_METHOD_V3(void, receiveRcfPoolDataOrder, const float&  /*dummy*/, const int& /*poolKey*/, const std::vector< unsigned >& /*dataOrder*/  )
-RCF_METHOD_V3(void, receiveRcfPoolData     , const double& /*dummy*/, const int& /*poolKey*/, const RCF::ByteBuffer&         /*databuffer*/ )
-RCF_METHOD_V3(void, receiveRcfPoolDataOrder, const double& /*dummy*/, const int& /*poolKey*/, const std::vector< unsigned >& /*dataOrder*/  )
-RCF_END(IRcfTransmitterReceiverPoolService);
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-//ToRcfPoolSender/Receiver
-//diese verschicken immer einen VectorPool. Letztlich einen langen vector,
-//der eigentlich aus vielen kleinen besteht
-//jeder RcfPoolVector hat einen pointer auf die startadresse in diesem vector
-//die informationen werden im ToRcfVectorPool verwaltet
-//RcfPoolVector verhaelt sich nach aussen hin mit einschraenkungen wie ein std::vector
-//und kann somit bei den vector connector verwendet werden
-//man kann die klassen theoretisch verallgemeinern.
-
-template<typename T> class ToCbVectorSenderRcfPool;
-template<typename T> class ToCbVectorReceiverRcfPool;
-
-/*==================================================================*/
-template<typename T>
-class ToCbVectorRcfPool : public CbVectorPool<T>
-{
-public:
-   typedef boost::shared_ptr< ToCbVectorRcfPool< T > > RcfPoolPtr;
-
-   //////////////////////////////////////////////////////////////////////////
-   typedef std::map< int, RcfPoolPtr >      RcfPoolPtrMap;
-   typedef typename RcfPoolPtrMap::iterator RcfPoolPtrMapIter;
-
-   //da BasisKlasse templateKlasse ist MUSS man hier die typedefs nochmal wiederholen!
-   typedef typename CbVector<T>::value_type value_type;
-   typedef typename CbVector<T>::size_type  size_type;
-   typedef std::vector< value_type >        Pool;
-
-   typedef unsigned CbVectorKey;
-   typedef std::map< CbVectorKey, CbVector< value_type >* /*ptrVector*/  > CbVectorMap;
-   typedef typename CbVectorMap::iterator CbVectorMapIter;
-
-   //////////////////////////////////////////////////////////////////////////
-   friend class ToCbVectorSenderRcfPool< T >; 
-   friend class ToCbVectorReceiverRcfPool< T >; 
-
-private:
-   //////////////////////////////////////////////////////////////////////////
-   static RcfPoolPtrMap poolMap;
-
-//    //wenn pool als recevier fungiert
-//    static ReceiverPoolMap  receiverPoolMap;
-   static boost::mutex     staticPoolMapMutex;
-
-   //wenn pool als sender fungiert
-   static std::vector< RcfConnection >  recvConnections;   
-   static std::vector< RcfClient<IRcfTransmitterReceiverPoolService> >  recvServices;
-   static void setRcfSendToClients(const std::string& receiveServiceID, const int& rcfSendToRank);
-
-public:
-   //////////////////////////////////////////////////////////////////////////
-   //STATIC MEMBERS
-   //////////////////////////////////////////////////////////////////////////
-   //createToCbVectorRcfPool:
-   // poolKey      : Schluessel fuer eindeutige Indizierung in Map
-   //              : (dieser schluessel ist eindeutig und muss bei send und recevicePool uebereinstimmen (ersetzt Tag)
-   // rcfRemoteRank: rcf-rank des Empfaengers/Senders
-   // rcfTag       : rcf-tag mit dem empfangen/gesendet wird
-   static RcfPoolPtr createToCbVectorRcfSendPool(const std::string& rcfSendToServiceName, const int& poolKey, const int& rcfSendToRank, const size_type& startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-   {
-      if( poolMap.find(poolKey)!=ToCbVectorRcfPool< value_type >::poolMap.end() )
-      {
-         UB_THROW( UbException(UB_EXARGS,"es ist bereits ein Pool mit dem key vorhanden!!!") );
-      }
-      //pool erstellen
-      RcfPoolPtr rcfPool(new ToCbVectorRcfPool<T>(rcfSendToServiceName, poolKey, rcfSendToRank, startPoolSize) ); 
-      
-      //pool "speichern"
-      ToCbVectorRcfPool< value_type >::poolMap[poolKey] = rcfPool;
-
-      ToCbVectorRcfPool::setRcfSendToClients(rcfSendToServiceName, rcfSendToRank);
-      
-      return rcfPool; 
-   }
-   /*==================================================================*/
-   static RcfPoolPtr createToCbVectorRcfRecvPool(const int& poolKey, const int& rcfRecvRank, const size_type& startPoolSize = 20000 ) //startPoolSize*sizeof(T)/1024/1024 [MB]
-   {
-      if( poolMap.find(poolKey)!=poolMap.end() )
-      {
-         UB_THROW( UbException(UB_EXARGS,"es ist bereits ein Pool mit dem key vorhanden!!!") );
-      }
-      //pool erstellen
-      RcfPoolPtr rcfPool(new ToCbVectorRcfPool<T>( "", poolKey, rcfRecvRank, startPoolSize ) ); 
-                                                  
-      //pool "speichern"
-      ToCbVectorRcfPool< value_type >::poolMap[poolKey] = rcfPool;
-
-      return rcfPool; 
-   }
-   /*==================================================================*/
-   static void deleteToCbVectorRcfPool(const int& poolKey)
-   {
-      RcfPoolPtrMapIter it = ToCbVectorRcfPool< value_type >::poolMap.find(poolKey);
-      if( it==poolMap.end() )
-      {
-         UB_THROW( UbException(UB_EXARGS,"kein Pool mit dem key vorhanden") );
-      }
-      ToCbVectorRcfPool< value_type >::poolMap.erase(it);
-   }
-   /*==================================================================*/
-   static RcfPoolPtr getToCbVectorRcfPool(const int& poolKey)
-   {
-      RcfPoolPtrMapIter it;
-      if( (it=ToCbVectorRcfPool< T >::poolMap.find(poolKey))!=ToCbVectorRcfPool< T >::poolMap.end() ) 
-      {
-         return it->second;
-      }
-      return NULL;
-   }
-   /*==================================================================*/
-   static std::string getInfoString()
-   {
-      std::stringstream out;  
-      out<<"ToCbVectorRcfPool<"<< typeid( T ).name()  << ") - Info:"<<std::endl;
-      for(RcfPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-         out<<"pool with key("            <<std::setw(15)<<it->first<<") "
-             <<"stores "                  <<std::setw(12)<<it->second->getNofStoredVectors() <<" vectors " 
-             <<", elements to transfer = "<<std::setw(15)<<it->second->getPoolSize() 
-             <<" ( "<< it->second->getPoolSize()*sizeof( T ) / ( 1024.0 * 1024.0 ) << " MB )" <<std::endl;
-      return out.str();
-   }
-   /*==================================================================*/
-   // checks if all vectors have one to one pool-entries
-   static bool consistencyCheck()
-   {
-      for(RcfPoolPtrMapIter it=poolMap.begin(); it!=poolMap.end(); ++it)
-      {
-         if( !it->second-> CbVectorPool<T>::consistencyCheck() ) 
-         {
-            return false;         
-         }
-      }
-      return true;
-   }
-   /*==================================================================*/
-   static void receiveDataOrder(int poolKey, const std::vector< unsigned >& dataOrder)
-   {
-      RcfPoolPtr receiverPool;
-
-      //receiver ermitteln (map nicht thread-safe->lock! aber nur kurz, ansonsten ab einer gewissen anzahl an clients/blöcken->deadlock)
-      //vermutlich brauch man den nicht mal... (denn das registrieren sollte zu diesem zeitpunkt abgeschlossen sein)
-      //allerdings sollte man nicht gleichzeitig Suchoperationen in ner nicht thread sicheren map durchführen!!!
-      {
-         boost::mutex::scoped_lock lock(staticPoolMapMutex); //wenn man das ausserhalb macht, gibt es ab einer bestimmten anzahl an clients/bloecke einen deadlock
-         receiverPool = getToCbVectorRcfPool(poolKey);
-         if(!receiverPool) UB_THROW( UbException(UB_EXARGS,"kein pool mit poolKey="+UbSystem::toString(poolKey)) );
-      }
-
-      boost::mutex::scoped_lock lock(receiverPool->receiveDataOrderMutex); 
-      
-      // wait until buffer is empty 
-      while(receiverPool->receivedDataOrderBufferIsFull) 
-         receiverPool->dataOrderVectorEmptiedCondition.wait(lock); 
-      
-      receiverPool->recvOrderVec = dataOrder;
-                
-      //////////////////////////////////////////////////////////////////////////
-      //evtl wartende clients benachrichtigen
-      //notify "buffer filled" waiters 
-     
-      receiverPool->receivedDataOrderBufferIsFull = true; 
-      receiverPool->dataOrderVectorFilledCondition.notify_all(); 
-   }
-   /*==================================================================*/
-   static void receivePoolData(const int& poolKey, const RCF::ByteBuffer& byteBuffer) //const typename CbVectorPool< T >::Pool& data)
-   {
-      RcfPoolPtr receiverPool;
-
-      //receiver ermitteln (map nicht thread-safe->lock! aber nur kurz, ansonsten ab einer gewissen anzahl an clients/blöcken->deadlock)
-      //vermutlich brauch man den nicht mal... (denn das registrieren sollte zu diesem zeitpunkt abgeschlossen sein)
-      //allerdings sollte man nicht gleichzeitig Suchoperationen in ner nich thread sicheren map durchführen!!!
-      {
-         boost::mutex::scoped_lock lock(staticPoolMapMutex); //wenn man das ausserhalb macht, gibt es ab einer bestimmten anzahl an clients/bloecke einen deadlock
-         receiverPool = getToCbVectorRcfPool(poolKey);
-         if(!receiverPool) UB_THROW( UbException(UB_EXARGS,"kein pool mit poolKey="+UbSystem::toString(poolKey)) );
-
-         //std::cout<<"poolMap.size()="<<poolMap.size()<<std::endl;
-      }
-
-      boost::mutex::scoped_lock lock(receiverPool->receiveMutex); 
-      //UBLOG(logDEBUG5,"receivePoolVector - entered, pool");
-      // wait until buffer is full 
-      while(!receiverPool->performPoolUpdate)
-         receiverPool->performPoolUpdateCond.wait(lock); 
-      //UBLOG(logDEBUG5,"receivePoolVector - es kann losgehen buggercopy");
-
-      //ACHTUNG! nie einen pool.swap(data) machen -> startadressen der "kleinen" vektoren passen sonst nimmer!
-      if( receiverPool->pool.size()*sizeof( T ) != byteBuffer.getLength() )
-      {
-         UB_THROW( UbException(UB_EXARGS,"pool.size()!=byteBuffer.size()") );
-      }
-      memcpy( (char*)&receiverPool->pool[0], byteBuffer.getPtr(),  byteBuffer.getLength() ); 
-//      memcpy( (char*)&receiverPool->pool[0], (char*)&data[0],  data.size()*sizeof( T ) ); 
-      //UBLOG(logDEBUG5,"receivePoolVector - nach memcopy");
-
-      receiverPool->poolWasUpdated    = true;
-      receiverPool->performPoolUpdate = false;
-      receiverPool->waitForPoolUpdateCond.notify_one(); // notify_one sollte auch hier reichen 
-   }
-
-protected:
-   //////////////////////////////////////////////////////////////////////////
-   ToCbVectorRcfPool(const std::string& rcfReceiveServiceName, const int& poolKey, const int& rcfRank, const size_type& startPoolSize  )
-      :    CbVectorPool< value_type >( startPoolSize ) 
-         , poolKey(poolKey)                           
-         , nofStoredVectors(0) //=Anzahl an Vectoren im Pool, wird bei send/receiveDataOrder gesetzt
-         , counterPrepareReceiveDataOrder(0)          
-         , counterSendDataOrder(0)                    
-         , counterReceiveDataOrder(0)                 
-         , counterPrepareForReceive(0)                
-         , counterReceive(0)                          
-         , counterSend(0)                             
-         , rcfReceiveServiceName(rcfReceiveServiceName)
-         , rcfRank(rcfRank)                                 
-         , receivedDataOrderBufferIsFull(false)
-         , performPoolUpdate(false)
-         , poolWasUpdated(false)
-   {
-   }
-
-public:
-   //returns key of Pool in RcfPoolMap
-   int  getPoolKey()    const { return  this->poolKey;  }
-   /*==================================================================*/
-   //returns rank of process pool data will be send to/received from
-   int  getRemoteRank() const { return  this->rcfRank;  }
-   /*==================================================================*/
-   //returns tag of process pool data will be send to/received from
-   int  getRemoteTag()  const { return  this->rcfRank;  }
-
-protected:
-   /*==================================================================*/
-   void sendDataOrder()
-   {
-      counterSendDataOrder++;
-      if(counterSendDataOrder==this->cbVectorMap.size())
-      {
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1;
-         std::vector< unsigned >localSendOrderVec(nofElements); 
-         unsigned index = 0;
-         localSendOrderVec[index++] = (unsigned)this->pool.size(); //= laenge des vectors
-         if(this->nextCbVectorStartIndexInPool != this->pool.size())  UB_THROW( UbException(UB_EXARGS,"an dieser Stelle sollten nextStartIndex und pool.size() identisch sein!!!") );
-         
-         for(CbVectorMapIter it = this->cbVectorMap.begin(); it!=this->cbVectorMap.end(); ++it)
-         {
-            CbVectorKey vectorKey=0;
-            size_type   dataSize=0, startIndexInPool=0;
-            this->getCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-            if(it->first != vectorKey) UB_THROW( UbException(UB_EXARGS,"key mismatch!") );
-            
-            localSendOrderVec[index++] = (unsigned)vectorKey;         //vectorKey == allocator.getAllocatorKey()
-            localSendOrderVec[index++] = (unsigned)startIndexInPool;  //startIndex in poolVector
-            localSendOrderVec[index++] = (unsigned)dataSize;          //dataSize
-         }
-         
-         //remote prozess=client erhaelt daten
-         recvServices[this->rcfRank].receiveRcfPoolDataOrder(T(), this->poolKey, localSendOrderVec);
-         
-         counterSendDataOrder=0;
-
-         nofStoredVectors = this->cbVectorMap.size();
-      }
-   }
-   /*==================================================================*/
-   void receiveDataOrder()
-   { 
-      counterReceiveDataOrder++;
-      if(counterReceiveDataOrder==this->cbVectorMap.size())
-      {
-         boost::mutex::scoped_lock lock(receiveDataOrderMutex); 
-         
-         // wait until buffer is full 
-         while(!receivedDataOrderBufferIsFull) 
-            dataOrderVectorFilledCondition.wait(lock); //wird in receivePoolVectorForTransmitter freigegeben :)
-         
-         //////////////////////////////////////////////////////////////////////////
-         unsigned nofElements = (unsigned)this->cbVectorMap.size()*3+1; //map MUSS auf beiden seiten gleich gross sein, sonst hat man ein grundsaetzliches problem ;-)
-
-         if(nofElements!=(unsigned)recvOrderVec.size())
-            UB_THROW( UbException(UB_EXARGS,"error... vec size stimmt nicht") );
-
-         unsigned index = 0;
-         this->nextCbVectorStartIndexInPool = recvOrderVec[index++]; //= laenge des vectors
-         this->pool.resize(this->nextCbVectorStartIndexInPool);
-         CbVectorMapIter it = this->cbVectorMap.begin();
-         for(/*index*/; index<nofElements; index+=3, ++it)
-         {
-            CbVectorKey vectorKey        = (CbVectorKey)recvOrderVec.at(index  );
-            size_type   startIndexInPool = (size_type)recvOrderVec.at(index+1);
-            size_type   dataSize         = (size_type)recvOrderVec.at(index+2);
-
-            if(it==this->cbVectorMap.end() || it->first != vectorKey ) 
-               UB_THROW( UbException(UB_EXARGS,"entweder hat map nicht die gleiche reihenfolge oder vectorKey nicht vorhanden") );
-
-            this->setCbVectorData(*it->second/*vec*/, vectorKey, startIndexInPool, dataSize );
-         }
-         if(it!=this->cbVectorMap.end())
-            UB_THROW( UbException(UB_EXARGS,"error... in der map sind scheinbar noch weiter elemente vorhanden, die es auf der send seite nicht gibt...") );
-
-         recvOrderVec.resize(0);
-
-         // notify "buffer emptied" waiters 
-         this->receivedDataOrderBufferIsFull = false; //->somit kann wieder neue reihenfolge empfangen werden
-         dataOrderVectorEmptiedCondition.notify_all(); // notify_one sollte auch hier reichen 
-
-         counterReceiveDataOrder = 0;
-         nofStoredVectors = this->cbVectorMap.size();
-      }
-   }
-   /*==================================================================*/
-   void prepareForSendData() {}
-   /*==================================================================*/
-   void sendData()
-   {
-      counterSend++;
-      if( counterSend == nofStoredVectors )
-      {
-         //remote prozess=client erhaelt daten
-         //T() -> auf der empfangsseite wird automatisch die methode für den entsprechenden ToCbVectorRcfPool< T >
-         //aufgerufen
-         RCF::ByteBuffer byteBuffer( (char*)&this->pool[0], this->pool.size()*sizeof( T ), true );
-         recvServices[this->rcfRank].receiveRcfPoolData( T(), this->poolKey, byteBuffer );
-         counterSend=0;
-      }
-   }                              
-   /*==================================================================*/
-   void prepareForReceiveData() 
-   {
-      counterPrepareForReceive++;
-      if( counterPrepareForReceive == this->nofStoredVectors )
-      {
-         boost::mutex::scoped_lock lock(receiveMutex); 
-         //UBLOG(logDEBUG5,"prepareForReceiveData - entered -> notfifiziere performPoolUpdateCond");
-
-         counterPrepareForReceive = 0;
-         this->performPoolUpdate = true;
-         performPoolUpdateCond.notify_one();
-      }
-   }
-   /*==================================================================*/
-   void receiveData()
-   {
-      if( counterReceive == 0 )
-      {
-         boost::mutex::scoped_lock lock(receiveMutex); 
-         //UBLOG(logDEBUG5,"receiveData - wait for pool update");
-
-         while(!this->poolWasUpdated)
-            waitForPoolUpdateCond.wait(lock);
-         this->poolWasUpdated    = false;
-         //UBLOG(logDEBUG5,"receiveData - pool update seems to be finished");
-      }
-
-      counterReceive++;
-      if( counterReceive == this->nofStoredVectors ) //alle receiver waren hier
-      {
-         counterReceive=0;
-      }
-   }
-
-protected:
-   int       poolKey; //eindeutiger schluessel fuer pool
-   size_type nofStoredVectors;
-
-   size_type counterPrepareReceiveDataOrder;
-   size_type counterSendDataOrder;
-   size_type counterReceiveDataOrder;
-   size_type counterPrepareForReceive;
-   size_type counterReceive;
-   size_type counterSend;
-
-   std::string rcfReceiveServiceName; //nur als SENDER wichtig!!
-   int         rcfRank; 
-
-   bool             receivedDataOrderBufferIsFull; 
-   boost::mutex     receiveDataOrderMutex; 
-   boost::condition dataOrderVectorFilledCondition; 
-   boost::condition dataOrderVectorEmptiedCondition;
-   std::vector< unsigned > recvOrderVec;
-
-   bool             performPoolUpdate;
-   boost::mutex     receiveMutex;
-   bool             poolWasUpdated;
-   boost::condition waitForPoolUpdateCond;
-   boost::condition performPoolUpdateCond;
-};
-
-//////////////////////////////////////////////////////////////////////////
-template< typename T >
-std::vector< RcfClient<IRcfTransmitterReceiverPoolService> >  ToCbVectorRcfPool< T >::recvServices;
-
-template< typename T >
-std::vector< RcfConnection >  ToCbVectorRcfPool< T >::recvConnections;
-
-template< typename T >                                              
-void ToCbVectorRcfPool< T >::setRcfSendToClients(const std::string& recvServiceID, const int& rcfSendToRank)
-{
-   UBLOG(logINFO,"ToCbVectorRcfPool< T >::setRcfSendToClients - invoked setRcfClients");
-   RcfConnection ipConnection = RcfSystem::getIpServiceConnection();
-   if(!ipConnection) UB_THROW( UbException(UB_EXARGS,"ups, no IpServiceConnection") );
-   RcfClient<IRcfIpService> ipService(RCF::TcpEndpoint(ipConnection.getIp(), ipConnection.getPort()));
-
-   //////////////////////////////////////////////////////////////////////////
-   //CalcService Verbindungsdaten holen und nach rank sortiere
-   std::vector<RcfConnection> connections = ipService.getServiceConnections(recvServiceID);
-   if(connections.empty()) UB_THROW( UbException(UB_EXARGS,"no existing RecvService with ID = "+recvServiceID) );
-   std::sort(connections.begin(),connections.end(),RcfConnection::compareRank());
-
-   //////////////////////////////////////////////////////////////////////////
-   //CalcServiceClient für rcfSendToRank übernehmen
-   assert( recvConnections.size() == recvServices.size() );
-
-   if( rcfSendToRank >= (int)recvConnections.size() ) 
-   {
-      recvConnections.resize(rcfSendToRank+1);
-      recvServices.resize( rcfSendToRank+1 );
-   }
-   
-   //Anm.: nur, wenn nicht schon vorhanden (hierfür merkt man sich zusätzlich die connection!
-   if( recvConnections[rcfSendToRank] != connections[rcfSendToRank] )
-   {
-      if( connections[rcfSendToRank].getRank() != rcfSendToRank )
-         UB_THROW( UbException(UB_EXARGS,"error - ranks ranks anscheinend nicht kontinierlich von [0..n]") );
-      
-      recvConnections[rcfSendToRank] = connections[rcfSendToRank];
-      recvServices[rcfSendToRank] = RcfClient<IRcfTransmitterReceiverPoolService>(RCF::TcpEndpoint(connections[rcfSendToRank].getIp(), connections[rcfSendToRank].getPort()));
-      UBLOG(logINFO,"ToCbVectorRcfPool< T >::setRcfSendToClients - rank="<<rcfSendToRank<<" : set RcfClient with connection = " << connections[rcfSendToRank] );
-   }
-   else
-   {
-       UBLOG(logINFO,"ToCbVectorRcfPool< T >::setRcfSendToClients - rank="<<rcfSendToRank<<" : RcfClient already exists with connection = " << connections[rcfSendToRank] );
-   }
-   //for(std::size_t i=0; i<connections.size(); i++)
-   //{
-   //   if( (int)i != connections[i].getRank() )
-   //      UB_THROW( UbException(UB_EXARGS,"recvServices must have continous ranks sarting from 0") );
-   //   recvServices[i] = RcfClient<IRcfTransmitterReceiverPoolService>(RCF::TcpEndpoint(connections[i].getIp(), connections[i].getPort()));
-   //   UBLOG(logINFO,"ToCbVectorRcfPool< T >::setRcfSendToClients - pos="<<i<<" : set RcfClient with connection = " << connections[i] );
-   //}
-}
-
-template<typename T>
-typename ToCbVectorRcfPool<T>::RcfPoolPtrMap ToCbVectorRcfPool<T>::poolMap;
-
-template< typename T >
-boost::mutex ToCbVectorRcfPool< T >::staticPoolMapMutex;
-
-
-//////////////////////////////////////////////////////////////////////////
-//  ToSenderRcfPool
-//////////////////////////////////////////////////////////////////////////
-template<typename T>
-class ToCbVectorSenderRcfPool : public ToTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   ToCbVectorSenderRcfPool(const unsigned int& cbVectorKey, ToCbVectorRcfPool< T >* rcfVectorPool)
-      : rcfVectorPool(rcfVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey,this->rcfVectorPool) );
-   }
-   ~ToCbVectorSenderRcfPool()
-   {
-      if( this->rcfVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         ToCbVectorRcfPool< T >::deleteToCbVectorRcfPool(this->rcfVectorPool->getPoolKey());  
-      }
-   }
-
-   bool isLocalTransmitter()  const { return false;                        }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();  }
-
-   void sendDataSize()          { this->rcfVectorPool->sendDataOrder(); }
-   void receiveDataSize()       { UB_THROW( UbException(UB_EXARGS,"ToRcfPoolSender sends only") );  }   
-   CbVector< T >& receiveData() { UB_THROW( UbException(UB_EXARGS,"ToRcfPoolSender sends only") );  }
-   void prepareForSend()        { this->rcfVectorPool->prepareForSendData(); }
-   void sendData()              { this->rcfVectorPool->sendData(); }
-
-   //info-section (usable for remote transmitter)
-   int  getSendToRank()   const { return  this->rcfVectorPool->getRemoteRank(); }
-   int  getSendToTag()    const { return  this->rcfVectorPool->getRemoteTag();  }
-   int  getRecvFromRank() const { UB_THROW( UbException(UB_EXARGS,"ToCbVectorSenderRcfPool sends only") ); }
-   int  getRecvFromTag()  const { UB_THROW( UbException(UB_EXARGS,"ToCbVectorSenderRcfPool sends only") ); }
-
-   std::string toString() const { return "ToCbVectorSenderRcfPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getSendToRank())+"("+UbSystem::toString(getSendToTag())+")"; }
-
-protected:
-   ToCbVectorRcfPool<T>* rcfVectorPool;
-};
-
-/*==================================================================*/
-template<typename T>
-class ToCbVectorReceiverRcfPool : public ToTransmitter< CbVector< T >  >
-{
-public:
-   typedef CbVector< T > value_type;   
-
-public:
-   ToCbVectorReceiverRcfPool(const unsigned int& cbVectorKey, ToCbVectorRcfPool< T >* rcfVectorPool)
-      : rcfVectorPool(rcfVectorPool)
-   { 
-      this->getData().setAllocator( new CbVectorAllocatorPool<T>(cbVectorKey, this->rcfVectorPool) );
-   }
-   ~ToCbVectorReceiverRcfPool()
-   {
-      if( this->rcfVectorPool->getNofStoredVectors()==1 ) //last entry!
-      {
-         UBLOG(logINFO,"ToCbVectorReceiverRcfPool - loesche map - poolKey "<<this->rcfVectorPool->getPoolKey());
-         ToCbVectorRcfPool< T >::deleteToCbVectorRcfPool(this->rcfVectorPool->getPoolKey());  
-      }
-   }
-   bool isLocalTransmitter()  const { return false;                         }
-   bool isRemoteTransmitter() const { return !this->isLocalTransmitter();   }
-
-   void sendDataSize()      { UB_THROW( UbException(UB_EXARGS,"ToCbVectorReceiverRcfPool receives only") ); }   
-   void receiveDataSize()   { this->rcfVectorPool->receiveDataOrder();   }  
-   void sendData()          { UB_THROW( UbException(UB_EXARGS,"ToCbVectorReceiverRcfPool receives only") ); }
-   void prepareForReceive() { this->rcfVectorPool->prepareForReceiveData(); }
-   CbVector< T >& receiveData()   { this->rcfVectorPool->receiveData(); return this->getData();  }
-
-   //info-section (usable for remote transmitter)
-   int  getSendToRank()   const { UB_THROW( UbException(UB_EXARGS,"ToCbVectorReceiverRcfPool receives only") ); }
-   int  getSendToTag()    const { UB_THROW( UbException(UB_EXARGS,"ToCbVectorReceiverRcfPool receives only") ); }
-   int  getRecvFromRank() const { return  this->rcfVectorPool->getRemoteRank();  }
-   int  getRecvFromTag()  const { return  this->rcfVectorPool->getRemoteTag();  }
-
-   std::string toString() const { return "ToCbVectorReceiverRcfPool<"+(std::string)typeid(T).name()+" to rank (tag)"+UbSystem::toString(getRecvFromRank())+"("+UbSystem::toString(getRecvFromTag())+")"; }
-
-protected:
-   ToCbVectorRcfPool<T>* rcfVectorPool;
-};
-
-#endif //CAB_RCF
-
-#endif //TOCBVECTORRCFPOOL_H
diff --git a/source/ThirdParty/Library/basics/utilities/UbMath.h b/source/ThirdParty/Library/basics/utilities/UbMath.h
index 4571514f86d3cc743008dd9b5d4ba1d5f687dd5e..a17a2054d2c498d2c5adac83687c3b7c7b864c23 100644
--- a/source/ThirdParty/Library/basics/utilities/UbMath.h
+++ b/source/ThirdParty/Library/basics/utilities/UbMath.h
@@ -543,6 +543,11 @@ namespace UbMath
    static const double one_over_sqrt3 =  1.0/sqrt(3.0); //0.577350269
    static const double sqrt2  = sqrt(2.0); //1.4142135
    static const double sqrt3  = sqrt(3.0); //1.7320508
+   static const double one = 1.0;
+   static const double two = 2.0;
+   static const double three = 3.0;
+   static const double four = 4.0;
+   static const double sixteen = 16.0;
 }
 
 #endif
diff --git a/source/ThirdParty/WebDemo/LBMDemoCopy.htm b/source/ThirdParty/WebDemo/LBMDemoCopy.htm
new file mode 100644
index 0000000000000000000000000000000000000000..b80dddf5889f8b39431e72a9b0fc66e4ec88ccf9
--- /dev/null
+++ b/source/ThirdParty/WebDemo/LBMDemoCopy.htm
@@ -0,0 +1,1364 @@
+
+<!DOCTYPE HTML>
+<!--
+	A lattice-Boltzmann fluid simulation in JavaScript, using HTML5 canvas for graphics
+	
+	Copyright 2013, Daniel V. Schroeder
+
+	Permission is hereby granted, free of charge, to any person obtaining a copy of 
+	this software and associated data and documentation (the "Software"), to deal in 
+	the Software without restriction, including without limitation the rights to 
+	use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+	of the Software, and to permit persons to whom the Software is furnished to do 
+	so, subject to the following conditions:
+
+	The above copyright notice and this permission notice shall be included in all 
+	copies or substantial portions of the Software.
+
+	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
+	INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
+	PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
+	ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+	OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
+	OTHER DEALINGS IN THE SOFTWARE.
+
+	Except as contained in this notice, the name of the author shall not be used in 
+	advertising or otherwise to promote the sale, use or other dealings in this 
+	Software without prior written authorization.
+
+	Credits:
+	The "wind tunnel" entry/exit conditions are inspired by Graham Pullan's code
+	(http://www.many-core.group.cam.ac.uk/projects/LBdemo.shtml).  Additional inspiration from 
+	Thomas Pohl's applet (http://thomas-pohl.info/work/lba.html).  Other portions of code are based 
+	on Wagner (http://www.ndsu.edu/physics/people/faculty/wagner/lattice_boltzmann_codes/) and
+	Gonsalves (http://www.physics.buffalo.edu/phy411-506-2004/index.html; code adapted from Succi,
+	http://global.oup.com/academic/product/the-lattice-boltzmann-equation-9780199679249).
+
+	Revision history:
+	First version, with only start/stop, speed, and viscosity controls, February 2013
+	Added resolution control, mouse interaction, plot options, etc., March 2013
+	Added sensor, contrast slider, improved tracer placement, Fy period readout, May 2013
+	Added option to animate using setTimeout instead of requestAnimationFrame, July 2013
+	Added "Flowline" plotting (actually just line segments), August 2013
+	
+	Still to do:
+	* Fix the apparent bug in the force calculation that gives inconsistent results depending
+		on initial conditions.  Perhaps bounce-backs between adjacent barrier sites don't cancel?
+	* Grabbing the sensor while "drag fluid" selected causes a momentary drag at previous mouse location.
+	* Try to pass two-fingered touch events on to the browser, so it's still possible to zoom in and out.
+	* Work on GUI control layout, especially for smaller screens.
+	* Treat ends symmetrically when flow speed is zero.
+	* Try some other visualization techniques.
+-->
+<html>
+
+<head>
+<title>Fluid Dynamics Simulation</title>
+<meta charset="utf-8">
+<meta name="viewport" content="width=620">
+<style>
+	body {background-color:#ffffff; font-family:Arial, sans-serif; font-size:14px;
+					text-align:center;}						/* gray background, center everything */
+	p {margin-left:auto; margin-right:auto; width:600px;}	/* keep paragraphs narrow and centered */
+	input {font-size:115%;}									/* make buttons bigger */
+	input[type="range"] {width:90px;}						/* make sliders shorter */
+	select {font-size:115%;}								/* make selectors bigger too */
+	li {text-align:left;}
+</style>
+</head>
+
+<body>
+
+<h2>Fluid Dynamics Simulation</h2>
+
+<p>By <a href="http://physics.weber.edu/schroeder/">Dan Schroeder</a>, 
+<a href="http://physics.weber.edu">Physics Department</a>, 
+<a href="http://weber.edu">Weber State University</a></p>
+
+<canvas id="theCanvas" width="600" height="240">This application runs only in modern
+browsers. For best results, use Google Chrome.</canvas>
+
+<div>
+	<select id="sizeSelect" onchange="resize()">
+		<option value="10">60 x 24</option>
+		<option value="8">75 x 30</option>
+		<option value="6">100 x 40</option>
+		<option value="5">120 x 48</option>
+		<option value="4">150 x 60</option>
+		<option value="3">200 x 80</option>
+		<option value="2">300 x 120</option>
+		<option value="1">600 x 240</option>
+	</select>
+	<input id="resetFluidButton" type="button" onclick="initFluid()" value="Reset fluid">
+	<input id="stepButton" type="button" onclick="simulate()" value="Step">
+	<input id="startButton" type="button" onclick="startStop()" value="Start">
+</div>
+<div>
+	Flow speed = <span id="speedValue">0.100</span> 
+	<input id="speedSlider" type="range" min="0" max="0.12" step="0.005" value="0.1" onchange="adjustSpeed()">
+	&nbsp;&nbsp;Viscosity = <span id="viscValue">0.020</span>
+	<input id="viscSlider" type="range" min="0.000000001" max="0.02" step="0.000005" value="0.02" onchange="adjustViscosity()">
+</div>
+<div style="margin-top:3px">
+	<select id="mouseSelect">
+		<option value="draw">Draw barriers</option>
+		<option value="erase">Erase barriers</option>
+		<option value="push">Drag fluid</option>
+	</select>
+	<select id="barrierSelect" onchange="placePresetBarrier()">
+		<option>Barrier shapes</option>
+	</select>
+	<input id="clearButton" type="button" onclick="clearBarriers()" value="Clear barriers">
+</div>
+<div>
+	<select id="plotSelect" onchange="paintCanvas()">
+		<option>Plot density</option>
+		<option>Plot x velocity</option>
+		<option>Plot y velocity</option>
+		<option>Plot speed</option>
+		<option selected>Plot curl</option>
+	</select>
+	&nbsp;&nbsp;Contrast:
+	<input id="contrastSlider" type="range" min="-10" max="10" step="1" value="0" onchange="paintCanvas()">
+</div>
+<div>
+	Animation speed:
+	<input id="stepsSlider" type="range" min="1" max="40" step="1" value="20" onchange="resetTimer()">
+	&nbsp;&nbsp;Steps per second: <span id="speedReadout">0</span>
+	&nbsp;&nbsp;<input id="rafCheck" type="checkbox" checked onchange="resetTimer()">Faster?
+</div>
+<div style="margin-top:4px">
+	<!--<input id="pixelCheck" type="checkbox" checked onchange="resetTimer()">Use pixel graphics-->
+	Show:
+	<input id="tracerCheck" type="checkbox" onchange="initTracers()">Tracers
+	<input id="flowlineCheck" type="checkbox" onchange="paintCanvas()">Flowlines
+	<input id="forceCheck" type="checkbox" onchange="paintCanvas()">Force on barriers
+	<input id="sensorCheck" type="checkbox" onchange="paintCanvas()">Sensor
+	<input id="dataCheck" type="checkbox" onchange="showData()">Data
+</div>
+<div id="dataSection" style="display:none">
+	<textarea id="dataArea" rows="8" cols="50" disabled readonly></textarea>
+	<div>
+		<input id="dataButton" type="button" value="Start data collection" onclick="startOrStopData()">
+		<input id="periodButton" type="button" value="Show F_y period" onclick="showPeriod()">
+		<input id="barrierDataButton" type="button" value="Show barrier locations" onclick="showBarrierLocations()">
+		<input id="debugButton" type="button" value="Debug" onclick="debug()" style="display:none">
+	</div>
+</div>
+<p style="text-align:left">This is a simulation of a two-dimensional fluid. Initially the fluid
+is flowing from left to right, and a linear barrier (shown in black) diverts the fluid and creates 
+vortices. The colors indicate the curl, or local rotational motion, of the fluid.  
+Use the controls to adjust the flow speed and viscosity, draw different barriers, drag the
+fluid around, plot other quantities besides the curl, show the force exerted by the fluid
+on the barriers, and measure the fluid's density and velocity at any point. Enjoy!</p>
+
+<p style="text-align:left">The simulation uses a fairly simple
+<a href="http://en.wikipedia.org/wiki/Lattice_Boltzmann_methods">lattice-Boltzmann algorithm</a>, 
+which you can see by viewing the JavaScript source code. As of mid-2013, the simulation
+runs fastest under Chrome on either MacOS or Windows.  Firefox is somewhat slower and Safari slower still,
+while Opera and Internet Explorer are much slower. You can adjust the resolution to increase or
+decrease the simulation speed.</p>
+
+<p style="text-align:left">If you don't see the slider controls above, try updating your browser.
+As of August 2013, the most recent versions of all major browsers should show the sliders.</p>
+
+<p style="text-align:left">This HTML5-canvas-JavaScript web app is a work in progress. It still
+has a few bugs and awkward features, which I hope to address some day.</p>
+
+<p style="text-align:left">
+	Related materials:
+</p>
+<div style="margin-left:auto; margin-right:auto; width:600px;">
+	<ul>
+	<li><a href="LatticeBoltzmannDemo.java.txt">A similar simulation in Java</a></li>
+	<li><a href="LatticeBoltzmannDemo.py.txt">A similar simulation in Python</a></li>
+	<li><a href="FluidSimulationsForUndergrads.pdf">Poster presentation</a> 
+	given at the AAPT summer meeting, 2013 (pdf, 2.6 MB)</li>
+	<li><a href="http://physics.weber.edu/schroeder/javacourse/LatticeBoltzmann.pdf">Instructions</a> 
+	for a lattice-Boltzmann project in a computational physics course</li>
+	<li>A more detailed explanation of the lattice-Boltzmann algorithm (coming soon)</li>
+	</ul>
+</div>
+
+<script src="barrierdata.js"></script>
+<script>
+	// Global variables:	
+	var mobile = navigator.userAgent.match(/iPhone|iPad|iPod|Android|BlackBerry|Opera Mini|IEMobile/i)
+	var canvas = document.getElementById('theCanvas');
+	var context = canvas.getContext('2d');
+	var image = context.createImageData(canvas.width, canvas.height);		// for direct pixel manipulation (faster than fillRect)
+	for (var i=3; i<image.data.length; i+=4) image.data[i] = 255;			// set all alpha values to opaque
+	var sizeSelect = document.getElementById('sizeSelect');
+	sizeSelect.selectedIndex = 5;
+	if (mobile) sizeSelect.selectedIndex = 1;		// smaller works better on mobile platforms
+	var pxPerSquare = Number(sizeSelect.options[sizeSelect.selectedIndex].value);
+													// width of plotted grid site in pixels
+	var xdim = canvas.width / pxPerSquare;			// grid dimensions for simulation
+	var ydim = canvas.height / pxPerSquare;
+	var stepsSlider = document.getElementById('stepsSlider');
+	var startButton = document.getElementById('startButton');
+	var speedSlider = document.getElementById('speedSlider');
+	var speedValue = document.getElementById('speedValue');
+	var viscSlider = document.getElementById('viscSlider');
+	var viscValue = document.getElementById('viscValue');
+	var mouseSelect = document.getElementById('mouseSelect');
+	var barrierSelect = document.getElementById('barrierSelect');
+	for (var barrierIndex=0; barrierIndex<barrierList.length; barrierIndex++) {
+		var shape = document.createElement("option");
+		shape.text = barrierList[barrierIndex].name;
+		barrierSelect.add(shape, null);
+	}
+	var plotSelect = document.getElementById('plotSelect');
+	var contrastSlider = document.getElementById('contrastSlider');
+	//var pixelCheck = document.getElementById('pixelCheck');
+	var tracerCheck = document.getElementById('tracerCheck');
+	var flowlineCheck = document.getElementById('flowlineCheck');
+	var forceCheck = document.getElementById('forceCheck');
+	var sensorCheck = document.getElementById('sensorCheck');
+	var dataCheck = document.getElementById('dataCheck');
+	var rafCheck = document.getElementById('rafCheck');
+	var speedReadout = document.getElementById('speedReadout');
+	var dataSection = document.getElementById('dataSection');
+	var dataArea = document.getElementById('dataArea');
+	var dataButton = document.getElementById('dataButton');
+	var running = false;						// will be true when running
+	var stepCount = 0;
+	var startTime = 0;
+	var four9ths = 4.0 / 9.0;					// abbreviations
+	var one9th = 1.0 / 9.0;
+	var one36th = 1.0 / 36.0;
+	var barrierCount = 0;
+	var barrierxSum = 0;
+	var barrierySum = 0;
+	var barrierFx = 0.0;						// total force on all barrier sites
+	var barrierFy = 0.0;
+	var sensorX = xdim / 2;						// coordinates of "sensor" to measure local fluid properties	
+	var sensorY = ydim / 2;
+	var draggingSensor = false;
+	var mouseIsDown = false;
+	var mouseX, mouseY;							// mouse location in canvas coordinates
+	var oldMouseX = -1, oldMouseY = -1;			// mouse coordinates from previous simulation frame
+	var collectingData = false;
+	var time = 0;								// time (in simulation step units) since data collection started
+	var showingPeriod = false;
+	var lastBarrierFy = 1;						// for determining when F_y oscillation begins
+	var lastFyOscTime = 0;						// for calculating F_y oscillation period
+
+	canvas.addEventListener('mousedown', mouseDown, false);
+	canvas.addEventListener('mousemove', mouseMove, false);
+	document.body.addEventListener('mouseup', mouseUp, false);	// button release could occur outside canvas
+	canvas.addEventListener('touchstart', mouseDown, false);
+	canvas.addEventListener('touchmove', mouseMove, false);
+	document.body.addEventListener('touchend', mouseUp, false);
+
+	// Create the arrays of fluid particle densities, etc. (using 1D arrays for speed):
+	// To index into these arrays, use x + y*xdim, traversing rows first and then columns.
+	var n0 = new Array(xdim*ydim);			// microscopic densities along each lattice direction
+	var nN = new Array(xdim*ydim);
+	var nS = new Array(xdim*ydim);
+	var nE = new Array(xdim*ydim);
+	var nW = new Array(xdim*ydim);
+	var nNE = new Array(xdim*ydim);
+	var nSE = new Array(xdim*ydim);
+	var nNW = new Array(xdim*ydim);
+	var nSW = new Array(xdim*ydim);
+	var rho = new Array(xdim*ydim);			// macroscopic density
+	var ux = new Array(xdim*ydim);			// macroscopic velocity
+	var uy = new Array(xdim*ydim);
+	var curl = new Array(xdim*ydim);
+	var barrier = new Array(xdim * ydim); 	// boolean array of barrier locations
+	var odd = 1;
+
+	// Initialize to a steady rightward flow with no barriers:
+	for (var y=0; y<ydim; y++) {
+		for (var x=0; x<xdim; x++) {
+			barrier[x+y*xdim] = false;
+		}
+	}
+
+	// Create a simple linear "wall" barrier (intentionally a little offset from center):
+	var barrierSize = 8;
+	if (mobile) barrierSize = 4;
+	for (var y=(ydim/2)-barrierSize; y<=(ydim/2)+barrierSize; y++) {
+		var x = Math.round(ydim/3);
+		barrier[x+y*xdim] = true;
+	}
+
+	// Set up the array of colors for plotting (mimicks matplotlib "jet" colormap):
+	// (Kludge: Index nColors+1 labels the color used for drawing barriers.)
+	var nColors = 400;							// there are actually nColors+2 colors
+	var hexColorList = new Array(nColors+2);
+	var redList = new Array(nColors+2);
+	var greenList = new Array(nColors+2);
+	var blueList = new Array(nColors+2);
+	for (var c=0; c<=nColors; c++) {
+		var r, g, b;
+		if (c < nColors/8) {
+			r = 0; g = 0; b = Math.round(255 * (c + nColors/8) / (nColors/4));
+		} else if (c < 3*nColors/8) {
+			r = 0; g = Math.round(255 * (c - nColors/8) / (nColors/4)); b = 255;
+		} else if (c < 5*nColors/8) {
+			r = Math.round(255 * (c - 3*nColors/8) / (nColors/4)); g = 255; b = 255 - r;
+		} else if (c < 7*nColors/8) {
+			r = 255; g = Math.round(255 * (7*nColors/8 - c) / (nColors/4)); b = 0;
+		} else {
+			r = Math.round(255 * (9*nColors/8 - c) / (nColors/4)); g = 0; b = 0;
+		}
+		redList[c] = r; greenList[c] = g; blueList[c] = b;
+		hexColorList[c] = rgbToHex(r, g, b);
+	}
+	redList[nColors+1] = 0; greenList[nColors+1] = 0; blueList[nColors+1] = 0;	// barriers are black
+	hexColorList[nColors+1] = rgbToHex(0, 0, 0);
+
+	// Functions to convert rgb to hex color string (from stackoverflow):
+	function componentToHex(c) {
+		var hex = c.toString(16);
+		return hex.length == 1 ? "0" + hex : hex;
+	}
+	function rgbToHex(r, g, b) {
+		return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b);
+	}
+
+	// Initialize array of partially transparant blacks, for drawing flow lines:
+	var transBlackArraySize = 50;
+	var transBlackArray = new Array(transBlackArraySize);
+	for (var i=0; i<transBlackArraySize; i++) {
+		transBlackArray[i] = "rgba(0,0,0," + Number(i/transBlackArraySize).toFixed(2) + ")";
+	}
+
+	// Initialize tracers (but don't place them yet):
+	var nTracers = 144;
+	var tracerX = new Array(nTracers);
+	var tracerY = new Array(nTracers);
+	for (var t=0; t<nTracers; t++) {
+		tracerX[t] = 0.0; tracerY[t] = 0.0;
+	}
+
+	initFluid();		// initialize to steady rightward flow
+
+	// Mysterious gymnastics that are apparently useful for better cross-browser animation timing:
+	window.requestAnimFrame = (function(callback) {
+		return 	window.requestAnimationFrame || 
+			window.webkitRequestAnimationFrame || 
+			window.mozRequestAnimationFrame || 
+			window.oRequestAnimationFrame || 
+			window.msRequestAnimationFrame ||
+			function(callback) {
+				window.setTimeout(callback, 1);		// second parameter is time in ms
+			};
+	})();
+
+	// Simulate function executes a bunch of steps and then schedules another call to itself:
+	function simulate() {
+		var stepsPerFrame = Number(stepsSlider.value);			// number of simulation steps per animation frame
+		setBoundaries();
+		// Test to see if we're dragging the fluid:
+		var pushing = false;
+		var pushX, pushY, pushUX, pushUY;
+		if (mouseIsDown && mouseSelect.selectedIndex==2) {
+			if (oldMouseX >= 0) {
+				var gridLoc = canvasToGrid(mouseX, mouseY);
+				pushX = gridLoc.x;
+				pushY = gridLoc.y;
+				pushUX = (mouseX - oldMouseX) / pxPerSquare / stepsPerFrame;
+				pushUY = -(mouseY - oldMouseY) / pxPerSquare / stepsPerFrame;	// y axis is flipped
+				if (Math.abs(pushUX) > 0.1) pushUX = 0.1 * Math.abs(pushUX) / pushUX;
+				if (Math.abs(pushUY) > 0.1) pushUY = 0.1 * Math.abs(pushUY) / pushUY;
+				pushing = true;
+			}
+			oldMouseX = mouseX; oldMouseY = mouseY;
+		} else {
+			oldMouseX = -1; oldMouseY = -1;
+		}
+		// Execute a bunch of time steps:
+		for (var step = 0; step < stepsPerFrame; step++) {
+		    setBoundaries();
+			collide();
+			//stream();
+			if (odd == 1) { odd = 0; }
+			else { odd = 1; }
+			if (tracerCheck.checked) moveTracers();
+			if (pushing) push(pushX, pushY, pushUX, pushUY);
+			time++;
+			if (showingPeriod && (barrierFy > 0) && (lastBarrierFy <=0)) {
+				var thisFyOscTime = time - barrierFy/(barrierFy-lastBarrierFy);	// interpolate when Fy changed sign
+				if (lastFyOscTime > 0) {
+					var period = thisFyOscTime - lastFyOscTime;
+					dataArea.innerHTML += Number(period).toFixed(2) + "\n";
+					dataArea.scrollTop = dataArea.scrollHeight;
+				}
+				lastFyOscTime = thisFyOscTime;
+			}
+			lastBarrierFy = barrierFy;
+		}
+		paintCanvas();
+		if (collectingData) {
+			writeData();
+			if (time >= 10000) startOrStopData();
+		}
+		if (running) {
+			stepCount += stepsPerFrame;
+			var elapsedTime = ((new Date()).getTime() - startTime) / 1000;	// time in seconds
+			speedReadout.innerHTML = Number(stepCount/elapsedTime).toFixed(0);
+		}
+		var stable = true;
+		for (var x=0; x<xdim; x++) {
+			var index = x + (ydim/2)*xdim;	// look at middle row only
+			if (rho[index] <= 0) stable = false;
+		}
+		if (!stable) {
+			window.alert("The simulation has become unstable due to excessive fluid speeds.");
+			startStop();
+			initFluid();
+		}
+		if (running) {
+			if (rafCheck.checked) {
+				requestAnimFrame(function() { simulate(); });	// let browser schedule next frame
+			} else {
+				window.setTimeout(simulate, 1);	// schedule next frame asap (nominally 1 ms but always more)
+			}
+		}
+	}
+
+	// Set the fluid variables at the boundaries, according to the current slider value:
+	function setBoundaries() {
+		var u0 = Number(speedSlider.value);
+		for (var x=0; x<xdim; x++) {
+			setEquil(x, 0, u0, 0, 1);
+			setEquil(x, ydim-1, u0, 0, 1);
+		}
+		for (var y=1; y<ydim-1; y++) {
+			setEquil(0, y, u0, 0, 1);
+			setEquil(xdim-1, y, u0, 0, 1);
+		}
+	}
+
+	// Collide particles within each cell (here's the physics!):
+	function collideOLD() {
+		var viscosity = Number(viscSlider.value);	// kinematic viscosity coefficient in natural units
+		var omega = 1 / (3*viscosity + 0.5);		// reciprocal of relaxation time
+		for (var y=1; y<ydim-1; y++) {
+			for (var x=1; x<xdim-1; x++) {
+				var i = x + y*xdim;		// array index for this lattice site
+				var thisrho = n0[i] + nN[i] + nS[i] + nE[i] + nW[i] + nNW[i] + nNE[i] + nSW[i] + nSE[i];
+				rho[i] = thisrho;
+				var thisux = (nE[i] + nNE[i] + nSE[i] - nW[i] - nNW[i] - nSW[i]) / thisrho;
+				ux[i] = thisux;
+				var thisuy = (nN[i] + nNE[i] + nNW[i] - nS[i] - nSE[i] - nSW[i]) / thisrho;
+				uy[i] = thisuy
+				var one9thrho = one9th * thisrho;		// pre-compute a bunch of stuff for optimization
+				var one36thrho = one36th * thisrho;
+				var ux3 = 3 * thisux;
+				var uy3 = 3 * thisuy;
+				var ux2 = thisux * thisux;
+				var uy2 = thisuy * thisuy;
+				var uxuy2 = 2 * thisux * thisuy;
+				var u2 = ux2 + uy2;
+				var u215 = 1.5 * u2;
+				n0[i]  += omega * (four9ths*thisrho * (1                        - u215) - n0[i]);
+				nE[i]  += omega * (   one9thrho * (1 + ux3       + 4.5*ux2        - u215) - nE[i]);
+				nW[i]  += omega * (   one9thrho * (1 - ux3       + 4.5*ux2        - u215) - nW[i]);
+				nN[i]  += omega * (   one9thrho * (1 + uy3       + 4.5*uy2        - u215) - nN[i]);
+				nS[i]  += omega * (   one9thrho * (1 - uy3       + 4.5*uy2        - u215) - nS[i]);
+				nNE[i] += omega * (  one36thrho * (1 + ux3 + uy3 + 4.5*(u2+uxuy2) - u215) - nNE[i]);
+				nSE[i] += omega * (  one36thrho * (1 + ux3 - uy3 + 4.5*(u2-uxuy2) - u215) - nSE[i]);
+				nNW[i] += omega * (  one36thrho * (1 - ux3 + uy3 + 4.5*(u2-uxuy2) - u215) - nNW[i]);
+				nSW[i] += omega * (  one36thrho * (1 - ux3 - uy3 + 4.5*(u2+uxuy2) - u215) - nSW[i]);
+			}
+		}
+		for (var y=1; y<ydim-2; y++) {
+			nW[xdim-1+y*xdim] = nW[xdim-2+y*xdim];		// at right end, copy left-flowing densities from next row to the left
+			nNW[xdim-1+y*xdim] = nNW[xdim-2+y*xdim];
+			nSW[xdim-1+y*xdim] = nSW[xdim-2+y*xdim];
+		}
+	}
+
+	///----------------------------Cumulants
+	function collide() {
+	    var viscosity = Number(viscSlider.value); // kinematic viscosity coefficient in natural units
+	    var omega = 1 / (3 * viscosity + 0.5); 	// reciprocal of relaxation time
+	    //var om3 = 9.0 * (8.0 - 6.0 * omega + omega * omega) / (36.0 - 18 * omega + 2 * omega * omega); //
+	    var om3 = 3.0 * (omega - 2.0) / (omega - 3.0);
+	    for (var y = 1; y < ydim - 1; y++) {
+	        for (var x = 1; x < xdim - 1; x++) {
+	            if (x > xdim - 5) { omega = 1; }
+	            //if (true)
+	          //  {//(!barrier[x+y*xdim]){
+	            else { omega = 1 / (3 * viscosity + 0.5); }
+	            if (!barrier[x+y*xdim]){
+	            var i = x + y * xdim; 	// array index for this lattice site
+	            var ix=(x+1)+ y*xdim;
+	            var iy=x+(y+1)*xdim;
+	            var ixy=(x+1)+(y+1)*xdim;
+var maa; 
+var mab; 
+var mac; 
+var mba; 
+var mbb; 
+var mbc; 
+var mca; 
+var mcb; 
+var mcc; 
+	            
+	            if(odd==1){
+	             maa = nSW[ixy];
+	             mab = nW[ix];
+	             mac = nNW[ix];
+	             mba = nS[iy];
+	             mbb = n0[i];
+	             mbc = nN[i];
+	             mca = nSE[iy];
+	             mcb = nE[i];
+	             mcc = nNE[i];
+	            }
+	            else
+	            {
+	             maa = nNE[ixy];
+	             mab = nE[ix];
+	             mac = nSE[ix];
+	             mba = nN[iy];
+	             mbb = n0[i];
+	             mbc = nS[i];
+	             mca = nNW[iy];
+	             mcb = nW[i];
+	             mcc = nSW[i];
+                }
+	            
+	            var thisrho = maa + mab + mac + mba + mbb + mbc + mca + mcb + mcc;
+	            rho[i] = thisrho;
+	            var thisux = (mca+mcb+mcc-maa-mab-mac) / thisrho;
+	            ux[i] = thisux;
+	            var thisuy = (mac+mbc+mcc-maa-mba-mca) / thisrho;
+	            uy[i] = thisuy;
+
+
+	            
+	            var n1=maa+mab+mac;
+                var n2=(-1-thisuy)*maa-thisuy*mab+(1-thisuy)*mac;
+                     mac=(-1-thisuy)*(-1-thisuy)*maa+thisuy*thisuy*mab+(1-thisuy)*(1-thisuy)*mac;
+                     maa=n1;
+                     mab=n2;
+
+
+                     n1=mba+mbb+mbc;
+                     n2=(-1-thisuy)*mba-thisuy*mbb+(1-thisuy)*mbc;
+                     mbc=(-1-thisuy)*(-1-thisuy)*mba+thisuy*thisuy*mbb+(1-thisuy)*(1-thisuy)*mbc;
+                     mba=n1;
+                     mbb=n2;
+
+
+                     n1=mca+mcb+mcc;
+                     n2=(-1-thisuy)*mca-thisuy*mcb+(1-thisuy)*mcc;
+                     mcc=(-1-thisuy)*(-1-thisuy)*mca+thisuy*thisuy*mcb+(1-thisuy)*(1-thisuy)*mcc;
+                     mca=n1;
+                     mcb=n2;
+///// y
+                     n1=maa+mba+mca;
+                     n2=(-1-thisux)*maa-thisux*mba+(1-thisux)*mca;
+                     mca=(-1-thisux)*(-1-thisux)*maa+thisux*thisux*mba+(1-thisux)*(1-thisux)*mca;
+                     maa=n1;
+                     mba=n2;
+
+                     n1=mab+mbb+mcb;
+                     n2=(-1-thisux)*mab-thisux*mbb+(1-thisux)*mcb;
+                     mcb=(-1-thisux)*(-1-thisux)*mab+thisux*thisux*mbb+(1-thisux)*(1-thisux)*mcb;
+                     mab=n1;
+                     mbb=n2;
+
+                     n1=mac+mbc+mcc;
+                     n2=(-1-thisux)*mac-thisux*mbc+(1-thisux)*mcc;
+                     mcc=(-1-thisux)*(-1-thisux)*mac+thisux*thisux*mbc+(1-thisux)*(1-thisux)*mcc;
+                     mac=n1;
+                     mbc=n2;
+	            //
+
+	            //----fast transform
+	            
+//	            var n1 = mcc + maa - mac - mca - thisux * thisuy / thisrho;
+//	            var n2;
+//	            //var pp = 2 * (mca + mac + maa + mcc) + mba + mbc + mab + mcb - (thisux * thisux + thisuy * thisuy) / thisrho;
+//	            var pxx = -mba - mbc + mab + mcb - (thisux * thisux - thisuy * thisuy) / thisrho;
+//	            maa = thisrho;
+//	            mba = 0;
+//	            mab = 0;
+//	            mbb = n1;
+
+	            //-----!FastTransform
+
+                     //now the collision:
+                     
+                     var pp=mac+mca;
+                     var pxx = mca - mac;
+                     var CUMcc = mcc - (mca * mac + 2 * mbb * mbb) / thisrho;
+
+                     //----
+                     var dxUx = (-0.5 * omega * (2 * mca - mac) - 0.5 * (mca + mac - maa)) / thisrho;
+                     var dyUy = (-0.5 * omega * (2 * mac - mca) - 0.5 * (mca + mac - maa)) / thisrho;
+                     //----
+
+                    // pp = thisrho/3.0*(dxUx*dxUx+dyUy*dyUy)+ 2.0 / 3.0 * thisrho; 
+                    // CUMcc = 0.0;
+                    // pxx =thisrho/3.0*(dxUx*dxUx-dyUy*dyUy)*omega-3*thisrho*(1.0-omega*0.5)*(thisux*thisux*dxUx-thisuy*thisuy*dyUy)+ pxx * (1.0 - omega);
+                    var om2=omega;//1.99;
+var quadLim = 0.01; //0.001/(0.01+uu+1.0e-9);			
+var limit1 = om2 + (1.0 - om2) * Math.abs(pp) / (Math.abs(pp) + 0.5); //4 Konstantin
+			pp=2.0/3.0*thisrho*limit1+(1.0-limit1)*pp;
+		     //pp =  2.0 / 3.0 * thisrho;
+                     pxx = -3*thisrho*(1.0-omega*0.5)*(thisux*thisux*dxUx-thisuy*thisuy*dyUy)+ pxx * (1.0 - omega);
+                     mbb = mbb * (1.0 - omega);
+                     mca = 0.5 * (pp + pxx);
+                     mac = 0.5 * (pp - pxx);
+                    //-----without limiter
+                    // mcb = 0.0; //mcb * (1.0 - om3);
+
+                    // mbc = 0.0; //mbc * (1.0 - om3);
+                     //---with limiter
+                     var uu = Math.sqrt(thisux * thisux + thisuy * thisuy);
+                     
+                     var limIT = om3 + (1.0 - om3) * Math.abs(mcb) / (Math.abs(mcb) + quadLim);
+                     mcb = mcb * (1.0 - limIT);
+                     limIT = om3 + (1.0 - om3) * Math.abs(mbc) / (Math.abs(mbc) + quadLim);
+                     mbc = mbc * (1.0 - limIT);
+                     //---!limiter
+                     
+                     mcc = /*CUMcc+ */  (mca * mac + 2 * mbb * mbb) / thisrho;
+
+
+                     ////x-Richtung
+
+                     n1 = (mcc + mac * (-1 + thisux) * thisux + mbc * (-1 + 2 * thisux)) * 0.5;
+                     n2 = mac - mcc - 2 * mbc * thisux - mac * thisux * thisux;
+                     mcc = (mbc + mcc + 2 * mbc * thisux + mac * thisux * (1 + thisux)) * 0.5;
+                     mac = n1;
+                     mbc = n2;
+
+                     n1 = (mcb + mab * (-1 + thisux) * thisux + mbb * (-1 + 2 * thisux)) * 0.5;
+                     n2 = mab - mcb - 2 * mbb * thisux - mab * thisux * thisux;
+                     mcb = (mbb + mcb + 2 * mbb * thisux + mab * thisux * (1 + thisux)) * 0.5;
+                     mab = n1;
+                     mbb = n2;
+
+                     n1 = (mca + maa * (-1 + thisux) * thisux + mba * (-1 + 2 * thisux)) * 0.5;
+                     n2 = maa - mca - 2 * mba * thisux - maa * thisux * thisux;
+                     mca = (mba + mca + 2 * mba * thisux + maa * thisux * (1 + thisux)) * 0.5;
+                     maa = n1;
+                     mba = n2;
+
+                     ////y-Richtung
+                     n1 = (mcc + mca * (-1 + thisuy) * thisuy + mcb * (-1 + 2 * thisuy)) * 0.5;
+                     n2 = mca - mcc - 2 * mcb * thisuy - mca * thisuy * thisuy;
+                     mcc = (mcb + mcc + 2 * mcb * thisuy + mca * thisuy * (1 + thisuy)) * 0.5;
+                     mca = n1;
+                     mcb = n2;
+
+                     n1 = (mbc + mba * (-1 + thisuy) * thisuy + mbb * (-1 + 2 * thisuy)) * 0.5;
+                     n2 = mba - mbc - 2 * mbb * thisuy - mba * thisuy * thisuy;
+                     mbc = (mbb + mbc + 2 * mbb * thisuy + mba * thisuy * (1 + thisuy)) * 0.5;
+                     mba = n1;
+                     mbb = n2;
+
+                     n1 = (mac + maa * (-1 + thisuy) * thisuy + mab * (-1 + 2 * thisuy)) * 0.5;
+                     n2 = maa - mac - 2 * mab * thisuy - maa * thisuy * thisuy;
+                     mac = (mab + mac + 2 * mab * thisuy + maa * thisuy * (1 + thisuy)) * 0.5;
+                     maa = n1;
+                     mab = n2;
+     
+	            
+	            if (odd==1){
+	            n0[i] =mbb;
+	            nW[ix] =mcb;
+	            nE[i] =mab;
+	            nS[iy] =mbc;
+	            nN[i] =mba;
+	            nSW[ixy]=mcc;
+	            nNW[ix]=mca;
+	            nSE[iy]=mac;
+	            nNE[i] = maa;
+	            
+	            }
+	            else{
+	            n0[i] =mbb;
+	            nE[ix] =mcb;
+	            nW[i] =mab;
+	            nN[iy] =mbc;
+	            nS[i] =mba;
+	            nNE[ixy]=mcc;
+	            nSE[ix]=mca;
+	            nNW[iy]=mac;
+	            nSW[i] = maa;
+	            
+	            }	            
+	        }
+	    }
+	    }
+	   // if (odd == 0) {
+	   //     for (var y = 1; y < ydim - 2; y++) {
+	          //     nE[xdim - 1 + y * xdim] = nE[xdim - 2 + y * xdim]; 	// at right end, copy left-flowing densities from next row to the left
+	          //     nNE[xdim - 1 + y * xdim] = nNE[xdim - 2 + y * xdim];
+	          //     nSE[xdim - 1 + y * xdim] = nSE[xdim - 2 + y * xdim];
+
+	             //  nW[1+y * xdim] += 0.0001 * 3;
+	             //  nWE[1+y * xdim] += 0.0001;
+	             //  nWS[1+y * xdim] += 0.0001; 
+	     //   }
+	    //}
+	    //else {
+	      //  for (var y = 1; y < ydim - 2; y++) {
+	            //   nW[xdim - 1 + y * xdim] = nW[xdim - 2 + y * xdim]; 	// at right end, copy left-flowing densities from next row to the left
+	            //   nNW[xdim - 1 + y * xdim] = nNW[xdim - 2 + y * xdim];
+	            //   nSW[xdim - 1 + y * xdim] = nSW[xdim - 2 + y * xdim];
+	        //}
+	    //}
+	    
+	}
+
+////------------------------------!Cumulants
+
+
+
+	// Move particles along their directions of motion:
+	function stream() {
+		barrierCount = 0; barrierxSum = 0; barrierySum = 0;
+		barrierFx = 0.0; barrierFy = 0.0;
+		for (var y=ydim-2; y>0; y--) {			// first start in NW corner...
+			for (var x=1; x<xdim-1; x++) {
+				nN[x+y*xdim] = nN[x+(y-1)*xdim];			// move the north-moving particles
+				nNW[x+y*xdim] = nNW[x+1+(y-1)*xdim];		// and the northwest-moving particles
+			}
+		}
+		for (var y=ydim-2; y>0; y--) {			// now start in NE corner...
+			for (var x=xdim-2; x>0; x--) {
+				nE[x+y*xdim] = nE[x-1+y*xdim];			// move the east-moving particles
+				nNE[x+y*xdim] = nNE[x-1+(y-1)*xdim];		// and the northeast-moving particles
+			}
+		}
+		for (var y=1; y<ydim-1; y++) {			// now start in SE corner...
+			for (var x=xdim-2; x>0; x--) {
+				nS[x+y*xdim] = nS[x+(y+1)*xdim];			// move the south-moving particles
+				nSE[x+y*xdim] = nSE[x-1+(y+1)*xdim];		// and the southeast-moving particles
+			}
+		}
+		for (var y=1; y<ydim-1; y++) {				// now start in the SW corner...
+			for (var x=1; x<xdim-1; x++) {
+				nW[x+y*xdim] = nW[x+1+y*xdim];			// move the west-moving particles
+				nSW[x+y*xdim] = nSW[x+1+(y+1)*xdim];		// and the southwest-moving particles
+			}
+		}
+		for (var y=1; y<ydim-1; y++) {				// Now handle bounce-back from barriers
+			for (var x=1; x<xdim-1; x++) {
+				if (barrier[x+y*xdim]) {
+					var index = x + y*xdim;
+					nE[x+1+y*xdim] = nW[index];
+					nW[x-1+y*xdim] = nE[index];
+					nN[x+(y+1)*xdim] = nS[index];
+					nS[x+(y-1)*xdim] = nN[index];
+					nNE[x+1+(y+1)*xdim] = nSW[index];
+					nNW[x-1+(y+1)*xdim] = nSE[index];
+					nSE[x+1+(y-1)*xdim] = nNW[index];
+					nSW[x-1+(y-1)*xdim] = nNE[index];
+					// Keep track of stuff needed to plot force vector:
+					barrierCount++;
+					barrierxSum += x;
+					barrierySum += y;
+					barrierFx += nE[index] + nNE[index] + nSE[index] - nW[index] - nNW[index] - nSW[index];
+					barrierFy += nN[index] + nNE[index] + nNW[index] - nS[index] - nSE[index] - nSW[index];
+				}
+			}
+		}
+	}
+
+	// Move the tracer particles:
+	function moveTracers() {
+		for (var t=0; t<nTracers; t++) {
+			var roundedX = Math.round(tracerX[t]);
+			var roundedY = Math.round(tracerY[t]);
+			var index = roundedX + roundedY*xdim;
+			tracerX[t] += ux[index];
+			tracerY[t] += uy[index];
+			if (tracerX[t] > xdim-1) {
+				tracerX[t] = 0;
+				tracerY[t] = Math.random() * ydim;
+			}
+		}
+	}
+
+	// "Drag" the fluid in a direction determined by the mouse (or touch) motion:
+	// (The drag affects a "circle", 5 px in diameter, centered on the given coordinates.)
+	function push(pushX, pushY, pushUX, pushUY) {
+		// First make sure we're not too close to edge:
+		var margin = 3;
+		if ((pushX > margin) && (pushX < xdim-1-margin) && (pushY > margin) && (pushY < ydim-1-margin)) {
+			for (var dx=-1; dx<=1; dx++) {
+				setEquil(pushX+dx, pushY+2, pushUX, pushUY);
+				setEquil(pushX+dx, pushY-2, pushUX, pushUY);
+			}
+			for (var dx=-2; dx<=2; dx++) {
+				for (var dy=-1; dy<=1; dy++) {
+					setEquil(pushX+dx, pushY+dy, pushUX, pushUY);
+				}
+			}
+		}
+	}
+
+	// Set all densities in a cell to their equilibrium values for a given velocity and density:
+	// (If density is omitted, it's left unchanged.)
+	function setEquil(x, y, newux, newuy, newrho) {
+	    var i = x + y * xdim;
+	    var ix = (x + 1) + y * xdim;
+	    var iy = x + (y + 1) * xdim;
+	    var ixy = (x + 1) + (y + 1) * xdim;
+
+		if (typeof newrho == 'undefined') {
+			newrho = rho[i];
+		}
+		var ux3 = 3 * newux;
+		var uy3 = 3 * newuy;
+		var ux2 = newux * newux;
+		var uy2 = newuy * newuy;
+		var uxuy2 = 2 * newux * newuy;
+		var u2 = ux2 + uy2;
+		var u215 = 1.5 * u2;
+		if (odd == 0) {
+		    n0[i] = four9ths * newrho * (1 - u215);
+		    nW[ix] = one9th * newrho * (1 + ux3 + 4.5 * ux2 - u215);
+		    nE[i] = one9th * newrho * (1 - ux3 + 4.5 * ux2 - u215);
+		    nS[iy] = one9th * newrho * (1 + uy3 + 4.5 * uy2 - u215);
+		    nN[i] = one9th * newrho * (1 - uy3 + 4.5 * uy2 - u215);
+		    nSW[ixy] = one36th * newrho * (1 + ux3 + uy3 + 4.5 * (u2 + uxuy2) - u215);
+		    nNW[ix] = one36th * newrho * (1 + ux3 - uy3 + 4.5 * (u2 - uxuy2) - u215);
+		    nSE[iy] = one36th * newrho * (1 - ux3 + uy3 + 4.5 * (u2 - uxuy2) - u215);
+		    nNE[i] = one36th * newrho * (1 - ux3 - uy3 + 4.5 * (u2 + uxuy2) - u215);
+		    rho[i] = newrho;
+		    ux[i] = newux;
+		    uy[i] = newuy;
+		}
+		else {
+		    n0[i] = four9ths * newrho * (1 - u215);
+		    nE[ix] = one9th * newrho * (1 + ux3 + 4.5 * ux2 - u215);
+		    nW[i] = one9th * newrho * (1 - ux3 + 4.5 * ux2 - u215);
+		    nN[iy] = one9th * newrho * (1 + uy3 + 4.5 * uy2 - u215);
+		    nS[i] = one9th * newrho * (1 - uy3 + 4.5 * uy2 - u215);
+		    nNE[ixy] = one36th * newrho * (1 + ux3 + uy3 + 4.5 * (u2 + uxuy2) - u215);
+		    nSE[ix] = one36th * newrho * (1 + ux3 - uy3 + 4.5 * (u2 - uxuy2) - u215);
+		    nNW[iy] = one36th * newrho * (1 - ux3 + uy3 + 4.5 * (u2 - uxuy2) - u215);
+		    nSW[i] = one36th * newrho * (1 - ux3 - uy3 + 4.5 * (u2 + uxuy2) - u215);
+		    rho[i] = newrho;
+		    ux[i] = newux;
+		    uy[i] = newuy;
+		
+		}
+	}
+
+	// Initialize the tracer particles:
+	function initTracers() {
+		if (tracerCheck.checked) {
+			var nRows = Math.ceil(Math.sqrt(nTracers));
+			var dx = xdim / nRows;
+			var dy = ydim / nRows;
+			var nextX = dx / 2;
+			var nextY = dy / 2;
+			for (var t=0; t<nTracers; t++) {
+				tracerX[t] = nextX;
+				tracerY[t] = nextY;
+				nextX += dx;
+				if (nextX > xdim) {
+					nextX = dx / 2;
+					nextY += dy;
+				}
+			}
+		}
+		paintCanvas();
+	}
+
+	// Paint the canvas:
+	function paintCanvas() {
+		var cIndex=0;
+		var contrast = Math.pow(1.2,Number(contrastSlider.value));
+		var plotType = plotSelect.selectedIndex;
+		//var pixelGraphics = pixelCheck.checked;
+		if (plotType == 4) computeCurl();
+		for (var y=0; y<ydim; y++) {
+			for (var x=0; x<xdim; x++) {
+				if (barrier[x+y*xdim]) {
+					cIndex = nColors + 1;	// kludge for barrier color which isn't really part of color map
+				} else {
+					if (plotType == 0) {
+						cIndex = Math.round(nColors * ((rho[x+y*xdim]-1)*6*contrast + 0.5));
+					} else if (plotType == 1) {
+						cIndex = Math.round(nColors * (ux[x+y*xdim]*2*contrast + 0.5));
+					} else if (plotType == 2) {
+						cIndex = Math.round(nColors * (uy[x+y*xdim]*2*contrast + 0.5));
+					} else if (plotType == 3) {
+						var speed = Math.sqrt(ux[x+y*xdim]*ux[x+y*xdim] + uy[x+y*xdim]*uy[x+y*xdim]);
+						cIndex = Math.round(nColors * (speed*4*contrast));
+					} else {
+						cIndex = Math.round(nColors * (curl[x+y*xdim]*5*contrast + 0.5));
+					}
+					if (cIndex < 0) cIndex = 0;
+					if (cIndex > nColors) cIndex = nColors;
+				}
+				//if (pixelGraphics) {
+					//colorSquare(x, y, cIndex);
+				colorSquare(x, y, redList[cIndex], greenList[cIndex], blueList[cIndex]);
+				//} else {
+				//	context.fillStyle = hexColorList[cIndex];
+				//	context.fillRect(x*pxPerSquare, (ydim-y-1)*pxPerSquare, pxPerSquare, pxPerSquare);
+				//}
+			}
+		}
+		//if (pixelGraphics) 
+		context.putImageData(image, 0, 0);		// blast image to the screen
+		// Draw tracers, force vector, and/or sensor if appropriate:
+		if (tracerCheck.checked) drawTracers();
+		if (flowlineCheck.checked) drawFlowlines();
+		if (forceCheck.checked) drawForceArrow(barrierxSum/barrierCount, barrierySum/barrierCount, barrierFx, barrierFy);
+		if (sensorCheck.checked) drawSensor();
+	}
+
+	// Color a grid square in the image data array, one pixel at a time (rgb each in range 0 to 255):
+	function colorSquare(x, y, r, g, b) {
+	//function colorSquare(x, y, cIndex) {		// for some strange reason, this version is quite a bit slower on Chrome
+		//var r = redList[cIndex];
+		//var g = greenList[cIndex];
+		//var b = blueList[cIndex];
+		var flippedy = ydim - y - 1;			// put y=0 at the bottom
+		for (var py=flippedy*pxPerSquare; py<(flippedy+1)*pxPerSquare; py++) {
+			for (var px=x*pxPerSquare; px<(x+1)*pxPerSquare; px++) {
+				var index = (px + py*image.width) * 4;
+				image.data[index+0] = r;
+				image.data[index+1] = g;
+				image.data[index+2] = b;
+			}
+		}
+	}
+
+	// Compute the curl (actually times 2) of the macroscopic velocity field, for plotting:
+	function computeCurl() {
+		for (var y=1; y<ydim-1; y++) {			// interior sites only; leave edges set to zero
+			for (var x=1; x<xdim-1; x++) {
+				curl[x+y*xdim] = uy[x+1+y*xdim] - uy[x-1+y*xdim] - ux[x+(y+1)*xdim] + ux[x+(y-1)*xdim];
+			}
+		}
+	}
+
+	// Draw the tracer particles:
+	function drawTracers() {
+		context.fillStyle = "rgb(150,150,150)";
+		for (var t=0; t<nTracers; t++) {
+			var canvasX = (tracerX[t]+0.5) * pxPerSquare;
+			var canvasY = canvas.height - (tracerY[t]+0.5) * pxPerSquare;
+			context.fillRect(canvasX-1, canvasY-1, 2, 2);
+		}
+	}
+
+	// Draw a grid of short line segments along flow directions:
+	function drawFlowlines() {
+		var pxPerFlowline = 10;
+		if (pxPerSquare == 1) pxPerFlowline = 6;
+		if (pxPerSquare == 2) pxPerFlowline = 8;
+		if (pxPerSquare == 5) pxPerFlowline = 12;
+		if ((pxPerSquare == 6) || (pxPerSquare == 8)) pxPerFlowline = 15;
+		if (pxPerSquare == 10) pxPerFlowline = 20;
+		var sitesPerFlowline = pxPerFlowline / pxPerSquare;
+		var xLines = canvas.width / pxPerFlowline;
+		var yLines = canvas.height / pxPerFlowline;
+		for (var yCount=0; yCount<yLines; yCount++) {
+			for (var xCount=0; xCount<xLines; xCount++) {
+				var x = Math.round((xCount+0.5) * sitesPerFlowline);
+				var y = Math.round((yCount+0.5) * sitesPerFlowline);
+				var thisUx = ux[x+y*xdim];
+				var thisUy = uy[x+y*xdim];
+				var speed = Math.sqrt(thisUx*thisUx + thisUy*thisUy);
+				if (speed > 0.0001) {
+					var px = (xCount+0.5) * pxPerFlowline;
+					var py = canvas.height - ((yCount+0.5) * pxPerFlowline);
+					var scale = 0.5 * pxPerFlowline / speed;
+					context.beginPath();
+					context.moveTo(px-thisUx*scale, py+thisUy*scale);
+					context.lineTo(px+thisUx*scale, py-thisUy*scale);
+					//context.lineWidth = speed * 5;
+					var cIndex = Math.round(speed * transBlackArraySize / 0.3);
+					if (cIndex >= transBlackArraySize) cIndex = transBlackArraySize - 1;
+					context.strokeStyle = transBlackArray[cIndex];
+					//context.strokeStyle = "rgba(0,0,0,0.1)";
+					context.stroke();
+				}
+			}
+		}
+	}
+
+	// Draw an arrow to represent the total force on the barrier(s):
+	function drawForceArrow(x, y, Fx, Fy) {
+		context.fillStyle = "rgba(100,100,100,0.7)";
+		context.translate((x + 0.5) * pxPerSquare, canvas.height - (y + 0.5) * pxPerSquare);
+		var magF = Math.sqrt(Fx*Fx + Fy*Fy);
+		context.scale(4*magF, 4*magF);
+		context.rotate(Math.atan2(-Fy, Fx));
+		context.beginPath();
+		context.moveTo(0, 3);
+		context.lineTo(100, 3);
+		context.lineTo(100, 12);
+		context.lineTo(130, 0);
+		context.lineTo(100, -12);
+		context.lineTo(100, -3);
+		context.lineTo(0, -3);
+		context.lineTo(0, 3);
+		context.fill();
+		context.setTransform(1, 0, 0, 1, 0, 0);
+	}
+
+	// Draw the sensor and its associated data display:
+	function drawSensor() {
+		var canvasX = (sensorX+0.5) * pxPerSquare;
+		var canvasY = canvas.height - (sensorY+0.5) * pxPerSquare;
+		context.fillStyle = "rgba(180,180,180,0.7)";	// first draw gray filled circle
+		context.beginPath();
+		context.arc(canvasX, canvasY, 7, 0, 2*Math.PI);
+		context.fill();
+		context.strokeStyle = "#404040";				// next draw cross-hairs
+		context.linewidth = 1;
+		context.beginPath();
+		context.moveTo(canvasX, canvasY-10);
+		context.lineTo(canvasX, canvasY+10);
+		context.moveTo(canvasX-10, canvasY);
+		context.lineTo(canvasX+10, canvasY);
+		context.stroke();
+		context.fillStyle = "rgba(255,255,255,0.5)";	// draw rectangle behind text
+		canvasX += 10;
+		context.font = "12px Monospace";
+		var rectWidth = context.measureText("00000000000").width+6;
+		var rectHeight = 58;
+		if (canvasX+rectWidth > canvas.width) canvasX -= (rectWidth+20);
+		if (canvasY+rectHeight > canvas.height) canvasY = canvas.height - rectHeight;
+		context.fillRect(canvasX, canvasY, rectWidth, rectHeight);
+		context.fillStyle = "#000000";					// finally draw the text
+		canvasX += 3;
+		canvasY += 12;
+		var coordinates = "  (" + sensorX + "," + sensorY + ")";
+		context.fillText(coordinates, canvasX, canvasY);
+		canvasY += 14;
+		var rhoSymbol = String.fromCharCode(parseInt('03C1',16));
+		var index = sensorX + sensorY * xdim;
+		context.fillText(" " + rhoSymbol + " =  " + Number(rho[index]).toFixed(3), canvasX, canvasY);
+		canvasY += 14;
+		var digitString = Number(ux[index]).toFixed(3);
+		if (ux[index] >= 0) digitString = " " + digitString;
+		context.fillText("ux = " + digitString, canvasX, canvasY);
+		canvasY += 14;
+		digitString = Number(uy[index]).toFixed(3);
+		if (uy[index] >= 0) digitString = " " + digitString;
+		context.fillText("uy = " + digitString, canvasX, canvasY);
+	}
+
+	// Functions to handle mouse/touch interaction:
+	function mouseDown(e) {
+		if (sensorCheck.checked) {
+			var canvasLoc = pageToCanvas(e.pageX, e.pageY);
+			var gridLoc = canvasToGrid(canvasLoc.x, canvasLoc.y);
+			var dx = (gridLoc.x - sensorX) * pxPerSquare;
+			var dy = (gridLoc.y - sensorY) * pxPerSquare;
+			if (Math.sqrt(dx*dx + dy*dy) <= 8) {
+				draggingSensor = true;
+			}
+		}
+		mousePressDrag(e);
+	};
+	function mouseMove(e) {
+		if (mouseIsDown) {
+			mousePressDrag(e);
+		}
+	};
+	function mouseUp(e) {
+		mouseIsDown = false;
+		draggingSensor = false;
+	};
+
+	// Handle mouse press or drag:
+	function mousePressDrag(e) {
+		e.preventDefault();
+		mouseIsDown = true;
+		var canvasLoc = pageToCanvas(e.pageX, e.pageY);
+		if (draggingSensor) {
+			var gridLoc = canvasToGrid(canvasLoc.x, canvasLoc.y);
+			sensorX = gridLoc.x;
+			sensorY = gridLoc.y;
+			paintCanvas();
+			return;
+		}
+		if (mouseSelect.selectedIndex == 2) {
+			mouseX = canvasLoc.x;
+			mouseY = canvasLoc.y;
+			return;
+		}
+		var gridLoc = canvasToGrid(canvasLoc.x, canvasLoc.y);
+		if (mouseSelect.selectedIndex == 0) {
+			addBarrier(gridLoc.x, gridLoc.y);
+			paintCanvas();
+		} else {
+			removeBarrier(gridLoc.x, gridLoc.y);
+		}
+	}
+
+	// Convert page coordinates to canvas coordinates:
+	function pageToCanvas(pageX, pageY) {
+		var canvasX = pageX - canvas.offsetLeft;
+		var canvasY = pageY - canvas.offsetTop;
+		// this simple subtraction may not work when the canvas is nested in other elements
+		return { x:canvasX, y:canvasY };
+	}
+
+	// Convert canvas coordinates to grid coordinates:
+	function canvasToGrid(canvasX, canvasY) {
+		var gridX = Math.floor(canvasX / pxPerSquare);
+		var gridY = Math.floor((canvas.height - 1 - canvasY) / pxPerSquare); 	// off by 1?
+		return { x:gridX, y:gridY };
+	}
+
+	// Add a barrier at a given grid coordinate location:
+	function addBarrier(x, y) {
+		if ((x > 1) && (x < xdim-2) && (y > 1) && (y < ydim-2)) {
+			barrier[x+y*xdim] = true;
+		}
+	}
+
+	// Remove a barrier at a given grid coordinate location:
+	function removeBarrier(x, y) {
+		if (barrier[x+y*xdim]) {
+			barrier[x+y*xdim] = false;
+			paintCanvas();
+		}
+	}
+
+	// Clear all barriers:
+	function clearBarriers() {
+		for (var x=0; x<xdim; x++) {
+			for (var y=0; y<ydim; y++) {
+				barrier[x+y*xdim] = false;
+			}
+		}
+		paintCanvas();
+	}
+
+	// Resize the grid:
+	function resize() {
+		// First up-sample the macroscopic variables into temporary arrays at max resolution:
+		var tempRho = new Array(canvas.width*canvas.height);
+		var tempUx = new Array(canvas.width*canvas.height);
+		var tempUy = new Array(canvas.width*canvas.height);
+		var tempBarrier = new Array(canvas.width*canvas.height);
+		for (var y=0; y<canvas.height; y++) {
+			for (var x=0; x<canvas.width; x++) {
+				var tempIndex = x + y*canvas.width;
+				var xOld = Math.floor(x / pxPerSquare);
+				var yOld = Math.floor(y / pxPerSquare);
+				var oldIndex = xOld + yOld*xdim;
+				tempRho[tempIndex] = rho[oldIndex];
+				tempUx[tempIndex] = ux[oldIndex];
+				tempUy[tempIndex] = uy[oldIndex];
+				tempBarrier[tempIndex] = barrier[oldIndex];
+			}
+		}
+		// Get new size from GUI selector:
+		var oldPxPerSquare = pxPerSquare;
+		pxPerSquare = Number(sizeSelect.options[sizeSelect.selectedIndex].value);
+		var growRatio = oldPxPerSquare / pxPerSquare;
+		xdim = canvas.width / pxPerSquare;
+		ydim = canvas.height / pxPerSquare;
+		// Create new arrays at the desired resolution:
+		n0 = new Array(xdim*ydim);
+		nN = new Array(xdim*ydim);
+		nS = new Array(xdim*ydim);
+		nE = new Array(xdim*ydim);
+		nW = new Array(xdim*ydim);
+		nNE = new Array(xdim*ydim);
+		nSE = new Array(xdim*ydim);
+		nNW = new Array(xdim*ydim);
+		nSW = new Array(xdim*ydim);
+		rho = new Array(xdim*ydim);
+		ux = new Array(xdim*ydim);
+		uy = new Array(xdim*ydim);
+		curl = new Array(xdim*ydim);
+		barrier = new Array(xdim*ydim);
+		// Down-sample the temporary arrays into the new arrays:
+		for (var yNew=0; yNew<ydim; yNew++) {
+			for (var xNew=0; xNew<xdim; xNew++) {
+				var rhoTotal = 0;
+				var uxTotal = 0;
+				var uyTotal = 0;
+				var barrierTotal = 0;
+				for (var y=yNew*pxPerSquare; y<(yNew+1)*pxPerSquare; y++) {
+					for (var x=xNew*pxPerSquare; x<(xNew+1)*pxPerSquare; x++) {
+						var index = x + y*canvas.width;
+						rhoTotal += tempRho[index];
+						uxTotal += tempUx[index];
+						uyTotal += tempUy[index];
+						if (tempBarrier[index]) barrierTotal++;
+					}
+				}
+				setEquil(xNew, yNew, uxTotal/(pxPerSquare*pxPerSquare), uyTotal/(pxPerSquare*pxPerSquare), rhoTotal/(pxPerSquare*pxPerSquare))
+				curl[xNew+yNew*xdim] = 0.0;
+				barrier[xNew+yNew*xdim] = (barrierTotal >= pxPerSquare*pxPerSquare/2);
+			}
+		}
+		setBoundaries();
+		if (tracerCheck.checked) {
+			for (var t=0; t<nTracers; t++) {
+				tracerX[t] *= growRatio;
+				tracerY[t] *= growRatio;
+			}
+		}
+		sensorX = Math.round(sensorX * growRatio);
+		sensorY = Math.round(sensorY * growRatio);
+		//computeCurl();
+		paintCanvas();
+		resetTimer();
+	}
+
+	// Function to initialize or re-initialize the fluid, based on speed slider setting:
+	function initFluid() {
+		// Amazingly, if I nest the y loop inside the x loop, Firefox slows down by a factor of 20
+		var u0 = Number(speedSlider.value);
+		for (var y=0; y<ydim; y++) {
+			for (var x=0; x<xdim; x++) {
+				setEquil(x, y, u0, 0, 1);
+				curl[x+y*xdim] = 0.0;
+			}
+		}
+	paintCanvas();
+	}
+
+	// Function to start or pause the simulation:
+	function startStop() {
+		running = !running;
+		if (running) {
+			startButton.value = "Pause";
+			resetTimer();
+			simulate();
+		} else {
+			startButton.value = " Run ";
+		}
+	}
+
+	// Reset the timer that handles performance evaluation:
+	function resetTimer() {
+		stepCount = 0;
+		startTime = (new Date()).getTime();
+	}
+
+	// Show value of flow speed setting:
+	function adjustSpeed() {
+		speedValue.innerHTML = Number(speedSlider.value).toFixed(3);
+	}
+
+	// Show value of viscosity:
+	function adjustViscosity() {
+		viscValue.innerHTML = Number(viscSlider.value);//.toFixed(6);
+	}
+
+	// Show or hide the data area:
+	function showData() {
+		if (dataCheck.checked) {
+			dataSection.style.display="block";
+		} else {
+			dataSection.style.display="none";
+		}
+	}
+
+	// Start or stop collecting data:
+	function startOrStopData() {
+		collectingData = !collectingData;
+		if (collectingData) {
+			time = 0;
+			dataArea.innerHTML = "Time \tDensity\tVel_x \tVel_y \tForce_x\tForce_y\n";
+			writeData();
+			dataButton.value = "Stop data collection";
+			showingPeriod = false;
+			periodButton.value = "Show F_y period";
+		} else {
+			dataButton.value = "Start data collection";
+		}
+	}
+
+	// Write one line of data to the data area:
+	function writeData() {
+		var timeString = String(time);
+		while (timeString.length < 5) timeString = "0" + timeString;
+		sIndex = sensorX + sensorY*xdim;
+		dataArea.innerHTML += timeString + "\t" + Number(rho[sIndex]).toFixed(4) + "\t"
+			+ Number(ux[sIndex]).toFixed(4) + "\t" + Number(uy[sIndex]).toFixed(4) + "\t"
+			+ Number(barrierFx).toFixed(4) + "\t" + Number(barrierFy).toFixed(4) + "\n";
+		dataArea.scrollTop = dataArea.scrollHeight;
+	}
+
+	// Handle click to "show period" button
+	function showPeriod() {
+		showingPeriod = !showingPeriod;
+		if (showingPeriod) {
+			time = 0;
+			lastBarrierFy = 1.0;	// arbitrary positive value
+			lastFyOscTime = -1.0;	// arbitrary negative value
+			dataArea.innerHTML = "Period of F_y oscillation\n";
+			periodButton.value = "Stop data";
+			collectingData = false;
+			dataButton.value = "Start data collection";
+		} else {
+			periodButton.value = "Show F_y period";
+		}
+	}
+
+	// Write all the barrier locations to the data area:
+	function showBarrierLocations() {
+		dataArea.innerHTML = '{name:"Barrier locations",\n';
+		dataArea.innerHTML += 'locations:[\n';
+		for (var y=1; y<ydim-1; y++) {
+			for (var x=1; x<xdim-1; x++) {
+				if (barrier[x+y*xdim]) dataArea.innerHTML += x + ',' + y + ',\n';
+			}
+		}
+		dataArea.innerHTML = dataArea.innerHTML.substr(0, dataArea.innerHTML.length-2); // remove final comma
+		dataArea.innerHTML += '\n]},\n';
+	}
+
+	// Place a preset barrier:
+	function placePresetBarrier() {
+		var index = barrierSelect.selectedIndex;
+		if (index == 0) return;
+		clearBarriers();
+		var bCount = barrierList[index-1].locations.length/2;	// number of barrier sites
+		// To decide where to place it, find minimum x and min/max y:
+		var xMin = barrierList[index-1].locations[0];
+		var yMin = barrierList[index-1].locations[1];
+		var yMax = yMin;
+		for (var siteIndex=2; siteIndex<2*bCount; siteIndex+=2) {
+			if (barrierList[index-1].locations[siteIndex] < xMin) {
+				xMin = barrierList[index-1].locations[siteIndex];
+			}
+			if (barrierList[index-1].locations[siteIndex+1] < yMin) {
+				yMin = barrierList[index-1].locations[siteIndex+1];
+			}
+			if (barrierList[index-1].locations[siteIndex+1] > yMax) {
+				yMax = barrierList[index-1].locations[siteIndex+1];
+			}
+		}
+		var yAverage = Math.round((yMin+yMax)/2);
+		// Now place the barriers:
+		for (var siteIndex=0; siteIndex<2*bCount; siteIndex+=2) {
+			var x = barrierList[index-1].locations[siteIndex] - xMin + Math.round(ydim/3);
+			var y = barrierList[index-1].locations[siteIndex+1] - yAverage + Math.round(ydim/2);
+			addBarrier(x, y);
+		}
+		paintCanvas();
+		barrierSelect.selectedIndex = 0;	// A choice on this menu is a one-time action, not an ongoing setting
+	}
+
+	// Print debugging data:
+	function debug() {
+		dataArea.innerHTML = "Tracer locations:\n";
+		for (var t=0; t<nTracers; t++) {
+			dataArea.innerHTML += tracerX[t] + ", " + tracerY[t] + "\n";
+		}
+	}
+</script>
+    
+</body>
+</html>
\ No newline at end of file
diff --git a/source/ThirdParty/WebDemo/barrierdata.js b/source/ThirdParty/WebDemo/barrierdata.js
new file mode 100644
index 0000000000000000000000000000000000000000..40c153ee80243fcef14d3c7efd0e66e79a9da42d
--- /dev/null
+++ b/source/ThirdParty/WebDemo/barrierdata.js
@@ -0,0 +1,655 @@
+var barrierList = [
+{ name: "Short line",
+    locations: [
+12, 15,
+12, 16,
+12, 17,
+12, 18,
+12, 19,
+12, 20,
+12, 21,
+12, 22,
+12, 23]
+},
+{ name: "Long line",
+    locations: [
+13, 11,
+13, 12,
+13, 13,
+13, 14,
+13, 15,
+13, 16,
+13, 17,
+13, 18,
+13, 19,
+13, 20,
+13, 21,
+13, 22,
+13, 23,
+13, 24,
+13, 25,
+13, 26,
+13, 27,
+13, 28
+]
+},
+{ name: "Diagonal",
+    locations: [
+30, 14,
+29, 15,
+30, 15,
+28, 16,
+29, 16,
+27, 17,
+28, 17,
+26, 18,
+27, 18,
+25, 19,
+26, 19,
+24, 20,
+25, 20,
+23, 21,
+24, 21,
+22, 22,
+23, 22,
+21, 23,
+22, 23,
+20, 24,
+21, 24,
+19, 25,
+20, 25,
+18, 26,
+19, 26,
+17, 27,
+18, 27,
+16, 28,
+17, 28,
+15, 29,
+16, 29,
+14, 30,
+15, 30,
+13, 31,
+14, 31
+]
+},
+{ name: "Shallow diagonal",
+    locations: [
+47, 18,
+48, 18,
+49, 18,
+50, 18,
+44, 19,
+45, 19,
+46, 19,
+47, 19,
+41, 20,
+42, 20,
+43, 20,
+44, 20,
+38, 21,
+39, 21,
+40, 21,
+41, 21,
+35, 22,
+36, 22,
+37, 22,
+38, 22,
+32, 23,
+33, 23,
+34, 23,
+35, 23,
+29, 24,
+30, 24,
+31, 24,
+32, 24,
+26, 25,
+27, 25,
+28, 25,
+29, 25,
+23, 26,
+24, 26,
+25, 26,
+26, 26,
+20, 27,
+21, 27,
+22, 27,
+23, 27,
+17, 28,
+18, 28,
+19, 28,
+20, 28
+]
+},
+{ name: "Small circle",
+    locations: [
+14, 11,
+15, 11,
+16, 11,
+17, 11,
+18, 11,
+13, 12,
+14, 12,
+18, 12,
+19, 12,
+12, 13,
+13, 13,
+19, 13,
+20, 13,
+12, 14,
+20, 14,
+12, 15,
+20, 15,
+12, 16,
+20, 16,
+12, 17,
+13, 17,
+19, 17,
+20, 17,
+13, 18,
+14, 18,
+18, 18,
+19, 18,
+14, 19,
+15, 19,
+16, 19,
+17, 19,
+18, 19
+]
+},
+{ name: "Large circle",
+    locations: [
+19, 11,
+20, 11,
+21, 11,
+22, 11,
+23, 11,
+24, 11,
+17, 12,
+18, 12,
+19, 12,
+24, 12,
+25, 12,
+26, 12,
+16, 13,
+17, 13,
+26, 13,
+27, 13,
+15, 14,
+16, 14,
+27, 14,
+28, 14,
+14, 15,
+15, 15,
+28, 15,
+29, 15,
+14, 16,
+29, 16,
+13, 17,
+14, 17,
+29, 17,
+30, 17,
+13, 18,
+30, 18,
+13, 19,
+30, 19,
+13, 20,
+30, 20,
+13, 21,
+30, 21,
+13, 22,
+14, 22,
+29, 22,
+30, 22,
+14, 23,
+29, 23,
+14, 24,
+15, 24,
+28, 24,
+29, 24,
+15, 25,
+16, 25,
+27, 25,
+28, 25,
+16, 26,
+17, 26,
+26, 26,
+27, 26,
+17, 27,
+18, 27,
+19, 27,
+24, 27,
+25, 27,
+26, 27,
+19, 28,
+20, 28,
+21, 28,
+22, 28,
+23, 28,
+24, 28
+]
+},
+{ name: "Line with spoiler",
+    locations: [
+16, 20,
+16, 21,
+16, 22,
+16, 23,
+16, 24,
+17, 24,
+18, 24,
+19, 24,
+20, 24,
+21, 24,
+22, 24,
+23, 24,
+24, 24,
+25, 24,
+26, 24,
+27, 24,
+28, 24,
+29, 24,
+30, 24,
+31, 24,
+32, 24,
+33, 24,
+34, 24,
+35, 24,
+36, 24,
+37, 24,
+38, 24,
+39, 24,
+40, 24,
+41, 24,
+42, 24,
+43, 24,
+44, 24,
+45, 24,
+46, 24,
+47, 24,
+48, 24,
+49, 24,
+50, 24,
+16, 25,
+16, 26,
+16, 27,
+16, 28
+]
+},
+{ name: "Circle with spoiler",
+    locations: [
+29, 36,
+30, 36,
+31, 36,
+32, 36,
+33, 36,
+28, 37,
+29, 37,
+33, 37,
+34, 37,
+27, 38,
+28, 38,
+34, 38,
+35, 38,
+27, 39,
+35, 39,
+27, 40,
+35, 40,
+36, 40,
+37, 40,
+38, 40,
+39, 40,
+40, 40,
+41, 40,
+42, 40,
+43, 40,
+44, 40,
+45, 40,
+46, 40,
+47, 40,
+48, 40,
+49, 40,
+50, 40,
+51, 40,
+52, 40,
+53, 40,
+54, 40,
+55, 40,
+56, 40,
+57, 40,
+58, 40,
+59, 40,
+60, 40,
+61, 40,
+62, 40,
+63, 40,
+64, 40,
+65, 40,
+66, 40,
+67, 40,
+68, 40,
+69, 40,
+27, 41,
+35, 41,
+27, 42,
+28, 42,
+34, 42,
+35, 42,
+28, 43,
+29, 43,
+33, 43,
+34, 43,
+29, 44,
+30, 44,
+31, 44,
+32, 44,
+33, 44
+]
+},
+{ name: "Right angle",
+    locations: [
+27, 36,
+28, 36,
+29, 36,
+30, 36,
+31, 36,
+32, 36,
+33, 36,
+34, 36,
+35, 36,
+36, 36,
+37, 36,
+38, 36,
+39, 36,
+40, 36,
+41, 36,
+42, 36,
+43, 36,
+44, 36,
+45, 36,
+46, 36,
+47, 36,
+48, 36,
+49, 36,
+50, 36,
+51, 36,
+52, 36,
+53, 36,
+54, 36,
+55, 36,
+56, 36,
+57, 36,
+58, 36,
+59, 36,
+60, 36,
+61, 36,
+62, 36,
+63, 36,
+64, 36,
+65, 36,
+66, 36,
+67, 36,
+68, 36,
+69, 36,
+70, 36,
+71, 36,
+72, 36,
+73, 36,
+74, 36,
+75, 36,
+76, 36,
+77, 36,
+78, 36,
+79, 36,
+27, 37,
+27, 38,
+27, 39,
+27, 40,
+27, 41,
+27, 42,
+27, 43,
+27, 44
+]
+},
+{ name: "Wedge",
+    locations: [
+27, 36,
+28, 36,
+29, 36,
+30, 36,
+31, 36,
+32, 36,
+33, 36,
+34, 36,
+35, 36,
+36, 36,
+37, 36,
+38, 36,
+39, 36,
+40, 36,
+41, 36,
+42, 36,
+43, 36,
+44, 36,
+45, 36,
+46, 36,
+47, 36,
+48, 36,
+49, 36,
+50, 36,
+51, 36,
+52, 36,
+53, 36,
+54, 36,
+55, 36,
+56, 36,
+57, 36,
+58, 36,
+59, 36,
+60, 36,
+61, 36,
+62, 36,
+63, 36,
+64, 36,
+65, 36,
+66, 36,
+67, 36,
+68, 36,
+69, 36,
+70, 36,
+71, 36,
+72, 36,
+73, 36,
+74, 36,
+75, 36,
+76, 36,
+77, 36,
+78, 36,
+79, 36,
+27, 37,
+67, 37,
+68, 37,
+69, 37,
+70, 37,
+71, 37,
+72, 37,
+73, 37,
+27, 38,
+61, 38,
+62, 38,
+63, 38,
+64, 38,
+65, 38,
+66, 38,
+67, 38,
+27, 39,
+55, 39,
+56, 39,
+57, 39,
+58, 39,
+59, 39,
+60, 39,
+61, 39,
+27, 40,
+49, 40,
+50, 40,
+51, 40,
+52, 40,
+53, 40,
+54, 40,
+55, 40,
+27, 41,
+43, 41,
+44, 41,
+45, 41,
+46, 41,
+47, 41,
+48, 41,
+49, 41,
+27, 42,
+37, 42,
+38, 42,
+39, 42,
+40, 42,
+41, 42,
+42, 42,
+43, 42,
+27, 43,
+31, 43,
+32, 43,
+33, 43,
+34, 43,
+35, 43,
+36, 43,
+37, 43,
+27, 44,
+28, 44,
+29, 44,
+30, 44,
+31, 44
+]
+},
+{ name: "Airfoil",
+    locations: [
+17, 16,
+18, 16,
+19, 16,
+20, 16,
+21, 16,
+22, 16,
+23, 16,
+24, 16,
+25, 16,
+26, 16,
+27, 16,
+28, 16,
+29, 16,
+30, 16,
+31, 16,
+32, 16,
+33, 16,
+34, 16,
+35, 16,
+36, 16,
+37, 16,
+38, 16,
+39, 16,
+40, 16,
+41, 16,
+42, 16,
+43, 16,
+44, 16,
+45, 16,
+46, 16,
+47, 16,
+48, 16,
+49, 16,
+50, 16,
+51, 16,
+52, 16,
+53, 16,
+54, 16,
+55, 16,
+56, 16,
+57, 16,
+58, 16,
+59, 16,
+60, 16,
+61, 16,
+62, 16,
+63, 16,
+64, 16,
+65, 16,
+66, 16,
+67, 16,
+68, 16,
+14, 17,
+15, 17,
+16, 17,
+17, 17,
+56, 17,
+57, 17,
+58, 17,
+59, 17,
+60, 17,
+61, 17,
+62, 17,
+13, 18,
+14, 18,
+50, 18,
+51, 18,
+52, 18,
+53, 18,
+54, 18,
+55, 18,
+56, 18,
+13, 19,
+44, 19,
+45, 19,
+46, 19,
+47, 19,
+48, 19,
+49, 19,
+50, 19,
+13, 20,
+38, 20,
+39, 20,
+40, 20,
+41, 20,
+42, 20,
+43, 20,
+44, 20,
+13, 21,
+14, 21,
+32, 21,
+33, 21,
+34, 21,
+35, 21,
+36, 21,
+37, 21,
+38, 21,
+14, 22,
+15, 22,
+26, 22,
+27, 22,
+28, 22,
+29, 22,
+30, 22,
+31, 22,
+32, 22,
+15, 23,
+16, 23,
+17, 23,
+18, 23,
+21, 23,
+22, 23,
+23, 23,
+24, 23,
+25, 23,
+26, 23,
+18, 24,
+19, 24,
+20, 24,
+21, 24
+]
+}
+];
\ No newline at end of file
diff --git a/source/VirtualFluids.h b/source/VirtualFluids.h
index 27b1fb1d54abeb5c54b78886a35151a398e6fd75..d56163928d7ab8e04ae37328c581d7448205be63 100644
--- a/source/VirtualFluids.h
+++ b/source/VirtualFluids.h
@@ -25,9 +25,6 @@
 #include <basics/container/CbArray4D.h>
 #include <basics/container/CbVector.h>
 #include <basics/container/CbVectorPool.h>
-//#include <basics/container/examples/CbVectorPool/functions.h>
-//#include <basics/memory/MbChessMemPool2D.h>
-//#include <basics/memory/MbChessMemPool3D.h>
 #include <basics/memory/MbMemPool.h>
 #include <basics/memory/MbSharedPointerDefines.h>
 #include <basics/memory/MbSmartPtr.h>
@@ -38,18 +35,9 @@
 #include <basics/objects/ObObjectCreator.h>
 #include <basics/objects/ObObjectFactory.h>
 #include <basics/objects/ObObjectManager.h>
-// #include <basics/parallel/PbMpi.h>
-// #include <basics/parallel/PbMpiTools.h>
-// #include <basics/parallel/examples/simpleMPI/functions.h>
-// #include <basics/relation/RbAggregation.h>
 #include <basics/transmitter/TbTransmitter.h>
 #include <basics/transmitter/TbTransmitterLocal.h>
-#include <basics/transmitter/TbTransmitterMpi.h>
-// #include <basics/transmitter/TbTransmitterMpiCPPB.h>
 #include <basics/transmitter/TbTransmitterMpiPool.h>
-//#include <basics/transmitter/TbTransmitterMpiPool2.h>
-// #include <basics/transmitter/TbTransmitterRcf.h>
-// #include <basics/transmitter/TbTransmitterRcfPool.h>
 #include <basics/utilities/UbAutoRun.hpp>
 #include <basics/utilities/UbComparators.h>
 #include <basics/utilities/UbConverter.h>
@@ -179,16 +167,10 @@
 #include <LBM/ICell.h>
 #include <LBM/InterpolationProcessor.h>
 #include <LBM/LBMKernel3D.h>
-#include <LBM/LBMKernelESD3Q27CCLB.h>
 #include <LBMKernelETD3Q27CCLBWithSpongeLayer.h>
 #include <LBM/LBMKernelETD3Q27.h>
-#include <LBM/LBMKernelETD3Q27BGK.h>
-#include <LBM/LBMKernelETD3Q27Cascaded.h>
-#include <LBM/LBMKernelETD3Q27CascadedTI.h>
 #include <LBM/LBMKernelETD3Q27CCLB.h>
-#include <LBM/LBMKernelETD3Q27CCLBSparse.h>
-#include <LBM/LBMKernelETD3Q27CCLBex.h>
-#include <LBM/LBMKernelETD3Q27CCLBex2.h>
+#include <LBM/CompressibleCumulantLBMKernel.h>
 #include <LBM/LBMSystem.h>
 #include <LBM/LBMSystems.h>
 #include <LBM/LBMUnitConverter.h>
@@ -300,6 +282,8 @@
 #include <Visitors/BoundaryConditionBlockVisitor.h>
 #include <Visitors/ChangeBoundaryDensityBlockVisitor.h>
 #include <InitDistributionsFromFileBlockVisitor.h>
+#include <CheckRatioBlockVisitor.h>
+#include <SpongeLayerBlockVisitor.h>
 
 #include <Visitors/RefineCrossAndInsideGbObjectHelper.h>
 #include <RefineAroundGbObjectHelper.h>
diff --git a/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.cpp b/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.cpp
index 4148647b755219832af5eea839e8e388ff410863..76a2a603af917750cd57d89421dd1da7c209a2a9 100644
--- a/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.cpp
+++ b/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.cpp
@@ -77,7 +77,12 @@ bool BoundaryCondition::isPreCollision()
 {
    return preCollision;
 }
-
+//////////////////////////////////////////////////////////////////////////
+void BoundaryCondition::clearData()
+{
+   nodeVector.clear();
+   bcVector.clear();
+}
 
 
 
diff --git a/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.h b/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.h
index ae8b5442f0422ecb063bdd81710aff83f9c467b5..a782e06f4fe90ad0625084166fab18bfbc19188f 100644
--- a/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.h
+++ b/source/VirtualFluidsCore/BoundaryCondition/BoundaryCondition.h
@@ -38,6 +38,7 @@ public:
    BoundaryCondition::Type getType();
    bool isPreCollision();
    virtual BoundaryConditionPtr clone()=0;
+   void clearData();
 protected:
    virtual void applyBC() = 0;
    
diff --git a/source/VirtualFluidsCore/BoundaryCondition/EqDensityBoundaryCondition.cpp b/source/VirtualFluidsCore/BoundaryCondition/EqDensityBoundaryCondition.cpp
index 9f848d654e54f34def5f3378f98492720e517096..f39120d5d348ed6abe01d446021db7a02a7db574 100644
--- a/source/VirtualFluidsCore/BoundaryCondition/EqDensityBoundaryCondition.cpp
+++ b/source/VirtualFluidsCore/BoundaryCondition/EqDensityBoundaryCondition.cpp
@@ -33,7 +33,7 @@ void EqDensityBoundaryCondition::applyBC()
    int direction = -1;
 
    //flag points in direction of fluid
-   if (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1; direction = D3Q27System::E; }
+   if      (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1; direction = D3Q27System::E; }
    else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::W)) { nx1 += 1; direction = D3Q27System::W; }
    else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::N)) { nx2 -= 1; direction = D3Q27System::N; }
    else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::S)) { nx2 += 1; direction = D3Q27System::S; }
diff --git a/source/VirtualFluidsCore/BoundaryCondition/NonReflectingDensityBoundaryCondition.cpp b/source/VirtualFluidsCore/BoundaryCondition/NonReflectingDensityBoundaryCondition.cpp
index 68c6e802435363f806c160569efe1a10ff2471f5..c341ec312093a915ca12f3b1178fc13300aef146 100644
--- a/source/VirtualFluidsCore/BoundaryCondition/NonReflectingDensityBoundaryCondition.cpp
+++ b/source/VirtualFluidsCore/BoundaryCondition/NonReflectingDensityBoundaryCondition.cpp
@@ -70,15 +70,15 @@ void NonReflectingDensityBoundaryCondition::applyBC()
       f[D3Q27System::BNE] = ftemp[D3Q27System::BNE] * (one_over_sqrt3 - vx1) + (1.0 - one_over_sqrt3 + vx1)*f[D3Q27System::BNE] - rho*dim*D3Q27System::WEIGTH[D3Q27System::BNE];
       f[D3Q27System::BSE] = ftemp[D3Q27System::BSE] * (one_over_sqrt3 - vx1) + (1.0 - one_over_sqrt3 + vx1)*f[D3Q27System::BSE] - rho*dim*D3Q27System::WEIGTH[D3Q27System::BSE];
 
-      distributions->setDistributionInvForDirection(f[D3Q27System::E], x1, x2, x3, D3Q27System::E);
-      distributions->setDistributionInvForDirection(f[D3Q27System::NE], x1, x2, x3, D3Q27System::NE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::SE], x1, x2, x3, D3Q27System::SE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::TE], x1, x2, x3, D3Q27System::TE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::BE], x1, x2, x3, D3Q27System::BE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::TNE], x1, x2, x3, D3Q27System::TNE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::TSE], x1, x2, x3, D3Q27System::TSE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::BNE], x1, x2, x3, D3Q27System::BNE);
-      distributions->setDistributionInvForDirection(f[D3Q27System::BSE], x1, x2, x3, D3Q27System::BSE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::E], x1+1, x2, x3, D3Q27System::E);
+      distributions->setDistributionInvForDirection(f[D3Q27System::NE], x1+1, x2+1, x3, D3Q27System::NE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::SE], x1+1, x2-1, x3, D3Q27System::SE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::TE], x1+1, x2, x3+1, D3Q27System::TE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::BE], x1+1, x2, x3-1, D3Q27System::BE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::TNE], x1+1, x2+1, x3+1, D3Q27System::TNE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::TSE], x1+1, x2-1, x3+1, D3Q27System::TSE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::BNE], x1+1, x2+1, x3-1, D3Q27System::BNE);
+      distributions->setDistributionInvForDirection(f[D3Q27System::BSE], x1+1, x2-1, x3+1, D3Q27System::BSE);
       break;
    case D3Q27System::W:
       f[D3Q27System::W] = ftemp[D3Q27System::W] * (one_over_sqrt3 - vx1) + (1.0 - one_over_sqrt3 + vx1)*f[D3Q27System::W] - rho*dim*D3Q27System::WEIGTH[D3Q27System::W];
diff --git a/source/VirtualFluidsCore/CMakeLists.txt b/source/VirtualFluidsCore/CMakeLists.txt
index be54aa7a7645c73f797a46630d81ca2595e6d91b..a2afff40eabbb65ac17573c33925a87f3f51ff87 100644
--- a/source/VirtualFluidsCore/CMakeLists.txt
+++ b/source/VirtualFluidsCore/CMakeLists.txt
@@ -40,7 +40,6 @@ INCLUDE(${SOURCE_ROOT}/ThirdParty/Library/basics/utilities/CMakePackage.txt)
 INCLUDE(${SOURCE_ROOT}/ThirdParty/Library/basics/container/CMakePackage.txt)
 INCLUDE(${SOURCE_ROOT}/ThirdParty/Library/basics/writer/CMakePackage.txt)
 INCLUDE(${SOURCE_ROOT}/ThirdParty/Library/basics/transmitter/CMakePackage.txt)
-INCLUDE(${SOURCE_ROOT}/ThirdParty/FNV/CMakePackage.txt)
 
 #FETOL
 IF(${USE_FETOL})
diff --git a/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp b/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp
index aeb841f69a9014eca0bc4081b3bedcd347d90460..3304a2626e72503d4d34e2843774649e1f88be11 100644
--- a/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp
+++ b/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.cpp
@@ -25,12 +25,12 @@ TimeAveragedValuesCoProcessor::TimeAveragedValuesCoProcessor(Grid3DPtr grid, con
    options(options)
 {
    init(s);
-   volumeAveraging = false;
+   planarAveraging = false;
 }
 //////////////////////////////////////////////////////////////////////////
 TimeAveragedValuesCoProcessor::TimeAveragedValuesCoProcessor(Grid3DPtr grid, const std::string& path, WbWriter* const writer,
    UbSchedulerPtr s, CommunicatorPtr comm, int options,
-   std::vector<int> levels, std::vector<double>& levelCoords, std::vector<double>& bounds)
+   std::vector<int> levels, std::vector<double>& levelCoords, std::vector<double>& bounds, bool timeAveraging)
    : CoProcessor(grid, s),
    path(path),
    writer(writer),
@@ -38,10 +38,11 @@ TimeAveragedValuesCoProcessor::TimeAveragedValuesCoProcessor(Grid3DPtr grid, con
    options(options),
    levels(levels),
    levelCoords(levelCoords),
-   bounds(bounds)
+   bounds(bounds),
+   timeAveraging(timeAveraging)
 {
    init(s);
-   volumeAveraging = true;
+   planarAveraging = true;
 }
 //////////////////////////////////////////////////////////////////////////
 void TimeAveragedValuesCoProcessor::init(UbSchedulerPtr s)
@@ -128,10 +129,15 @@ void TimeAveragedValuesCoProcessor::process(double step)
       ////////////////////////////
 
       calculateAverageValues((double)numberOfFineSteps);
-      collectData(step);
-      if (volumeAveraging)
+      
+      if (timeAveraging)
       {
-         volumeAverage(step);
+         collectData(step);
+      }
+      
+      if (planarAveraging)
+      {
+         planarAverage(step);
       }
    }
 
@@ -168,7 +174,7 @@ void TimeAveragedValuesCoProcessor::collectData(double step)
    if (root)
    {
       string pname = WbWriterVtkXmlASCII::getInstance()->writeParallelFile(pfilePath, pieces, datanames, cellDataNames);
-      UBLOG(logINFO, "TimeAveragedValuesCoProcessor step: " << istep);
+      UBLOG(logINFO, "TimeAveragedValuesCoProcessor::collectData() step: " << istep);
    }
 
    clearData();
@@ -555,7 +561,7 @@ void TimeAveragedValuesCoProcessor::calculateSubtotal(double step)
    }
 }
 //////////////////////////////////////////////////////////////////////////
-void TimeAveragedValuesCoProcessor::volumeAverage(double step)
+void TimeAveragedValuesCoProcessor::planarAverage(double step)
 {
    std::ofstream ostr;
 
@@ -579,7 +585,7 @@ void TimeAveragedValuesCoProcessor::volumeAverage(double step)
    int size = (int)levels.size();
    int sizeOfLevelCoords = (int)levelCoords.size();
    
-   if (size != 2*sizeOfLevelCoords)
+   if (2 * size != sizeOfLevelCoords)
    {
       UB_THROW(UbException(UB_EXARGS, "Number of levels coordinates don't match number of levels!"));
    }
@@ -650,8 +656,24 @@ void TimeAveragedValuesCoProcessor::volumeAverage(double step)
    if (root)
    {
       ostr.close();
+      UBLOG(logINFO, "TimeAveragedValuesCoProcessor::planarAverage() step: " << (int)step);
+   }
+}
+//////////////////////////////////////////////////////////////////////////
+void TimeAveragedValuesCoProcessor::reset()
+{
+   for (int level = minInitLevel; level <= maxInitLevel; level++)
+   {
+      BOOST_FOREACH(Block3DPtr block, blockVector[level])
+      {
+         if (block)
+         {
+            block->getKernel()->getDataSet()->getAverageVelocity()->reset(0.0);
+            block->getKernel()->getDataSet()->getAverageFluctuations()->reset(0.0);
+            block->getKernel()->getDataSet()->getAverageTriplecorrelations()->reset(0.0);
+         }
+      }
    }
 }
-
 
 
diff --git a/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.h b/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.h
index 23d0cf211da83caa3f1a9bc21f2b1393759b7acc..861f96dc50dddba61eb4dc54c0b1a4dce7462b7a 100644
--- a/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.h
+++ b/source/VirtualFluidsCore/CoProcessors/TimeAveragedValuesCoProcessor.h
@@ -39,12 +39,14 @@ public:
    TimeAveragedValuesCoProcessor(Grid3DPtr grid, const std::string& path, WbWriter* const writer,
       UbSchedulerPtr s, CommunicatorPtr comm, int options);
    TimeAveragedValuesCoProcessor(Grid3DPtr grid, const std::string& path, WbWriter* const writer,
-      UbSchedulerPtr s, CommunicatorPtr comm, int options, std::vector<int> levels, std::vector<double>& levelCoords, std::vector<double>& bounds);
+      UbSchedulerPtr s, CommunicatorPtr comm, int options, std::vector<int> levels, std::vector<double>& levelCoords, std::vector<double>& bounds, bool timeAveraging = true);
    //! Make update
    void process(double step);
    //! Computes subtotal of velocity , fluctuations and triple correlations
    void calculateSubtotal(double step);
    void addLevelCoordinate(double c);
+   void reset();
+
 protected:
    //! Prepare data and write in .vtk file
    void collectData(double step);
@@ -55,7 +57,7 @@ protected:
    void calculateAverageValues(double timeStep);
 
    void init(UbSchedulerPtr s);
-   void volumeAverage(double step);
+   void planarAverage(double step);
 
 private:
    CommunicatorPtr comm;
@@ -99,7 +101,8 @@ private:
    typedef void(*CalcMacrosFct)(const LBMReal* const& /*feq[27]*/, LBMReal& /*(d)rho*/, LBMReal& /*vx1*/, LBMReal& /*vx2*/, LBMReal& /*vx3*/);
    CalcMacrosFct calcMacros;
 
-   bool volumeAveraging;
+   bool planarAveraging;
+   bool timeAveraging;
    std::vector<double> levelCoords;
    std::vector<int> levels;
    std::vector<double> bounds;
diff --git a/source/VirtualFluidsCore/Grid/BoostSerializationClassExportHelper.h b/source/VirtualFluidsCore/Grid/BoostSerializationClassExportHelper.h
index 52061479fc1fe4b7607b1e5faf2be4e3804c5f8c..97fcd522f5fe7e73b0198dc8e71118948767d0ae 100644
--- a/source/VirtualFluidsCore/Grid/BoostSerializationClassExportHelper.h
+++ b/source/VirtualFluidsCore/Grid/BoostSerializationClassExportHelper.h
@@ -2,13 +2,10 @@
 #define BOOSTSERIALIZATIONCLASSEXPORTHELPER_H
 
 #include <LBMKernelETD3Q27.h>
-#include <LBMKernelETD3Q27Cascaded.h>
 #include <D3Q27EsoTwist3DSplittedVector.h>
 #include <BCProcessor.h>
 #include <D3Q27ETBCProcessor.h>
-#include <LBMKernelETD3Q27CascadedTI.h>
 #include <DataSet3D.h>
-#include <LBMKernelETD3Q27BGK.h>
 #include <LBMKernelETD3Q27CCLB.h>
 #include <LBMKernelETD3Q27CCLBWithSpongeLayer.h>
 #include <Interactor3D.h>
@@ -45,9 +42,6 @@
 #include <boost/serialization/export.hpp>
 
 BOOST_CLASS_EXPORT(LBMKernelETD3Q27)
-BOOST_CLASS_EXPORT(LBMKernelETD3Q27Cascaded)
-BOOST_CLASS_EXPORT(LBMKernelETD3Q27CascadedTI)
-BOOST_CLASS_EXPORT(LBMKernelETD3Q27BGK)
 BOOST_CLASS_EXPORT(LBMKernelETD3Q27CCLB)
 BOOST_CLASS_EXPORT(LBMKernelETD3Q27CCLBWithSpongeLayer)
 BOOST_CLASS_EXPORT(D3Q27EsoTwist3DSplittedVector)
diff --git a/source/VirtualFluidsCore/Grid/Calculator.cpp b/source/VirtualFluidsCore/Grid/Calculator.cpp
index bb7c96c9e15545370b20743d8931f9ff7c3a9ac2..ddd87a83d921b147a68f8e219c7836d71252c79c 100644
--- a/source/VirtualFluidsCore/Grid/Calculator.cpp
+++ b/source/VirtualFluidsCore/Grid/Calculator.cpp
@@ -5,6 +5,7 @@
 #include "basics/writer/WbWriterVtkXmlASCII.h"
 
 //#define TIMING
+//#define PRECOLLISIONBC
 
 Calculator::Calculator()
 {
@@ -134,8 +135,10 @@ void Calculator::calculate(const double& endTime, CalculationManagerPtr cm, boos
             //swap distributions in kernel
             swapDistributions(straightStartLevel, maxInitLevel);
 
-            //exchangeBlockData(straightStartLevel, maxInitLevel, true);
-            //applyPreCollisionBC(straightStartLevel, maxInitLevel);
+#ifdef PRECOLLISIONBC
+            exchangeBlockData(straightStartLevel, maxInitLevel);
+            applyPreCollisionBC(straightStartLevel, maxInitLevel);
+#endif
             
 
 //////////////////////////////////////////////////////////////////////////
diff --git a/source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp b/source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..b599380e5e489a23ddda89dd2e49ae9b8193dfec
--- /dev/null
+++ b/source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.cpp
@@ -0,0 +1,1030 @@
+#include "CompressibleCumulantLBMKernel.h"
+#include "D3Q27System.h"
+#include "D3Q27InterpolationProcessor.h"
+#include "D3Q27EsoTwist3DSplittedVector.h"
+#include <math.h>
+#include <omp.h>
+
+#define PROOF_CORRECTNESS
+
+//////////////////////////////////////////////////////////////////////////
+CompressibleCumulantLBMKernel::CompressibleCumulantLBMKernel()
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+CompressibleCumulantLBMKernel::CompressibleCumulantLBMKernel(int nx1, int nx2, int nx3, Parameter p) 
+   : LBMKernelETD3Q27(nx1, nx2, nx3),
+     parameter(p)
+{
+   this->compressible = true;
+}
+//////////////////////////////////////////////////////////////////////////
+CompressibleCumulantLBMKernel::~CompressibleCumulantLBMKernel(void)
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleCumulantLBMKernel::init()
+{
+   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+2, nx2+2, nx3+2, -999.0));
+   dataSet->setFdistributions(d);
+}
+//////////////////////////////////////////////////////////////////////////
+LBMKernel3DPtr CompressibleCumulantLBMKernel::clone()
+{
+   LBMKernel3DPtr kernel(new CompressibleCumulantLBMKernel(nx1, nx2, nx3, parameter));
+   boost::dynamic_pointer_cast<CompressibleCumulantLBMKernel>(kernel)->init();
+   kernel->setCollisionFactor(this->collFactor);
+   kernel->setBCProcessor(bcProcessor->clone(kernel));
+   kernel->setWithForcing(withForcing);
+   kernel->setForcingX1(muForcingX1);
+   kernel->setForcingX2(muForcingX2);
+   kernel->setForcingX3(muForcingX3);
+   kernel->setIndex(ix1, ix2, ix3);
+   kernel->setDeltaT(deltaT);
+   switch (parameter)
+   {
+   case NORMAL:
+      boost::dynamic_pointer_cast<CompressibleCumulantLBMKernel>(kernel)->OxyyMxzz = 1.0;
+   	break;
+   case MAGIC:
+      boost::dynamic_pointer_cast<CompressibleCumulantLBMKernel>(kernel)->OxyyMxzz = 2.0 +(-collFactor);
+      break;
+   }
+   return kernel;
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleCumulantLBMKernel::calculate()
+{
+   timer.resetAndStart();
+   collideAll();
+   timer.stop();
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleCumulantLBMKernel::collideAll()
+{
+   using namespace D3Q27System;
+
+   //initializing of forcing stuff 
+   if (withForcing)
+   {
+      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
+      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
+      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
+
+      muDeltaT = deltaT;
+
+      muForcingX1.DefineVar("dt",&muDeltaT);
+      muForcingX2.DefineVar("dt",&muDeltaT);
+      muForcingX3.DefineVar("dt",&muDeltaT);
+
+      muNu = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
+
+      muForcingX1.DefineVar("nu",&muNu);
+      muForcingX2.DefineVar("nu",&muNu);
+      muForcingX3.DefineVar("nu",&muNu);
+
+      LBMReal forcingX1 = 0;
+      LBMReal forcingX2 = 0;
+      LBMReal forcingX3 = 0;
+   }
+   /////////////////////////////////////
+
+   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
+   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
+   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
+
+   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
+
+   const int bcArrayMaxX1 = (int)bcArray.getNX1();
+   const int bcArrayMaxX2 = (int)bcArray.getNX2();
+   const int bcArrayMaxX3 = (int)bcArray.getNX3();
+
+   int minX1 = ghostLayerWidth;
+   int minX2 = ghostLayerWidth;
+   int minX3 = ghostLayerWidth;
+   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
+   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
+   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
+
+   LBMReal omega = collFactor;
+
+
+//#pragma omp parallel num_threads(8)
+   {
+   //   int i = omp_get_thread_num();
+   //   printf_s("Hello from thread %d\n", i);
+   //}
+//#pragma omp for 
+   for(int x3 = minX3; x3 < maxX3; x3++)
+   {
+      for(int x2 = minX2; x2 < maxX2; x2++)
+      {
+         for(int x1 = minX1; x1 < maxX1; x1++)
+         {
+            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
+            {
+               int x1p = x1 + 1;
+               int x2p = x2 + 1;
+               int x3p = x3 + 1;
+               //////////////////////////////////////////////////////////////////////////
+               //read distribution
+               ////////////////////////////////////////////////////////////////////////////
+               //////////////////////////////////////////////////////////////////////////
+
+               //E   N  T
+               //c   c  c
+               //////////
+               //W   S  B
+               //a   a  a
+
+               //Rest ist b
+
+               //mfxyz
+               //a - negative
+               //b - null
+               //c - positive
+               
+               // a b c
+               //-1 0 1
+
+               LBMReal mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
+               LBMReal mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
+               LBMReal mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
+               LBMReal mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
+               LBMReal mfacb = (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,x3);
+               LBMReal mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
+               LBMReal mfabc = (*this->localDistributions)(D3Q27System::ET_TW, x1p,x2,x3);
+               LBMReal mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
+               LBMReal mfbac = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2p,x3);
+               LBMReal mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
+               LBMReal mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,x3);
+               LBMReal mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2p,x3);
+               LBMReal mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3);
+
+               LBMReal mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,x3  );
+               LBMReal mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2p,x3  );
+               LBMReal mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3p  );
+               LBMReal mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3 );
+               LBMReal mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2p,x3 );
+               LBMReal mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,x3p );
+               LBMReal mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3p );
+               LBMReal mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2p,x3p );
+               LBMReal mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3p );
+               LBMReal mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p);
+               LBMReal mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2p,x3p);
+               LBMReal mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,x3p);
+               LBMReal mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3p);
+
+               LBMReal mfbbb = (*this->zeroDistributions)(x1,x2,x3);
+
+               ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal drho = ((((mfccc+mfaaa)+(mfaca+mfcac))+((mfacc+mfcaa)+(mfaac+mfcca)))+
+                  (((mfbac+mfbca)+(mfbaa+mfbcc))+((mfabc+mfcba)+(mfaba+mfcbc))+((mfacb+mfcab)+(mfaab+mfccb)))+
+                  ((mfabb+mfcbb)+(mfbab+mfbcb))+(mfbba+mfbbc))+mfbbb;
+
+               LBMReal rho = one+drho;
+               ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal vvx = ((((mfccc-mfaaa)+(mfcac-mfaca))+((mfcaa-mfacc)+(mfcca-mfaac)))+
+                  (((mfcba-mfabc)+(mfcbc-mfaba))+((mfcab-mfacb)+(mfccb-mfaab)))+
+                  (mfcbb-mfabb))/rho;
+               LBMReal vvy = ((((mfccc-mfaaa)+(mfaca-mfcac))+((mfacc-mfcaa)+(mfcca-mfaac)))+
+                  (((mfbca-mfbac)+(mfbcc-mfbaa))+((mfacb-mfcab)+(mfccb-mfaab)))+
+                  (mfbcb-mfbab))/rho;
+               LBMReal vvz = ((((mfccc-mfaaa)+(mfcac-mfaca))+((mfacc-mfcaa)+(mfaac-mfcca)))+
+                  (((mfbac-mfbca)+(mfbcc-mfbaa))+((mfabc-mfcba)+(mfcbc-mfaba)))+
+                  (mfbbc-mfbba))/rho;
+               ////////////////////////////////////////////////////////////////////////////////////
+
+               //forcing 
+               ///////////////////////////////////////////////////////////////////////////////////////////
+               if (withForcing)
+               {
+                  muX1 = static_cast<double>(x1-1+ix1*maxX1);
+                  muX2 = static_cast<double>(x2-1+ix2*maxX2);
+                  muX3 = static_cast<double>(x3-1+ix3*maxX3);
+
+                  forcingX1 = muForcingX1.Eval();
+                  forcingX2 = muForcingX2.Eval();
+                  forcingX3 = muForcingX3.Eval();
+
+                  vvx += forcingX1*deltaT*0.5; // X
+                  vvy += forcingX2*deltaT*0.5; // Y
+                  vvz += forcingX3*deltaT*0.5; // Z
+               }
+               ///////////////////////////////////////////////////////////////////////////////////////////               
+         ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal oMdrho = one; // comp special
+               ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal m0, m1, m2;
+               LBMReal vx2;
+               LBMReal vy2;
+               LBMReal vz2;
+               vx2 = vvx*vvx;
+               vy2 = vvy*vvy;
+               vz2 = vvz*vvz;
+               ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal wadjust;
+               LBMReal qudricLimitP = 0.01f;// * 0.0001f;
+               LBMReal qudricLimitM = 0.01f;// * 0.0001f;
+               LBMReal qudricLimitD = 0.01f;// * 0.001f;
+               //LBMReal s9 = minusomega;
+               //test
+               //s9 = 0.;
+               ////////////////////////////////////////////////////////////////////////////////////
+               //Hin
+               ////////////////////////////////////////////////////////////////////////////////////
+               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
+               ////////////////////////////////////////////////////////////////////////////////////
+               // Z - Dir
+               m2 = mfaaa+mfaac;
+               m1 = mfaac-mfaaa;
+               m0 = m2+mfaab;
+               mfaaa = m0;
+               m0 += c1o36 * oMdrho;
+               mfaab = m1-m0 * vvz;
+               mfaac = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaba+mfabc;
+               m1 = mfabc-mfaba;
+               m0 = m2+mfabb;
+               mfaba = m0;
+               m0 += c1o9 * oMdrho;
+               mfabb = m1-m0 * vvz;
+               mfabc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaca+mfacc;
+               m1 = mfacc-mfaca;
+               m0 = m2+mfacb;
+               mfaca = m0;
+               m0 += c1o36 * oMdrho;
+               mfacb = m1-m0 * vvz;
+               mfacc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbaa+mfbac;
+               m1 = mfbac-mfbaa;
+               m0 = m2+mfbab;
+               mfbaa = m0;
+               m0 += c1o9 * oMdrho;
+               mfbab = m1-m0 * vvz;
+               mfbac = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbba+mfbbc;
+               m1 = mfbbc-mfbba;
+               m0 = m2+mfbbb;
+               mfbba = m0;
+               m0 += c4o9 * oMdrho;
+               mfbbb = m1-m0 * vvz;
+               mfbbc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbca+mfbcc;
+               m1 = mfbcc-mfbca;
+               m0 = m2+mfbcb;
+               mfbca = m0;
+               m0 += c1o9 * oMdrho;
+               mfbcb = m1-m0 * vvz;
+               mfbcc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcaa+mfcac;
+               m1 = mfcac-mfcaa;
+               m0 = m2+mfcab;
+               mfcaa = m0;
+               m0 += c1o36 * oMdrho;
+               mfcab = m1-m0 * vvz;
+               mfcac = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcba+mfcbc;
+               m1 = mfcbc-mfcba;
+               m0 = m2+mfcbb;
+               mfcba = m0;
+               m0 += c1o9 * oMdrho;
+               mfcbb = m1-m0 * vvz;
+               mfcbc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcca+mfccc;
+               m1 = mfccc-mfcca;
+               m0 = m2+mfccb;
+               mfcca = m0;
+               m0 += c1o36 * oMdrho;
+               mfccb = m1-m0 * vvz;
+               mfccc = m2-two*	m1 * vvz+vz2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
+               ////////////////////////////////////////////////////////////////////////////////////
+               // Y - Dir
+               m2 = mfaaa+mfaca;
+               m1 = mfaca-mfaaa;
+               m0 = m2+mfaba;
+               mfaaa = m0;
+               m0 += c1o6 * oMdrho;
+               mfaba = m1-m0 * vvy;
+               mfaca = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaab+mfacb;
+               m1 = mfacb-mfaab;
+               m0 = m2+mfabb;
+               mfaab = m0;
+               mfabb = m1-m0 * vvy;
+               mfacb = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaac+mfacc;
+               m1 = mfacc-mfaac;
+               m0 = m2+mfabc;
+               mfaac = m0;
+               m0 += c1o18 * oMdrho;
+               mfabc = m1-m0 * vvy;
+               mfacc = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbaa+mfbca;
+               m1 = mfbca-mfbaa;
+               m0 = m2+mfbba;
+               mfbaa = m0;
+               m0 += c2o3 * oMdrho;
+               mfbba = m1-m0 * vvy;
+               mfbca = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbab+mfbcb;
+               m1 = mfbcb-mfbab;
+               m0 = m2+mfbbb;
+               mfbab = m0;
+               mfbbb = m1-m0 * vvy;
+               mfbcb = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfbac+mfbcc;
+               m1 = mfbcc-mfbac;
+               m0 = m2+mfbbc;
+               mfbac = m0;
+               m0 += c2o9 * oMdrho;
+               mfbbc = m1-m0 * vvy;
+               mfbcc = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcaa+mfcca;
+               m1 = mfcca-mfcaa;
+               m0 = m2+mfcba;
+               mfcaa = m0;
+               m0 += c1o6 * oMdrho;
+               mfcba = m1-m0 * vvy;
+               mfcca = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcab+mfccb;
+               m1 = mfccb-mfcab;
+               m0 = m2+mfcbb;
+               mfcab = m0;
+               mfcbb = m1-m0 * vvy;
+               mfccb = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfcac+mfccc;
+               m1 = mfccc-mfcac;
+               m0 = m2+mfcbc;
+               mfcac = m0;
+               m0 += c1o18 * oMdrho;
+               mfcbc = m1-m0 * vvy;
+               mfccc = m2-two*	m1 * vvy+vy2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9		Konditionieren
+               ////////////////////////////////////////////////////////////////////////////////////
+               // X - Dir
+               m2 = mfaaa+mfcaa;
+               m1 = mfcaa-mfaaa;
+               m0 = m2+mfbaa;
+               mfaaa = m0;
+               m0 += one* oMdrho;
+               mfbaa = m1-m0 * vvx;
+               mfcaa = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaba+mfcba;
+               m1 = mfcba-mfaba;
+               m0 = m2+mfbba;
+               mfaba = m0;
+               mfbba = m1-m0 * vvx;
+               mfcba = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaca+mfcca;
+               m1 = mfcca-mfaca;
+               m0 = m2+mfbca;
+               mfaca = m0;
+               m0 += c1o3 * oMdrho;
+               mfbca = m1-m0 * vvx;
+               mfcca = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaab+mfcab;
+               m1 = mfcab-mfaab;
+               m0 = m2+mfbab;
+               mfaab = m0;
+               mfbab = m1-m0 * vvx;
+               mfcab = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfabb+mfcbb;
+               m1 = mfcbb-mfabb;
+               m0 = m2+mfbbb;
+               mfabb = m0;
+               mfbbb = m1-m0 * vvx;
+               mfcbb = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfacb+mfccb;
+               m1 = mfccb-mfacb;
+               m0 = m2+mfbcb;
+               mfacb = m0;
+               mfbcb = m1-m0 * vvx;
+               mfccb = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfaac+mfcac;
+               m1 = mfcac-mfaac;
+               m0 = m2+mfbac;
+               mfaac = m0;
+               m0 += c1o3 * oMdrho;
+               mfbac = m1-m0 * vvx;
+               mfcac = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfabc+mfcbc;
+               m1 = mfcbc-mfabc;
+               m0 = m2+mfbbc;
+               mfabc = m0;
+               mfbbc = m1-m0 * vvx;
+               mfcbc = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m2 = mfacc+mfccc;
+               m1 = mfccc-mfacc;
+               m0 = m2+mfbcc;
+               mfacc = m0;
+               m0 += c1o9 * oMdrho;
+               mfbcc = m1-m0 * vvx;
+               mfccc = m2-two*	m1 * vvx+vx2 * m0;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+
+
+               ////////////////////////////////////////////////////////////////////////////////////
+               // Cumulants
+               ////////////////////////////////////////////////////////////////////////////////////
+               LBMReal OxxPyyPzz = one; // bulk viscosity
+
+               ////////////////////////////////////////////////////////////
+               //3.
+               //////////////////////////////
+               LBMReal OxyyPxzz = one;//three  * (two - omega) / (three  - omega);//
+               LBMReal OxyyMxzz = one;//six    * (two - omega) / (six    - omega);//
+               LBMReal Oxyz = one;//twelve * (two - omega) / (twelve + omega);//
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = two-omega;//
+               //LBMReal OxyyMxzz  = two-omega;//
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = (eight * (omega - two)) / (omega - eight);//Ginzburg
+               //LBMReal OxyyMxzz  = (eight * (omega - two)) / (omega - eight);//Ginzburg
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = omega;//BGK
+               //LBMReal OxyyMxzz  = omega;//BGK
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = (one + omega) / two;//1P5
+               //LBMReal OxyyMxzz  = (one + omega) / two;//1P5
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = (three - omega) / two;//0P5
+               //LBMReal OxyyMxzz  = (three - omega) / two;//0P5
+               //////////////////////////////
+               //LBMReal OxyyPxzz  = (one + (eight * (omega - two)) / (omega - eight)) / two;//one + Ginzburg / two ... Car
+               //LBMReal OxyyMxzz  = (one + (eight * (omega - two)) / (omega - eight)) / two;//one + Ginzburg / two ... Car
+               ////////////////////////////////////////////////////////////
+               //4.
+               //////////////////////////////
+               LBMReal O4 = one;
+               //////////////////////////////
+               //LBMReal O4        = omega;//TRT
+               ////////////////////////////////////////////////////////////
+               //5.
+               //////////////////////////////
+               LBMReal O5 = one;
+               ////////////////////////////////////////////////////////////
+               //6.
+               //////////////////////////////
+               LBMReal O6 = one;
+               ////////////////////////////////////////////////////////////
+
+
+               //central moments to cumulants
+               //4.
+               LBMReal CUMcbb = mfcbb-((mfcaa+c1o3) * mfabb+two * mfbba * mfbab)/rho;	//ab 15.05.2015 verwendet
+               LBMReal CUMbcb = mfbcb-((mfaca+c1o3) * mfbab+two * mfbba * mfabb)/rho; //ab 15.05.2015 verwendet
+               LBMReal CUMbbc = mfbbc-((mfaac+c1o3) * mfbba+two * mfbab * mfabb)/rho; //ab 15.05.2015 verwendet
+
+               LBMReal CUMcca = mfcca-(((mfcaa * mfaca+two * mfbba * mfbba)+c1o3 * (mfcaa+mfaca))/rho-c1o9*(drho/rho));
+               LBMReal CUMcac = mfcac-(((mfcaa * mfaac+two * mfbab * mfbab)+c1o3 * (mfcaa+mfaac))/rho-c1o9*(drho/rho));
+               LBMReal CUMacc = mfacc-(((mfaac * mfaca+two * mfabb * mfabb)+c1o3 * (mfaac+mfaca))/rho-c1o9*(drho/rho));
+
+               //5.
+               LBMReal CUMbcc = mfbcc-((mfaac * mfbca+mfaca * mfbac+four * mfabb * mfbbb+two * (mfbab * mfacb+mfbba * mfabc))+c1o3 * (mfbca+mfbac))/rho;
+               LBMReal CUMcbc = mfcbc-((mfaac * mfcba+mfcaa * mfabc+four * mfbab * mfbbb+two * (mfabb * mfcab+mfbba * mfbac))+c1o3 * (mfcba+mfabc))/rho;
+               LBMReal CUMccb = mfccb-((mfcaa * mfacb+mfaca * mfcab+four * mfbba * mfbbb+two * (mfbab * mfbca+mfabb * mfcba))+c1o3 * (mfacb+mfcab))/rho;
+
+               //6.
+
+               LBMReal CUMccc = mfccc+((-four *  mfbbb * mfbbb
+                  -(mfcaa * mfacc+mfaca * mfcac+mfaac * mfcca)
+                  -four * (mfabb * mfcbb+mfbab * mfbcb+mfbba * mfbbc)
+                  -two * (mfbca * mfbac+mfcba * mfabc+mfcab * mfacb))/rho
+                  +(four * (mfbab * mfbab * mfaca+mfabb * mfabb * mfcaa+mfbba * mfbba * mfaac)
+                     +two * (mfcaa * mfaca * mfaac)
+                     +sixteen *  mfbba * mfbab * mfabb)/(rho * rho)
+                  -c1o3 * (mfacc+mfcac+mfcca)/rho
+                  -c1o9 * (mfcaa+mfaca+mfaac)/rho
+                  +(two * (mfbab * mfbab+mfabb * mfabb+mfbba * mfbba)
+                     +(mfaac * mfaca+mfaac * mfcaa+mfaca * mfcaa)+c1o3 *(mfaac+mfaca+mfcaa))/(rho * rho) * c2o3
+                  +c1o27*((drho * drho-drho)/(rho*rho)));
+               //+ c1o27*(one -three/rho +two/(rho*rho)));
+
+
+
+
+   //2.
+   // linear combinations
+               LBMReal mxxPyyPzz = mfcaa+mfaca+mfaac;
+               LBMReal mxxMyy = mfcaa-mfaca;
+               LBMReal mxxMzz = mfcaa-mfaac;
+
+               //////////////////////////////////////////////////////////////////////////
+      // 			LBMReal magicBulk=(CUMacc+CUMcac+CUMcca)*(one/OxxPyyPzz-c1o2)*c3o2*8.;
+
+               //////////////////////////////////////////////////////////////////////////
+               //limiter-Scheise Teil 1
+               //LBMReal oxxyy,oxxzz,oxy,oxz,oyz;
+               //LBMReal smag=0.001;
+               //oxxyy    = omega+(one-omega)*abs(mxxMyy)/(abs(mxxMyy)+smag);
+               //oxxzz    = omega+(one-omega)*abs(mxxMzz)/(abs(mxxMzz)+smag);
+               //oxy      = omega+(one-omega)*abs(mfbba)/(abs(mfbba)+smag);
+               //oxz      = omega+(one-omega)*abs(mfbab)/(abs(mfbab)+smag);
+               //oyz      = omega+(one-omega)*abs(mfabb)/(abs(mfabb)+smag);
+
+               ////////////////////////////////////////////////////////////////////////////
+               ////Teil 1b
+               //LBMReal constante = 1000.0;
+               //LBMReal nuEddi = constante * abs(mxxPyyPzz);
+               //LBMReal omegaLimit = one / (one / omega + three * nuEddi);
+
+               //{
+               //	LBMReal dxux = c1o2 * (-omegaLimit) *(mxxMyy + mxxMzz) +  OxxPyyPzz * (mfaaa - mxxPyyPzz);
+               //	LBMReal dyuy = dxux + omegaLimit * c3o2 * mxxMyy;
+               //	LBMReal dzuz = dxux + omegaLimit * c3o2 * mxxMzz;
+
+                  ////relax
+                  //mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- three * (one - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
+                  //mxxMyy    += omegaLimit * (-mxxMyy) - three * (one + c1o2 * (-omegaLimit)) * (vx2 * dxux + vy2 * dyuy);
+                  //mxxMzz    += omegaLimit * (-mxxMzz) - three * (one + c1o2 * (-omegaLimit)) * (vx2 * dxux + vz2 * dzuz);
+
+               //}
+               //mfabb     += omegaLimit * (-mfabb);
+               //mfbab     += omegaLimit * (-mfbab);
+               //mfbba     += omegaLimit * (-mfbba);
+               ////////////////////////////////////////////////////////////////////////////
+
+               ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+               //incl. correction		(hat noch nicht so gut funktioniert...Optimierungsbedarf??)
+               {
+                  LBMReal dxux = c1o2 * (-omega) *(mxxMyy+mxxMzz)+c1o2 *  OxxPyyPzz * (mfaaa-mxxPyyPzz);
+                  LBMReal dyuy = dxux+omega * c3o2 * mxxMyy;
+                  LBMReal dzuz = dxux+omega * c3o2 * mxxMzz;
+
+                  //relax
+                  mxxPyyPzz += OxxPyyPzz*(mfaaa-mxxPyyPzz)-three * (one-c1o2 * OxxPyyPzz) * (vx2 * dxux+vy2 * dyuy+vz2 * dzuz);//-magicBulk*OxxPyyPzz;
+                  mxxMyy += omega * (-mxxMyy)-three * (one+c1o2 * (-omega)) * (vx2 * dxux-vy2 * dyuy);
+                  mxxMzz += omega * (-mxxMzz)-three * (one+c1o2 * (-omega)) * (vx2 * dxux-vz2 * dzuz);
+
+                  //////////////////////////////////////////////////////////////////////////
+                  //limiter-Scheise Teil 2
+                  //mxxMyy    += oxxyy * (-mxxMyy) - three * (one + c1o2 * (-omega)) * (vx2 * dxux + vy2 * dyuy);
+                  //mxxMzz    += oxxzz * (-mxxMzz) - three * (one + c1o2 * (-omega)) * (vx2 * dxux + vz2 * dzuz);
+                  //////////////////////////////////////////////////////////////////////////
+
+               }
+               ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+               /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+               ////no correction
+               //mxxPyyPzz += OxxPyyPzz*(mfaaa-mxxPyyPzz);//-magicBulk*OxxPyyPzz;
+               //mxxMyy    += -(-omega) * (-mxxMyy);
+               //mxxMzz    += -(-omega) * (-mxxMzz);
+               /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+               mfabb += omega * (-mfabb);
+               mfbab += omega * (-mfbab);
+               mfbba += omega * (-mfbba);
+
+               //////////////////////////////////////////////////////////////////////////
+               //limiter-Scheise Teil 3
+               //mfabb     += oyz * (-mfabb);
+               //mfbab     += oxz * (-mfbab);
+               //mfbba     += oxy * (-mfbba);
+               //////////////////////////////////////////////////////////////////////////
+
+               // linear combinations back
+               mfcaa = c1o3 * (mxxMyy+mxxMzz+mxxPyyPzz);
+               mfaca = c1o3 * (-two*  mxxMyy+mxxMzz+mxxPyyPzz);
+               mfaac = c1o3 * (mxxMyy-two* mxxMzz+mxxPyyPzz);
+
+               //3.
+               // linear combinations
+
+               LBMReal mxxyPyzz = mfcba+mfabc;
+               LBMReal mxxyMyzz = mfcba-mfabc;
+
+               LBMReal mxxzPyyz = mfcab+mfacb;
+               LBMReal mxxzMyyz = mfcab-mfacb;
+
+               LBMReal mxyyPxzz = mfbca+mfbac;
+               LBMReal mxyyMxzz = mfbca-mfbac;
+
+               //relax
+               //////////////////////////////////////////////////////////////////////////
+               //das ist der limiter
+               wadjust = Oxyz+(one-Oxyz)*abs(mfbbb)/(abs(mfbbb)+qudricLimitD);
+               mfbbb += wadjust * (-mfbbb);
+               wadjust = OxyyPxzz+(one-OxyyPxzz)*abs(mxxyPyzz)/(abs(mxxyPyzz)+qudricLimitP);
+               mxxyPyzz += wadjust * (-mxxyPyzz);
+               wadjust = OxyyMxzz+(one-OxyyMxzz)*abs(mxxyMyzz)/(abs(mxxyMyzz)+qudricLimitM);
+               mxxyMyzz += wadjust * (-mxxyMyzz);
+               wadjust = OxyyPxzz+(one-OxyyPxzz)*abs(mxxzPyyz)/(abs(mxxzPyyz)+qudricLimitP);
+               mxxzPyyz += wadjust * (-mxxzPyyz);
+               wadjust = OxyyMxzz+(one-OxyyMxzz)*abs(mxxzMyyz)/(abs(mxxzMyyz)+qudricLimitM);
+               mxxzMyyz += wadjust * (-mxxzMyyz);
+               wadjust = OxyyPxzz+(one-OxyyPxzz)*abs(mxyyPxzz)/(abs(mxyyPxzz)+qudricLimitP);
+               mxyyPxzz += wadjust * (-mxyyPxzz);
+               wadjust = OxyyMxzz+(one-OxyyMxzz)*abs(mxyyMxzz)/(abs(mxyyMxzz)+qudricLimitM);
+               mxyyMxzz += wadjust * (-mxyyMxzz);
+               //////////////////////////////////////////////////////////////////////////
+               //ohne limiter
+               //mfbbb     += OxyyMxzz * (-mfbbb);
+               //mxxyPyzz  += OxyyPxzz * (-mxxyPyzz);
+               //mxxyMyzz  += OxyyMxzz * (-mxxyMyzz);
+               //mxxzPyyz  += OxyyPxzz * (-mxxzPyyz);
+               //mxxzMyyz  += OxyyMxzz * (-mxxzMyyz);
+               //mxyyPxzz  += OxyyPxzz * (-mxyyPxzz);
+               //mxyyMxzz  += OxyyMxzz * (-mxyyMxzz);
+               //////////////////////////////////////////////////////////////////////////
+
+               //// linear combinations back
+               mfcba = (mxxyMyzz+mxxyPyzz) * c1o2;
+               mfabc = (-mxxyMyzz+mxxyPyzz) * c1o2;
+               mfcab = (mxxzMyyz+mxxzPyyz) * c1o2;
+               mfacb = (-mxxzMyyz+mxxzPyyz) * c1o2;
+               mfbca = (mxyyMxzz+mxyyPxzz) * c1o2;
+               mfbac = (-mxyyMxzz+mxyyPxzz) * c1o2;
+
+               //4.
+               //////////////////////////////////////////////////////////////////////////
+               //mit limiter
+            //	wadjust    = O4+(one-O4)*abs(CUMacc)/(abs(CUMacc)+qudricLimit);
+               //CUMacc    += wadjust * (-CUMacc);
+            //	wadjust    = O4+(one-O4)*abs(CUMcac)/(abs(CUMcac)+qudricLimit);
+               //CUMcac    += wadjust * (-CUMcac); 
+            //	wadjust    = O4+(one-O4)*abs(CUMcca)/(abs(CUMcca)+qudricLimit);
+               //CUMcca    += wadjust * (-CUMcca); 
+
+            //	wadjust    = O4+(one-O4)*abs(CUMbbc)/(abs(CUMbbc)+qudricLimit);
+               //CUMbbc    += wadjust * (-CUMbbc); 
+            //	wadjust    = O4+(one-O4)*abs(CUMbcb)/(abs(CUMbcb)+qudricLimit);
+               //CUMbcb    += wadjust * (-CUMbcb); 
+            //	wadjust    = O4+(one-O4)*abs(CUMcbb)/(abs(CUMcbb)+qudricLimit);
+               //CUMcbb    += wadjust * (-CUMcbb); 
+               //////////////////////////////////////////////////////////////////////////
+               //ohne limiter
+               CUMacc += O4 * (-CUMacc);
+               CUMcac += O4 * (-CUMcac);
+               CUMcca += O4 * (-CUMcca);
+
+               CUMbbc += O4 * (-CUMbbc);
+               CUMbcb += O4 * (-CUMbcb);
+               CUMcbb += O4 * (-CUMcbb);
+               //////////////////////////////////////////////////////////////////////////
+
+
+               //5.
+               CUMbcc += O5 * (-CUMbcc);
+               CUMcbc += O5 * (-CUMcbc);
+               CUMccb += O5 * (-CUMccb);
+
+               //6.
+               CUMccc += O6 * (-CUMccc);
+
+
+
+               //back cumulants to central moments
+               //4.
+               mfcbb = CUMcbb+((mfcaa+c1o3) * mfabb+two * mfbba * mfbab)/rho;
+               mfbcb = CUMbcb+((mfaca+c1o3) * mfbab+two * mfbba * mfabb)/rho;
+               mfbbc = CUMbbc+((mfaac+c1o3) * mfbba+two * mfbab * mfabb)/rho;
+
+               mfcca = CUMcca+(((mfcaa * mfaca+two * mfbba * mfbba)+c1o3 * (mfcaa+mfaca))/rho-c1o9*(drho/rho));//(one/rho-one));
+               mfcac = CUMcac+(((mfcaa * mfaac+two * mfbab * mfbab)+c1o3 * (mfcaa+mfaac))/rho-c1o9*(drho/rho));//(one/rho-one));
+               mfacc = CUMacc+(((mfaac * mfaca+two * mfabb * mfabb)+c1o3 * (mfaac+mfaca))/rho-c1o9*(drho/rho));//(one/rho-one));
+
+               //5.
+               mfbcc = CUMbcc+((mfaac * mfbca+mfaca * mfbac+four * mfabb * mfbbb+two * (mfbab * mfacb+mfbba * mfabc))+c1o3 * (mfbca+mfbac))/rho;
+               mfcbc = CUMcbc+((mfaac * mfcba+mfcaa * mfabc+four * mfbab * mfbbb+two * (mfabb * mfcab+mfbba * mfbac))+c1o3 * (mfcba+mfabc))/rho;
+               mfccb = CUMccb+((mfcaa * mfacb+mfaca * mfcab+four * mfbba * mfbbb+two * (mfbab * mfbca+mfabb * mfcba))+c1o3 * (mfacb+mfcab))/rho;
+
+               //6.
+
+               mfccc = CUMccc-((-four *  mfbbb * mfbbb
+                  -(mfcaa * mfacc+mfaca * mfcac+mfaac * mfcca)
+                  -four * (mfabb * mfcbb+mfbab * mfbcb+mfbba * mfbbc)
+                  -two * (mfbca * mfbac+mfcba * mfabc+mfcab * mfacb))/rho
+                  +(four * (mfbab * mfbab * mfaca+mfabb * mfabb * mfcaa+mfbba * mfbba * mfaac)
+                     +two * (mfcaa * mfaca * mfaac)
+                     +sixteen *  mfbba * mfbab * mfabb)/(rho * rho)
+                  -c1o3 * (mfacc+mfcac+mfcca)/rho
+                  -c1o9 * (mfcaa+mfaca+mfaac)/rho
+                  +(two * (mfbab * mfbab+mfabb * mfabb+mfbba * mfbba)
+                     +(mfaac * mfaca+mfaac * mfcaa+mfaca * mfcaa)+c1o3 *(mfaac+mfaca+mfcaa))/(rho * rho) * c2o3
+                  +c1o27*((drho * drho-drho)/(rho*rho)));
+               ////////////////////////////////////////////////////////////////////////////////////
+               //forcing
+               mfbaa=-mfbaa;
+               mfaba=-mfaba;
+               mfaab=-mfaab;
+               //////////////////////////////////////////////////////////////////////////////////////
+
+         ////////////////////////////////////////////////////////////////////////////////////
+         //back
+         ////////////////////////////////////////////////////////////////////////////////////
+         //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
+         ////////////////////////////////////////////////////////////////////////////////////
+         // Z - Dir
+               m0 = mfaac * c1o2+mfaab * (vvz-c1o2)+(mfaaa+one* oMdrho) * (vz2-vvz) * c1o2;
+               m1 = -mfaac-two* mfaab *  vvz+mfaaa                * (one-vz2)-one* oMdrho * vz2;
+               m2 = mfaac * c1o2+mfaab * (vvz+c1o2)+(mfaaa+one* oMdrho) * (vz2+vvz) * c1o2;
+               mfaaa = m0;
+               mfaab = m1;
+               mfaac = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfabc * c1o2+mfabb * (vvz-c1o2)+mfaba * (vz2-vvz) * c1o2;
+               m1 = -mfabc-two* mfabb *  vvz+mfaba * (one-vz2);
+               m2 = mfabc * c1o2+mfabb * (vvz+c1o2)+mfaba * (vz2+vvz) * c1o2;
+               mfaba = m0;
+               mfabb = m1;
+               mfabc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfacc * c1o2+mfacb * (vvz-c1o2)+(mfaca+c1o3 * oMdrho) * (vz2-vvz) * c1o2;
+               m1 = -mfacc-two* mfacb *  vvz+mfaca                  * (one-vz2)-c1o3 * oMdrho * vz2;
+               m2 = mfacc * c1o2+mfacb * (vvz+c1o2)+(mfaca+c1o3 * oMdrho) * (vz2+vvz) * c1o2;
+               mfaca = m0;
+               mfacb = m1;
+               mfacc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfbac * c1o2+mfbab * (vvz-c1o2)+mfbaa * (vz2-vvz) * c1o2;
+               m1 = -mfbac-two* mfbab *  vvz+mfbaa * (one-vz2);
+               m2 = mfbac * c1o2+mfbab * (vvz+c1o2)+mfbaa * (vz2+vvz) * c1o2;
+               mfbaa = m0;
+               mfbab = m1;
+               mfbac = m2;
+               /////////b//////////////////////////////////////////////////////////////////////////
+               m0 = mfbbc * c1o2+mfbbb * (vvz-c1o2)+mfbba * (vz2-vvz) * c1o2;
+               m1 = -mfbbc-two* mfbbb *  vvz+mfbba * (one-vz2);
+               m2 = mfbbc * c1o2+mfbbb * (vvz+c1o2)+mfbba * (vz2+vvz) * c1o2;
+               mfbba = m0;
+               mfbbb = m1;
+               mfbbc = m2;
+               /////////b//////////////////////////////////////////////////////////////////////////
+               m0 = mfbcc * c1o2+mfbcb * (vvz-c1o2)+mfbca * (vz2-vvz) * c1o2;
+               m1 = -mfbcc-two* mfbcb *  vvz+mfbca * (one-vz2);
+               m2 = mfbcc * c1o2+mfbcb * (vvz+c1o2)+mfbca * (vz2+vvz) * c1o2;
+               mfbca = m0;
+               mfbcb = m1;
+               mfbcc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcac * c1o2+mfcab * (vvz-c1o2)+(mfcaa+c1o3 * oMdrho) * (vz2-vvz) * c1o2;
+               m1 = -mfcac-two* mfcab *  vvz+mfcaa                  * (one-vz2)-c1o3 * oMdrho * vz2;
+               m2 = mfcac * c1o2+mfcab * (vvz+c1o2)+(mfcaa+c1o3 * oMdrho) * (vz2+vvz) * c1o2;
+               mfcaa = m0;
+               mfcab = m1;
+               mfcac = m2;
+               /////////c//////////////////////////////////////////////////////////////////////////
+               m0 = mfcbc * c1o2+mfcbb * (vvz-c1o2)+mfcba * (vz2-vvz) * c1o2;
+               m1 = -mfcbc-two* mfcbb *  vvz+mfcba * (one-vz2);
+               m2 = mfcbc * c1o2+mfcbb * (vvz+c1o2)+mfcba * (vz2+vvz) * c1o2;
+               mfcba = m0;
+               mfcbb = m1;
+               mfcbc = m2;
+               /////////c//////////////////////////////////////////////////////////////////////////
+               m0 = mfccc * c1o2+mfccb * (vvz-c1o2)+(mfcca+c1o9 * oMdrho) * (vz2-vvz) * c1o2;
+               m1 = -mfccc-two* mfccb *  vvz+mfcca                  * (one-vz2)-c1o9 * oMdrho * vz2;
+               m2 = mfccc * c1o2+mfccb * (vvz+c1o2)+(mfcca+c1o9 * oMdrho) * (vz2+vvz) * c1o2;
+               mfcca = m0;
+               mfccb = m1;
+               mfccc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
+               ////////////////////////////////////////////////////////////////////////////////////
+               // Y - Dir
+               m0 = mfaca * c1o2+mfaba * (vvy-c1o2)+(mfaaa+c1o6 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfaca-two* mfaba *  vvy+mfaaa                  * (one-vy2)-c1o6 * oMdrho * vy2;
+               m2 = mfaca * c1o2+mfaba * (vvy+c1o2)+(mfaaa+c1o6 * oMdrho) * (vy2+vvy) * c1o2;
+               mfaaa = m0;
+               mfaba = m1;
+               mfaca = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfacb * c1o2+mfabb * (vvy-c1o2)+(mfaab+c2o3 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfacb-two* mfabb *  vvy+mfaab                  * (one-vy2)-c2o3 * oMdrho * vy2;
+               m2 = mfacb * c1o2+mfabb * (vvy+c1o2)+(mfaab+c2o3 * oMdrho) * (vy2+vvy) * c1o2;
+               mfaab = m0;
+               mfabb = m1;
+               mfacb = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfacc * c1o2+mfabc * (vvy-c1o2)+(mfaac+c1o6 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfacc-two* mfabc *  vvy+mfaac                  * (one-vy2)-c1o6 * oMdrho * vy2;
+               m2 = mfacc * c1o2+mfabc * (vvy+c1o2)+(mfaac+c1o6 * oMdrho) * (vy2+vvy) * c1o2;
+               mfaac = m0;
+               mfabc = m1;
+               mfacc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfbca * c1o2+mfbba * (vvy-c1o2)+mfbaa * (vy2-vvy) * c1o2;
+               m1 = -mfbca-two* mfbba *  vvy+mfbaa * (one-vy2);
+               m2 = mfbca * c1o2+mfbba * (vvy+c1o2)+mfbaa * (vy2+vvy) * c1o2;
+               mfbaa = m0;
+               mfbba = m1;
+               mfbca = m2;
+               /////////b//////////////////////////////////////////////////////////////////////////
+               m0 = mfbcb * c1o2+mfbbb * (vvy-c1o2)+mfbab * (vy2-vvy) * c1o2;
+               m1 = -mfbcb-two* mfbbb *  vvy+mfbab * (one-vy2);
+               m2 = mfbcb * c1o2+mfbbb * (vvy+c1o2)+mfbab * (vy2+vvy) * c1o2;
+               mfbab = m0;
+               mfbbb = m1;
+               mfbcb = m2;
+               /////////b//////////////////////////////////////////////////////////////////////////
+               m0 = mfbcc * c1o2+mfbbc * (vvy-c1o2)+mfbac * (vy2-vvy) * c1o2;
+               m1 = -mfbcc-two* mfbbc *  vvy+mfbac * (one-vy2);
+               m2 = mfbcc * c1o2+mfbbc * (vvy+c1o2)+mfbac * (vy2+vvy) * c1o2;
+               mfbac = m0;
+               mfbbc = m1;
+               mfbcc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcca * c1o2+mfcba * (vvy-c1o2)+(mfcaa+c1o18 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfcca-two* mfcba *  vvy+mfcaa                   * (one-vy2)-c1o18 * oMdrho * vy2;
+               m2 = mfcca * c1o2+mfcba * (vvy+c1o2)+(mfcaa+c1o18 * oMdrho) * (vy2+vvy) * c1o2;
+               mfcaa = m0;
+               mfcba = m1;
+               mfcca = m2;
+               /////////c//////////////////////////////////////////////////////////////////////////
+               m0 = mfccb * c1o2+mfcbb * (vvy-c1o2)+(mfcab+c2o9 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfccb-two* mfcbb *  vvy+mfcab                  * (one-vy2)-c2o9 * oMdrho * vy2;
+               m2 = mfccb * c1o2+mfcbb * (vvy+c1o2)+(mfcab+c2o9 * oMdrho) * (vy2+vvy) * c1o2;
+               mfcab = m0;
+               mfcbb = m1;
+               mfccb = m2;
+               /////////c//////////////////////////////////////////////////////////////////////////
+               m0 = mfccc * c1o2+mfcbc * (vvy-c1o2)+(mfcac+c1o18 * oMdrho) * (vy2-vvy) * c1o2;
+               m1 = -mfccc-two* mfcbc *  vvy+mfcac                   * (one-vy2)-c1o18 * oMdrho * vy2;
+               m2 = mfccc * c1o2+mfcbc * (vvy+c1o2)+(mfcac+c1o18 * oMdrho) * (vy2+vvy) * c1o2;
+               mfcac = m0;
+               mfcbc = m1;
+               mfccc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
+               ////////////////////////////////////////////////////////////////////////////////////
+               // X - Dir
+               m0 = mfcaa * c1o2+mfbaa * (vvx-c1o2)+(mfaaa+c1o36 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcaa-two* mfbaa *  vvx+mfaaa                   * (one-vx2)-c1o36 * oMdrho * vx2;
+               m2 = mfcaa * c1o2+mfbaa * (vvx+c1o2)+(mfaaa+c1o36 * oMdrho) * (vx2+vvx) * c1o2;
+               mfaaa = m0;
+               mfbaa = m1;
+               mfcaa = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcba * c1o2+mfbba * (vvx-c1o2)+(mfaba+c1o9 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcba-two* mfbba *  vvx+mfaba                  * (one-vx2)-c1o9 * oMdrho * vx2;
+               m2 = mfcba * c1o2+mfbba * (vvx+c1o2)+(mfaba+c1o9 * oMdrho) * (vx2+vvx) * c1o2;
+               mfaba = m0;
+               mfbba = m1;
+               mfcba = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcca * c1o2+mfbca * (vvx-c1o2)+(mfaca+c1o36 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcca-two* mfbca *  vvx+mfaca                   * (one-vx2)-c1o36 * oMdrho * vx2;
+               m2 = mfcca * c1o2+mfbca * (vvx+c1o2)+(mfaca+c1o36 * oMdrho) * (vx2+vvx) * c1o2;
+               mfaca = m0;
+               mfbca = m1;
+               mfcca = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcab * c1o2+mfbab * (vvx-c1o2)+(mfaab+c1o9 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcab-two* mfbab *  vvx+mfaab                  * (one-vx2)-c1o9 * oMdrho * vx2;
+               m2 = mfcab * c1o2+mfbab * (vvx+c1o2)+(mfaab+c1o9 * oMdrho) * (vx2+vvx) * c1o2;
+               mfaab = m0;
+               mfbab = m1;
+               mfcab = m2;
+               ///////////b////////////////////////////////////////////////////////////////////////
+               m0 = mfcbb * c1o2+mfbbb * (vvx-c1o2)+(mfabb+c4o9 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcbb-two* mfbbb *  vvx+mfabb                  * (one-vx2)-c4o9 * oMdrho * vx2;
+               m2 = mfcbb * c1o2+mfbbb * (vvx+c1o2)+(mfabb+c4o9 * oMdrho) * (vx2+vvx) * c1o2;
+               mfabb = m0;
+               mfbbb = m1;
+               mfcbb = m2;
+               ///////////b////////////////////////////////////////////////////////////////////////
+               m0 = mfccb * c1o2+mfbcb * (vvx-c1o2)+(mfacb+c1o9 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfccb-two* mfbcb *  vvx+mfacb                  * (one-vx2)-c1o9 * oMdrho * vx2;
+               m2 = mfccb * c1o2+mfbcb * (vvx+c1o2)+(mfacb+c1o9 * oMdrho) * (vx2+vvx) * c1o2;
+               mfacb = m0;
+               mfbcb = m1;
+               mfccb = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+               ////////////////////////////////////////////////////////////////////////////////////
+               m0 = mfcac * c1o2+mfbac * (vvx-c1o2)+(mfaac+c1o36 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcac-two* mfbac *  vvx+mfaac                   * (one-vx2)-c1o36 * oMdrho * vx2;
+               m2 = mfcac * c1o2+mfbac * (vvx+c1o2)+(mfaac+c1o36 * oMdrho) * (vx2+vvx) * c1o2;
+               mfaac = m0;
+               mfbac = m1;
+               mfcac = m2;
+               ///////////c////////////////////////////////////////////////////////////////////////
+               m0 = mfcbc * c1o2+mfbbc * (vvx-c1o2)+(mfabc+c1o9 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfcbc-two* mfbbc *  vvx+mfabc                  * (one-vx2)-c1o9 * oMdrho * vx2;
+               m2 = mfcbc * c1o2+mfbbc * (vvx+c1o2)+(mfabc+c1o9 * oMdrho) * (vx2+vvx) * c1o2;
+               mfabc = m0;
+               mfbbc = m1;
+               mfcbc = m2;
+               ///////////c////////////////////////////////////////////////////////////////////////
+               m0 = mfccc * c1o2+mfbcc * (vvx-c1o2)+(mfacc+c1o36 * oMdrho) * (vx2-vvx) * c1o2;
+               m1 = -mfccc-two* mfbcc *  vvx+mfacc                   * (one-vx2)-c1o36 * oMdrho * vx2;
+               m2 = mfccc * c1o2+mfbcc * (vvx+c1o2)+(mfacc+c1o36 * oMdrho) * (vx2+vvx) * c1o2;
+               mfacc = m0;
+               mfbcc = m1;
+               mfccc = m2;
+               ////////////////////////////////////////////////////////////////////////////////////
+
+               //////////////////////////////////////////////////////////////////////////
+               //proof correctness
+               //////////////////////////////////////////////////////////////////////////
+#ifdef  PROOF_CORRECTNESS
+               LBMReal drho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
+                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
+                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
+               //LBMReal dif = fabs(rho - rho_post);
+               LBMReal dif = drho - drho_post;
+#ifdef SINGLEPRECISION
+               if(dif > 10.0E-7 || dif < -10.0E-7)
+#else
+               if(dif > 10.0E-15 || dif < -10.0E-15)
+#endif
+               {
+                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(drho)+", rho_post="+UbSystem::toString(drho_post)
+                     +" dif="+UbSystem::toString(dif)
+                     +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
+                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
+                  //exit(EXIT_FAILURE);
+               }
+#endif
+               //////////////////////////////////////////////////////////////////////////
+               //write distribution
+               //////////////////////////////////////////////////////////////////////////
+               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
+               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
+               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
+               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
+               (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3)   = mfcab;
+               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
+               (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3)   = mfcba;
+               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
+               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3)   = mfbca;
+               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
+               (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3)  = mfcaa;
+               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3)  = mfaca;
+               (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3)  = mfcca;
+
+               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = mfcbb;
+               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = mfbcb;
+               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = mfbbc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = mfccb;
+               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = mfacb;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = mfcbc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = mfabc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = mfbcc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = mfbac;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = mfccc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = mfacc;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = mfcac;
+               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = mfaac;
+
+               (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
+               //////////////////////////////////////////////////////////////////////////
+
+            }
+         }
+      }
+   }
+
+   }
+}
+//////////////////////////////////////////////////////////////////////////
+double CompressibleCumulantLBMKernel::getCallculationTime()
+{
+   //return timer.getDuration();
+   return timer.getTotalTime();
+}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.h b/source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h
similarity index 57%
rename from source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.h
rename to source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h
index d6b71a68c7608621b8eebd0dafa042c1568941c0..dc4073e94186cd856f3ae9532ff6a178cbcbe712 100644
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.h
+++ b/source/VirtualFluidsCore/LBM/CompressibleCumulantLBMKernel.h
@@ -1,7 +1,5 @@
-//Cascaded Cumulant LBM
-
-#ifndef LBMKernelETD3Q27CCLBSparse_H
-#define LBMKernelETD3Q27CCLBSparse_H
+#ifndef CompressibleCumulantLBMKernel_h__
+#define CompressibleCumulantLBMKernel_h__
 
 #include "LBMKernelETD3Q27.h"
 #include "D3Q27ETBCProcessor.h"
@@ -10,32 +8,29 @@
 #include "basics/utilities/UbTiming.h"
 #include "basics/container/CbArray4D.h"
 #include "basics/container/CbArray3D.h"
-//#include <SparseMatrix3D.h>
-//#include <SparseMatrix4D.h>
-
 
-class LBMKernelETD3Q27CCLBSparse;
-typedef boost::shared_ptr<LBMKernelETD3Q27CCLBSparse> LBMKernelETD3Q27CCLBSparsePtr;
+class CompressibleCumulantLBMKernel;
+typedef boost::shared_ptr<CompressibleCumulantLBMKernel> CompressibleCumulantLBMKernelPtr;
 
-//! \brief   Cascaded Cumulant LBM kernel. 
+//! \brief   compressible cumulant LBM kernel. 
 //! \details CFD solver that use Cascaded Cumulant Lattice Boltzmann method for D3Q27 model
-//! \author  K. Kucher, M. Geier
-class LBMKernelETD3Q27CCLBSparse :  public LBMKernelETD3Q27
+//! \author  K. Kutscher, M. Geier
+class CompressibleCumulantLBMKernel :  public LBMKernelETD3Q27
 {
 public:
    //! This option set relaxation parameter: NORMAL  
    enum Parameter{NORMAL, MAGIC};
 public:
-   LBMKernelETD3Q27CCLBSparse();
+   CompressibleCumulantLBMKernel();
    //! Constructor
    //! \param nx1 number of nodes in x dimension
    //! \param nx2 number of nodes in y dimension
    //! \param nx3 number of nodes in z dimension
    //! \param p   set relaxation parameter: NORMAL is OxyyMxzz = 1.0 and MAGIC is OxyyMxzz = 2.0 +(-collFactor)
-   LBMKernelETD3Q27CCLBSparse(int nx1, int nx2, int nx3, Parameter p);
-   virtual ~LBMKernelETD3Q27CCLBSparse(void);
-   void calculate();
-   LBMKernel3DPtr clone();
+   CompressibleCumulantLBMKernel(int nx1, int nx2, int nx3, Parameter p);
+   virtual ~CompressibleCumulantLBMKernel(void);
+   virtual void calculate();
+   virtual LBMKernel3DPtr clone();
    double getCallculationTime();
 
 protected:
@@ -48,15 +43,19 @@ protected:
       ar & parameter;
    }
 
-   void collideAll();  
-   void init();
+   virtual void collideAll();  
+   virtual void init();
    LBMReal f[D3Q27System::ENDF+1];
 
    UbTimer timer;
 
    LBMReal OxyyMxzz;
    Parameter parameter;
-   
+
+   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
+   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
+   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
+
    mu::value_type muX1,muX2,muX3;
    mu::value_type muDeltaT;
    mu::value_type muNu;
@@ -64,5 +63,6 @@ protected:
    LBMReal forcingX2;
    LBMReal forcingX3;
 };
+#endif // CompressibleCumulantLBMKernel_h__
+
 
-#endif
diff --git a/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp b/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..652a0398839c3485ee2123a57f6f1c8443969396
--- /dev/null
+++ b/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.cpp
@@ -0,0 +1,722 @@
+#include "CompressibleOffsetInterpolationProcessor.h"
+#include "D3Q27System.h"
+
+#include <boost/foreach.hpp>
+
+CompressibleOffsetInterpolationProcessor::CompressibleOffsetInterpolationProcessor()
+   : omegaC(0.0), omegaF(0.0)
+{
+   //forcingC = 0; //9.99685e-7;
+   //forcingF = 0; //forcingC*0.5;
+}
+//////////////////////////////////////////////////////////////////////////
+CompressibleOffsetInterpolationProcessor::CompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF)
+   : omegaC(omegaC), omegaF(omegaF)
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+CompressibleOffsetInterpolationProcessor::~CompressibleOffsetInterpolationProcessor()
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+D3Q27InterpolationProcessorPtr CompressibleOffsetInterpolationProcessor::clone()
+{
+   D3Q27InterpolationProcessorPtr iproc = D3Q27InterpolationProcessorPtr (new CompressibleOffsetInterpolationProcessor(this->omegaC, this->omegaF));
+   //boost::dynamic_pointer_cast<D3Q27IncompressibleOffsetInterpolationProcessor>(iproc)->forcingC = forcingC;
+   //boost::dynamic_pointer_cast<D3Q27IncompressibleOffsetInterpolationProcessor>(iproc)->forcingF = forcingF;
+   return iproc;
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::setOmegas( LBMReal omegaC, LBMReal omegaF )
+{
+   this->omegaC = omegaC;
+   this->omegaF = omegaF;
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::setOffsets(LBMReal xoff, LBMReal yoff, LBMReal zoff)
+{
+   this->xoff = xoff;
+   this->yoff = yoff;
+   this->zoff = zoff;     
+   this->xoff_sq = xoff * xoff;
+   this->yoff_sq = yoff * yoff;
+   this->zoff_sq = zoff * zoff;
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF, LBMReal xoff, LBMReal yoff, LBMReal zoff)
+{
+   setOffsets(xoff, yoff, zoff);
+   calcInterpolatedCoefficiets(icellC, omegaC, 0.5);
+   calcInterpolatedNode(icellF.BSW, omegaF, -0.25, -0.25, -0.25, calcPressBSW(), -1, -1, -1);
+   calcInterpolatedNode(icellF.BNE, omegaF,  0.25,  0.25, -0.25, calcPressBNE(),  1,  1, -1);
+   calcInterpolatedNode(icellF.TNW, omegaF, -0.25,  0.25,  0.25, calcPressTNW(), -1,  1,  1);
+   calcInterpolatedNode(icellF.TSE, omegaF,  0.25, -0.25,  0.25, calcPressTSE(),  1, -1,  1);
+   calcInterpolatedNode(icellF.BNW, omegaF, -0.25,  0.25, -0.25, calcPressBNW(), -1,  1, -1);
+   calcInterpolatedNode(icellF.BSE, omegaF,  0.25, -0.25, -0.25, calcPressBSE(),  1, -1, -1);
+   calcInterpolatedNode(icellF.TSW, omegaF, -0.25, -0.25,  0.25, calcPressTSW(), -1, -1,  1);
+   calcInterpolatedNode(icellF.TNE, omegaF,  0.25,  0.25,  0.25, calcPressTNE(),  1,  1,  1);
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC, LBMReal xoff, LBMReal yoff, LBMReal zoff)
+{
+   setOffsets(xoff, yoff, zoff);
+   calcInterpolatedCoefficiets(icellF, omegaF, 2.0);
+   calcInterpolatedNodeFC(icellC, omegaC);
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::calcMoments(const LBMReal* const f, LBMReal omega, LBMReal& press, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3, 
+                                                    LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz)
+{
+   using namespace D3Q27System;
+
+   LBMReal drho = 0.0;
+   D3Q27System::calcCompMacroscopicValues(f,drho,vx1,vx2,vx3);
+   
+   press = drho; //interpolate rho!
+
+   kxy   = -3.*omega*((((f[TSW]+f[BNE])-(f[TNW]+f[BSE]))+((f[BSW]+f[TNE])-(f[BNW]+f[TSE])))+((f[SW]+f[NE])-(f[NW]+f[SE]))/(one + drho)-(vx1*vx2));// might not be optimal MG 25.2.13
+   kyz   = -3.*omega*((((f[BSW]+f[TNE])-(f[TSE]+f[BNW]))+((f[BSE]+f[TNW])-(f[TSW]+f[BNE])))+((f[BS]+f[TN])-(f[TS]+f[BN]))/(one + drho)-(vx2*vx3));
+   kxz   = -3.*omega*((((f[BNW]+f[TSE])-(f[TSW]+f[BNE]))+((f[BSW]+f[TNE])-(f[BSE]+f[TNW])))+((f[BW]+f[TE])-(f[TW]+f[BE]))/(one + drho)-(vx1*vx3));
+   kxxMyy = -3./2.*omega*((((f[BW]+f[TE])-(f[BS]+f[TN]))+((f[TW]+f[BE])-(f[TS]+f[BN])))+((f[W]+f[E])-(f[S]+f[N]))/(one + drho)-(vx1*vx1-vx2*vx2));
+   kxxMzz = -3./2.*omega*((((f[NW]+f[SE])-(f[BS]+f[TN]))+((f[SW]+f[NE])-(f[TS]+f[BN])))+((f[W]+f[E])-(f[B]+f[T]))/(one + drho)-(vx1*vx1-vx3*vx3));
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::calcInterpolatedCoefficiets(const D3Q27ICell& icell, LBMReal omega, LBMReal eps_new)
+{
+   LBMReal        vx1_SWT,vx2_SWT,vx3_SWT;
+   LBMReal        vx1_NWT,vx2_NWT,vx3_NWT;
+   LBMReal        vx1_NET,vx2_NET,vx3_NET;
+   LBMReal        vx1_SET,vx2_SET,vx3_SET;
+   LBMReal        vx1_SWB,vx2_SWB,vx3_SWB;
+   LBMReal        vx1_NWB,vx2_NWB,vx3_NWB;
+   LBMReal        vx1_NEB,vx2_NEB,vx3_NEB;
+   LBMReal        vx1_SEB,vx2_SEB,vx3_SEB;
+
+   LBMReal        kxyFromfcNEQ_SWT, kyzFromfcNEQ_SWT, kxzFromfcNEQ_SWT, kxxMyyFromfcNEQ_SWT, kxxMzzFromfcNEQ_SWT;
+   LBMReal        kxyFromfcNEQ_NWT, kyzFromfcNEQ_NWT, kxzFromfcNEQ_NWT, kxxMyyFromfcNEQ_NWT, kxxMzzFromfcNEQ_NWT;
+   LBMReal        kxyFromfcNEQ_NET, kyzFromfcNEQ_NET, kxzFromfcNEQ_NET, kxxMyyFromfcNEQ_NET, kxxMzzFromfcNEQ_NET;
+   LBMReal        kxyFromfcNEQ_SET, kyzFromfcNEQ_SET, kxzFromfcNEQ_SET, kxxMyyFromfcNEQ_SET, kxxMzzFromfcNEQ_SET;
+   LBMReal        kxyFromfcNEQ_SWB, kyzFromfcNEQ_SWB, kxzFromfcNEQ_SWB, kxxMyyFromfcNEQ_SWB, kxxMzzFromfcNEQ_SWB;
+   LBMReal        kxyFromfcNEQ_NWB, kyzFromfcNEQ_NWB, kxzFromfcNEQ_NWB, kxxMyyFromfcNEQ_NWB, kxxMzzFromfcNEQ_NWB;
+   LBMReal        kxyFromfcNEQ_NEB, kyzFromfcNEQ_NEB, kxzFromfcNEQ_NEB, kxxMyyFromfcNEQ_NEB, kxxMzzFromfcNEQ_NEB;
+   LBMReal        kxyFromfcNEQ_SEB, kyzFromfcNEQ_SEB, kxzFromfcNEQ_SEB, kxxMyyFromfcNEQ_SEB, kxxMzzFromfcNEQ_SEB;
+
+   calcMoments(icell.TSW,omega,press_SWT,vx1_SWT,vx2_SWT,vx3_SWT, kxyFromfcNEQ_SWT, kyzFromfcNEQ_SWT, kxzFromfcNEQ_SWT, kxxMyyFromfcNEQ_SWT, kxxMzzFromfcNEQ_SWT);
+   calcMoments(icell.TNW,omega,press_NWT,vx1_NWT,vx2_NWT,vx3_NWT, kxyFromfcNEQ_NWT, kyzFromfcNEQ_NWT, kxzFromfcNEQ_NWT, kxxMyyFromfcNEQ_NWT, kxxMzzFromfcNEQ_NWT);
+   calcMoments(icell.TNE,omega,press_NET,vx1_NET,vx2_NET,vx3_NET, kxyFromfcNEQ_NET, kyzFromfcNEQ_NET, kxzFromfcNEQ_NET, kxxMyyFromfcNEQ_NET, kxxMzzFromfcNEQ_NET);
+   calcMoments(icell.TSE,omega,press_SET,vx1_SET,vx2_SET,vx3_SET, kxyFromfcNEQ_SET, kyzFromfcNEQ_SET, kxzFromfcNEQ_SET, kxxMyyFromfcNEQ_SET, kxxMzzFromfcNEQ_SET);
+   calcMoments(icell.BSW,omega,press_SWB,vx1_SWB,vx2_SWB,vx3_SWB, kxyFromfcNEQ_SWB, kyzFromfcNEQ_SWB, kxzFromfcNEQ_SWB, kxxMyyFromfcNEQ_SWB, kxxMzzFromfcNEQ_SWB);
+   calcMoments(icell.BNW,omega,press_NWB,vx1_NWB,vx2_NWB,vx3_NWB, kxyFromfcNEQ_NWB, kyzFromfcNEQ_NWB, kxzFromfcNEQ_NWB, kxxMyyFromfcNEQ_NWB, kxxMzzFromfcNEQ_NWB);
+   calcMoments(icell.BNE,omega,press_NEB,vx1_NEB,vx2_NEB,vx3_NEB, kxyFromfcNEQ_NEB, kyzFromfcNEQ_NEB, kxzFromfcNEQ_NEB, kxxMyyFromfcNEQ_NEB, kxxMzzFromfcNEQ_NEB);
+   calcMoments(icell.BSE,omega,press_SEB,vx1_SEB,vx2_SEB,vx3_SEB, kxyFromfcNEQ_SEB, kyzFromfcNEQ_SEB, kxzFromfcNEQ_SEB, kxxMyyFromfcNEQ_SEB, kxxMzzFromfcNEQ_SEB);
+
+   //LBMReal dxRho=c1o4*((press_NET-press_SWB)+(press_SET-press_NWB)+(press_NEB-press_SWT)+(press_SEB-press_NWT));
+   //LBMReal dyRho=c1o4*((press_NET-press_SWB)-(press_SET-press_NWB)+(press_NEB-press_SWT)-(press_SEB-press_NWT));
+   //LBMReal dzRho=c1o4*((press_NET-press_SWB)+(press_SET-press_NWB)-(press_NEB-press_SWT)-(press_SEB-press_NWT));
+
+   //   kxyFromfcNEQ_SWT+=vx1_SWT*dyRho+vx2_SWT*dxRho;
+   //   kxyFromfcNEQ_NWT+=vx1_NWT*dyRho+vx2_NWT*dxRho;
+   //   kxyFromfcNEQ_NET+=vx1_NET*dyRho+vx2_NET*dxRho;
+   //   kxyFromfcNEQ_SET+=vx1_SET*dyRho+vx2_SET*dxRho;
+   //   kxyFromfcNEQ_SWB+=vx1_SWB*dyRho+vx2_SWB*dxRho;
+   //   kxyFromfcNEQ_NWB+=vx1_NWB*dyRho+vx2_NWB*dxRho;
+   //   kxyFromfcNEQ_NEB+=vx1_NEB*dyRho+vx2_NEB*dxRho;
+   //   kxyFromfcNEQ_SEB+=vx1_SEB*dyRho+vx2_SEB*dxRho;
+
+   //   kyzFromfcNEQ_SWT+=vx3_SWT*dyRho+vx2_SWT*dzRho;
+   //   kyzFromfcNEQ_NWT+=vx3_NWT*dyRho+vx2_NWT*dzRho;
+   //   kyzFromfcNEQ_NET+=vx3_NET*dyRho+vx2_NET*dzRho;
+   //   kyzFromfcNEQ_SET+=vx3_SET*dyRho+vx2_SET*dzRho;
+   //   kyzFromfcNEQ_SWB+=vx3_SWB*dyRho+vx2_SWB*dzRho;
+   //   kyzFromfcNEQ_NWB+=vx3_NWB*dyRho+vx2_NWB*dzRho;
+   //   kyzFromfcNEQ_NEB+=vx3_NEB*dyRho+vx2_NEB*dzRho;
+   //   kyzFromfcNEQ_SEB+=vx3_SEB*dyRho+vx2_SEB*dzRho;
+
+   //   kxzFromfcNEQ_SWT+=vx1_SWT*dzRho+vx3_SWT*dxRho;
+   //   kxzFromfcNEQ_NWT+=vx1_NWT*dzRho+vx3_NWT*dxRho;
+   //   kxzFromfcNEQ_NET+=vx1_NET*dzRho+vx3_NET*dxRho;
+   //   kxzFromfcNEQ_SET+=vx1_SET*dzRho+vx3_SET*dxRho;
+   //   kxzFromfcNEQ_SWB+=vx1_SWB*dzRho+vx3_SWB*dxRho;
+   //   kxzFromfcNEQ_NWB+=vx1_NWB*dzRho+vx3_NWB*dxRho;
+   //   kxzFromfcNEQ_NEB+=vx1_NEB*dzRho+vx3_NEB*dxRho;
+   //   kxzFromfcNEQ_SEB+=vx1_SEB*dzRho+vx3_SEB*dxRho;
+
+   //   kxxMyyFromfcNEQ_SWT+=vx1_SWT*dxRho-vx2_SWT*dyRho;
+   //   kxxMyyFromfcNEQ_NWT+=vx1_NWT*dxRho-vx2_NWT*dyRho;
+   //   kxxMyyFromfcNEQ_NET+=vx1_NET*dxRho-vx2_NET*dyRho;
+   //   kxxMyyFromfcNEQ_SET+=vx1_SET*dxRho-vx2_SET*dyRho;
+   //   kxxMyyFromfcNEQ_SWB+=vx1_SWB*dxRho-vx2_SWB*dyRho;
+   //   kxxMyyFromfcNEQ_NWB+=vx1_NWB*dxRho-vx2_NWB*dyRho;
+   //   kxxMyyFromfcNEQ_NEB+=vx1_NEB*dxRho-vx2_NEB*dyRho;
+   //   kxxMyyFromfcNEQ_SEB+=vx1_SEB*dxRho-vx2_SEB*dyRho;
+
+   //   kxxMzzFromfcNEQ_SWT+=vx1_SWT*dxRho-vx3_SWT*dzRho;
+   //   kxxMzzFromfcNEQ_NWT+=vx1_NWT*dxRho-vx3_NWT*dzRho;
+   //   kxxMzzFromfcNEQ_NET+=vx1_NET*dxRho-vx3_NET*dzRho;
+   //   kxxMzzFromfcNEQ_SET+=vx1_SET*dxRho-vx3_SET*dzRho;
+   //   kxxMzzFromfcNEQ_SWB+=vx1_SWB*dxRho-vx3_SWB*dzRho;
+   //   kxxMzzFromfcNEQ_NWB+=vx1_NWB*dxRho-vx3_NWB*dzRho;
+   //   kxxMzzFromfcNEQ_NEB+=vx1_NEB*dxRho-vx3_NEB*dzRho;
+   //   kxxMzzFromfcNEQ_SEB+=vx1_SEB*dxRho-vx3_SEB*dzRho;
+
+
+      //kxxMzzFromfcNEQ_SWT=0.0;
+      //kxxMzzFromfcNEQ_NWT=0.0;
+      //kxxMzzFromfcNEQ_NET=0.0;
+      //kxxMzzFromfcNEQ_SET=0.0;
+      //kxxMzzFromfcNEQ_SWB=0.0;
+      //kxxMzzFromfcNEQ_NWB=0.0;
+      //kxxMzzFromfcNEQ_NEB=0.0;
+      //kxxMzzFromfcNEQ_SEB=0.0;
+
+
+
+
+
+   a0 = (-kxxMyyFromfcNEQ_NEB - kxxMyyFromfcNEQ_NET + kxxMyyFromfcNEQ_NWB + kxxMyyFromfcNEQ_NWT -
+      kxxMyyFromfcNEQ_SEB - kxxMyyFromfcNEQ_SET + kxxMyyFromfcNEQ_SWB + kxxMyyFromfcNEQ_SWT -
+      kxxMzzFromfcNEQ_NEB - kxxMzzFromfcNEQ_NET + kxxMzzFromfcNEQ_NWB + kxxMzzFromfcNEQ_NWT -
+      kxxMzzFromfcNEQ_SEB - kxxMzzFromfcNEQ_SET + kxxMzzFromfcNEQ_SWB + kxxMzzFromfcNEQ_SWT -
+      2.*kxyFromfcNEQ_NEB - 2.*kxyFromfcNEQ_NET - 2.*kxyFromfcNEQ_NWB - 2.*kxyFromfcNEQ_NWT +
+      2.*kxyFromfcNEQ_SEB + 2.*kxyFromfcNEQ_SET + 2.*kxyFromfcNEQ_SWB + 2.*kxyFromfcNEQ_SWT +
+      2.*kxzFromfcNEQ_NEB - 2.*kxzFromfcNEQ_NET + 2.*kxzFromfcNEQ_NWB - 2.*kxzFromfcNEQ_NWT +
+      2.*kxzFromfcNEQ_SEB - 2.*kxzFromfcNEQ_SET + 2.*kxzFromfcNEQ_SWB - 2.*kxzFromfcNEQ_SWT +
+      8.*vx1_NEB + 8.*vx1_NET + 8.*vx1_NWB + 8.*vx1_NWT + 8.*vx1_SEB +
+      8.*vx1_SET + 8.*vx1_SWB + 8.*vx1_SWT + 2.*vx2_NEB + 2.*vx2_NET -
+      2.*vx2_NWB - 2.*vx2_NWT - 2.*vx2_SEB - 2.*vx2_SET + 2.*vx2_SWB +
+      2.*vx2_SWT - 2.*vx3_NEB + 2.*vx3_NET + 2.*vx3_NWB - 2.*vx3_NWT -
+      2.*vx3_SEB + 2.*vx3_SET + 2.*vx3_SWB - 2.*vx3_SWT)/64.;
+   b0 = (2.*kxxMyyFromfcNEQ_NEB + 2.*kxxMyyFromfcNEQ_NET + 2.*kxxMyyFromfcNEQ_NWB + 2.*kxxMyyFromfcNEQ_NWT -
+      2.*kxxMyyFromfcNEQ_SEB - 2.*kxxMyyFromfcNEQ_SET - 2.*kxxMyyFromfcNEQ_SWB - 2.*kxxMyyFromfcNEQ_SWT -
+      kxxMzzFromfcNEQ_NEB - kxxMzzFromfcNEQ_NET - kxxMzzFromfcNEQ_NWB - kxxMzzFromfcNEQ_NWT +
+      kxxMzzFromfcNEQ_SEB + kxxMzzFromfcNEQ_SET + kxxMzzFromfcNEQ_SWB + kxxMzzFromfcNEQ_SWT -
+      2.*kxyFromfcNEQ_NEB - 2.*kxyFromfcNEQ_NET + 2.*kxyFromfcNEQ_NWB + 2.*kxyFromfcNEQ_NWT -
+      2.*kxyFromfcNEQ_SEB - 2.*kxyFromfcNEQ_SET + 2.*kxyFromfcNEQ_SWB + 2.*kxyFromfcNEQ_SWT +
+      2.*kyzFromfcNEQ_NEB - 2.*kyzFromfcNEQ_NET + 2.*kyzFromfcNEQ_NWB - 2.*kyzFromfcNEQ_NWT +
+      2.*kyzFromfcNEQ_SEB - 2.*kyzFromfcNEQ_SET + 2.*kyzFromfcNEQ_SWB - 2.*kyzFromfcNEQ_SWT +
+      2.*vx1_NEB + 2.*vx1_NET - 2.*vx1_NWB - 2.*vx1_NWT -
+      2.*vx1_SEB - 2.*vx1_SET + 2.*vx1_SWB + 2.*vx1_SWT +
+      8.*vx2_NEB + 8.*vx2_NET + 8.*vx2_NWB + 8.*vx2_NWT +
+      8.*vx2_SEB + 8.*vx2_SET + 8.*vx2_SWB + 8.*vx2_SWT -
+      2.*vx3_NEB + 2.*vx3_NET - 2.*vx3_NWB + 2.*vx3_NWT +
+      2.*vx3_SEB - 2.*vx3_SET + 2.*vx3_SWB - 2.*vx3_SWT)/64.;
+   c0 = (kxxMyyFromfcNEQ_NEB - kxxMyyFromfcNEQ_NET + kxxMyyFromfcNEQ_NWB - kxxMyyFromfcNEQ_NWT +
+      kxxMyyFromfcNEQ_SEB - kxxMyyFromfcNEQ_SET + kxxMyyFromfcNEQ_SWB - kxxMyyFromfcNEQ_SWT -
+      2.*kxxMzzFromfcNEQ_NEB + 2.*kxxMzzFromfcNEQ_NET - 2.*kxxMzzFromfcNEQ_NWB + 2.*kxxMzzFromfcNEQ_NWT -
+      2.*kxxMzzFromfcNEQ_SEB + 2.*kxxMzzFromfcNEQ_SET - 2.*kxxMzzFromfcNEQ_SWB + 2.*kxxMzzFromfcNEQ_SWT -
+      2.*kxzFromfcNEQ_NEB - 2.*kxzFromfcNEQ_NET + 2.*kxzFromfcNEQ_NWB + 2.*kxzFromfcNEQ_NWT -
+      2.*kxzFromfcNEQ_SEB - 2.*kxzFromfcNEQ_SET + 2.*kxzFromfcNEQ_SWB + 2.*kxzFromfcNEQ_SWT -
+      2.*kyzFromfcNEQ_NEB - 2.*kyzFromfcNEQ_NET - 2.*kyzFromfcNEQ_NWB - 2.*kyzFromfcNEQ_NWT +
+      2.*kyzFromfcNEQ_SEB + 2.*kyzFromfcNEQ_SET + 2.*kyzFromfcNEQ_SWB + 2.*kyzFromfcNEQ_SWT -
+      2.*vx1_NEB + 2.*vx1_NET + 2.*vx1_NWB - 2.*vx1_NWT -
+      2.*vx1_SEB + 2.*vx1_SET + 2.*vx1_SWB - 2.*vx1_SWT -
+      2.*vx2_NEB + 2.*vx2_NET - 2.*vx2_NWB + 2.*vx2_NWT +
+      2.*vx2_SEB - 2.*vx2_SET + 2.*vx2_SWB - 2.*vx2_SWT +
+      8.*vx3_NEB + 8.*vx3_NET + 8.*vx3_NWB + 8.*vx3_NWT +
+      8.*vx3_SEB + 8.*vx3_SET + 8.*vx3_SWB + 8.*vx3_SWT)/64.;
+   ax = (vx1_NEB + vx1_NET - vx1_NWB - vx1_NWT + vx1_SEB + vx1_SET - vx1_SWB - vx1_SWT)/4.;
+   bx = (vx2_NEB + vx2_NET - vx2_NWB - vx2_NWT + vx2_SEB + vx2_SET - vx2_SWB - vx2_SWT)/4.;
+   cx = (vx3_NEB + vx3_NET - vx3_NWB - vx3_NWT + vx3_SEB + vx3_SET - vx3_SWB - vx3_SWT)/4.;
+   axx= (kxxMyyFromfcNEQ_NEB + kxxMyyFromfcNEQ_NET - kxxMyyFromfcNEQ_NWB - kxxMyyFromfcNEQ_NWT +
+      kxxMyyFromfcNEQ_SEB + kxxMyyFromfcNEQ_SET - kxxMyyFromfcNEQ_SWB - kxxMyyFromfcNEQ_SWT +
+      kxxMzzFromfcNEQ_NEB + kxxMzzFromfcNEQ_NET - kxxMzzFromfcNEQ_NWB - kxxMzzFromfcNEQ_NWT +
+      kxxMzzFromfcNEQ_SEB + kxxMzzFromfcNEQ_SET - kxxMzzFromfcNEQ_SWB - kxxMzzFromfcNEQ_SWT +
+      2.*vx2_NEB + 2.*vx2_NET - 2.*vx2_NWB - 2.*vx2_NWT -
+      2.*vx2_SEB - 2.*vx2_SET + 2.*vx2_SWB + 2.*vx2_SWT -
+      2.*vx3_NEB + 2.*vx3_NET + 2.*vx3_NWB - 2.*vx3_NWT -
+      2.*vx3_SEB + 2.*vx3_SET + 2.*vx3_SWB - 2.*vx3_SWT)/16.;
+   bxx= (kxyFromfcNEQ_NEB + kxyFromfcNEQ_NET - kxyFromfcNEQ_NWB - kxyFromfcNEQ_NWT +
+      kxyFromfcNEQ_SEB + kxyFromfcNEQ_SET - kxyFromfcNEQ_SWB - kxyFromfcNEQ_SWT -
+      2.*vx1_NEB - 2.*vx1_NET + 2.*vx1_NWB + 2.*vx1_NWT +
+      2.*vx1_SEB + 2.*vx1_SET - 2.*vx1_SWB - 2.*vx1_SWT)/8.;
+   cxx= (kxzFromfcNEQ_NEB + kxzFromfcNEQ_NET - kxzFromfcNEQ_NWB - kxzFromfcNEQ_NWT +
+      kxzFromfcNEQ_SEB + kxzFromfcNEQ_SET - kxzFromfcNEQ_SWB - kxzFromfcNEQ_SWT +
+      2.*vx1_NEB - 2.*vx1_NET - 2.*vx1_NWB + 2.*vx1_NWT +
+      2.*vx1_SEB - 2.*vx1_SET - 2.*vx1_SWB + 2.*vx1_SWT)/8.;
+   ay = (vx1_NEB + vx1_NET + vx1_NWB + vx1_NWT - vx1_SEB - vx1_SET - vx1_SWB - vx1_SWT)/4.;
+   by = (vx2_NEB + vx2_NET + vx2_NWB + vx2_NWT - vx2_SEB - vx2_SET - vx2_SWB - vx2_SWT)/4.;
+   cy = (vx3_NEB + vx3_NET + vx3_NWB + vx3_NWT - vx3_SEB - vx3_SET - vx3_SWB - vx3_SWT)/4.;
+   ayy= (kxyFromfcNEQ_NEB + kxyFromfcNEQ_NET + kxyFromfcNEQ_NWB + kxyFromfcNEQ_NWT -
+      kxyFromfcNEQ_SEB - kxyFromfcNEQ_SET - kxyFromfcNEQ_SWB - kxyFromfcNEQ_SWT -
+      2.*vx2_NEB - 2.*vx2_NET + 2.*vx2_NWB + 2.*vx2_NWT +
+      2.*vx2_SEB + 2.*vx2_SET - 2.*vx2_SWB - 2.*vx2_SWT)/8.;
+   byy= (-2.*kxxMyyFromfcNEQ_NEB - 2.*kxxMyyFromfcNEQ_NET - 2.*kxxMyyFromfcNEQ_NWB - 2.*kxxMyyFromfcNEQ_NWT +
+      2.*kxxMyyFromfcNEQ_SEB + 2.*kxxMyyFromfcNEQ_SET + 2.*kxxMyyFromfcNEQ_SWB + 2.*kxxMyyFromfcNEQ_SWT +
+      kxxMzzFromfcNEQ_NEB + kxxMzzFromfcNEQ_NET + kxxMzzFromfcNEQ_NWB + kxxMzzFromfcNEQ_NWT -
+      kxxMzzFromfcNEQ_SEB - kxxMzzFromfcNEQ_SET - kxxMzzFromfcNEQ_SWB - kxxMzzFromfcNEQ_SWT +
+      2.*vx1_NEB + 2.*vx1_NET - 2.*vx1_NWB - 2.*vx1_NWT -
+      2.*vx1_SEB - 2.*vx1_SET + 2.*vx1_SWB + 2.*vx1_SWT -
+      2.*vx3_NEB + 2.*vx3_NET - 2.*vx3_NWB + 2.*vx3_NWT +
+      2.*vx3_SEB - 2.*vx3_SET + 2.*vx3_SWB - 2.*vx3_SWT)/16.;
+   cyy= (kyzFromfcNEQ_NEB + kyzFromfcNEQ_NET + kyzFromfcNEQ_NWB + kyzFromfcNEQ_NWT -
+      kyzFromfcNEQ_SEB - kyzFromfcNEQ_SET - kyzFromfcNEQ_SWB - kyzFromfcNEQ_SWT +
+      2.*vx2_NEB - 2.*vx2_NET + 2.*vx2_NWB - 2.*vx2_NWT -
+      2.*vx2_SEB + 2.*vx2_SET - 2.*vx2_SWB + 2.*vx2_SWT)/8.;
+   az = (-vx1_NEB + vx1_NET - vx1_NWB + vx1_NWT - vx1_SEB + vx1_SET - vx1_SWB + vx1_SWT)/4.;
+   bz = (-vx2_NEB + vx2_NET - vx2_NWB + vx2_NWT - vx2_SEB + vx2_SET - vx2_SWB + vx2_SWT)/4.;
+   cz = (-vx3_NEB + vx3_NET - vx3_NWB + vx3_NWT - vx3_SEB + vx3_SET - vx3_SWB + vx3_SWT)/4.;
+   azz= (-kxzFromfcNEQ_NEB + kxzFromfcNEQ_NET - kxzFromfcNEQ_NWB + kxzFromfcNEQ_NWT -
+      kxzFromfcNEQ_SEB + kxzFromfcNEQ_SET - kxzFromfcNEQ_SWB + kxzFromfcNEQ_SWT +
+      2.*vx3_NEB - 2.*vx3_NET - 2.*vx3_NWB + 2.*vx3_NWT +
+      2.*vx3_SEB - 2.*vx3_SET - 2.*vx3_SWB + 2.*vx3_SWT)/8.;
+   bzz= (-kyzFromfcNEQ_NEB + kyzFromfcNEQ_NET - kyzFromfcNEQ_NWB + kyzFromfcNEQ_NWT -
+      kyzFromfcNEQ_SEB + kyzFromfcNEQ_SET - kyzFromfcNEQ_SWB + kyzFromfcNEQ_SWT +
+      2.*vx3_NEB - 2.*vx3_NET + 2.*vx3_NWB - 2.*vx3_NWT -
+      2.*vx3_SEB + 2.*vx3_SET - 2.*vx3_SWB + 2.*vx3_SWT)/8.;
+   czz= (-kxxMyyFromfcNEQ_NEB + kxxMyyFromfcNEQ_NET - kxxMyyFromfcNEQ_NWB + kxxMyyFromfcNEQ_NWT -
+      kxxMyyFromfcNEQ_SEB + kxxMyyFromfcNEQ_SET - kxxMyyFromfcNEQ_SWB + kxxMyyFromfcNEQ_SWT +
+      2.*kxxMzzFromfcNEQ_NEB - 2.*kxxMzzFromfcNEQ_NET + 2.*kxxMzzFromfcNEQ_NWB - 2.*kxxMzzFromfcNEQ_NWT +
+      2.*kxxMzzFromfcNEQ_SEB - 2.*kxxMzzFromfcNEQ_SET + 2.*kxxMzzFromfcNEQ_SWB - 2.*kxxMzzFromfcNEQ_SWT -
+      2.*vx1_NEB + 2.*vx1_NET + 2.*vx1_NWB - 2.*vx1_NWT -
+      2.*vx1_SEB + 2.*vx1_SET + 2.*vx1_SWB - 2.*vx1_SWT -
+      2.*vx2_NEB + 2.*vx2_NET - 2.*vx2_NWB + 2.*vx2_NWT +
+      2.*vx2_SEB - 2.*vx2_SET + 2.*vx2_SWB - 2.*vx2_SWT)/16.;
+   axy= (vx1_NEB + vx1_NET - vx1_NWB - vx1_NWT - vx1_SEB - vx1_SET + vx1_SWB + vx1_SWT)/2.;
+   bxy= (vx2_NEB + vx2_NET - vx2_NWB - vx2_NWT - vx2_SEB - vx2_SET + vx2_SWB + vx2_SWT)/2.;
+   cxy= (vx3_NEB + vx3_NET - vx3_NWB - vx3_NWT - vx3_SEB - vx3_SET + vx3_SWB + vx3_SWT)/2.;
+   axz= (-vx1_NEB + vx1_NET + vx1_NWB - vx1_NWT - vx1_SEB + vx1_SET + vx1_SWB - vx1_SWT)/2.;
+   bxz= (-vx2_NEB + vx2_NET + vx2_NWB - vx2_NWT - vx2_SEB + vx2_SET + vx2_SWB - vx2_SWT)/2.;
+   cxz= (-vx3_NEB + vx3_NET + vx3_NWB - vx3_NWT - vx3_SEB + vx3_SET + vx3_SWB - vx3_SWT)/2.;
+   ayz= (-vx1_NEB + vx1_NET - vx1_NWB + vx1_NWT + vx1_SEB - vx1_SET + vx1_SWB - vx1_SWT)/2.;
+   byz= (-vx2_NEB + vx2_NET - vx2_NWB + vx2_NWT + vx2_SEB - vx2_SET + vx2_SWB - vx2_SWT)/2.;
+   cyz= (-vx3_NEB + vx3_NET - vx3_NWB + vx3_NWT + vx3_SEB - vx3_SET + vx3_SWB - vx3_SWT)/2.;
+   axyz=-vx1_NEB + vx1_NET + vx1_NWB - vx1_NWT + vx1_SEB - vx1_SET - vx1_SWB + vx1_SWT;
+   bxyz=-vx2_NEB + vx2_NET + vx2_NWB - vx2_NWT + vx2_SEB - vx2_SET - vx2_SWB + vx2_SWT;
+   cxyz=-vx3_NEB + vx3_NET + vx3_NWB - vx3_NWT + vx3_SEB - vx3_SET - vx3_SWB + vx3_SWT;
+
+
+   //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+   kxyAverage       =(kxyFromfcNEQ_SWB+
+                      kxyFromfcNEQ_SWT+
+                      kxyFromfcNEQ_SET+
+                      kxyFromfcNEQ_SEB+
+                      kxyFromfcNEQ_NWB+
+                      kxyFromfcNEQ_NWT+
+                      kxyFromfcNEQ_NET+
+                      kxyFromfcNEQ_NEB)*c1o8-(ay+bx);
+   kyzAverage       =(kyzFromfcNEQ_SWB+
+                      kyzFromfcNEQ_SWT+
+                      kyzFromfcNEQ_SET+
+                      kyzFromfcNEQ_SEB+
+                      kyzFromfcNEQ_NWB+
+                      kyzFromfcNEQ_NWT+
+                      kyzFromfcNEQ_NET+
+                      kyzFromfcNEQ_NEB)*c1o8-(bz+cy);
+   kxzAverage       =(kxzFromfcNEQ_SWB+
+                      kxzFromfcNEQ_SWT+
+                      kxzFromfcNEQ_SET+
+                      kxzFromfcNEQ_SEB+
+                      kxzFromfcNEQ_NWB+
+                      kxzFromfcNEQ_NWT+
+                      kxzFromfcNEQ_NET+
+                      kxzFromfcNEQ_NEB)*c1o8-(az+cx);
+   kxxMyyAverage    =(kxxMyyFromfcNEQ_SWB+
+                      kxxMyyFromfcNEQ_SWT+
+                      kxxMyyFromfcNEQ_SET+
+                      kxxMyyFromfcNEQ_SEB+
+                      kxxMyyFromfcNEQ_NWB+
+                      kxxMyyFromfcNEQ_NWT+
+                      kxxMyyFromfcNEQ_NET+
+                      kxxMyyFromfcNEQ_NEB)*c1o8-(ax-by);
+   kxxMzzAverage    =(kxxMzzFromfcNEQ_SWB+
+                     kxxMzzFromfcNEQ_SWT+
+                     kxxMzzFromfcNEQ_SET+
+                     kxxMzzFromfcNEQ_SEB+
+                     kxxMzzFromfcNEQ_NWB+
+                     kxxMzzFromfcNEQ_NWT+
+                     kxxMzzFromfcNEQ_NET+
+                     kxxMzzFromfcNEQ_NEB)*c1o8-(ax-cz);
+   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+   //
+   // Bernd das Brot
+   //
+   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+   a0 = a0 + xoff * ax + yoff * ay + zoff * az + xoff_sq * axx + yoff_sq * ayy + zoff_sq * azz + xoff*yoff*axy + xoff*zoff*axz + yoff*zoff*ayz + xoff*yoff*zoff*axyz ;
+   ax = ax + 2. * xoff * axx + yoff * axy + zoff * axz + yoff*zoff*axyz;
+   ay = ay + 2. * yoff * ayy + xoff * axy + zoff * ayz + xoff*zoff*axyz;
+   az = az + 2. * zoff * azz + xoff * axz + yoff * ayz + xoff*yoff*axyz;
+   b0 = b0 + xoff * bx + yoff * by + zoff * bz + xoff_sq * bxx + yoff_sq * byy + zoff_sq * bzz + xoff*yoff*bxy + xoff*zoff*bxz + yoff*zoff*byz + xoff*yoff*zoff*bxyz;
+   bx = bx + 2. * xoff * bxx + yoff * bxy + zoff * bxz + yoff*zoff*bxyz;
+   by = by + 2. * yoff * byy + xoff * bxy + zoff * byz + xoff*zoff*bxyz;
+   bz = bz + 2. * zoff * bzz + xoff * bxz + yoff * byz + xoff*yoff*bxyz;
+   c0 = c0 + xoff * cx + yoff * cy + zoff * cz + xoff_sq * cxx + yoff_sq * cyy + zoff_sq * czz + xoff*yoff*cxy + xoff*zoff*cxz + yoff*zoff*cyz + xoff*yoff*zoff*cxyz;
+   cx = cx + 2. * xoff * cxx + yoff * cxy + zoff * cxz + yoff*zoff*cxyz;
+   cy = cy + 2. * yoff * cyy + xoff * cxy + zoff * cyz + xoff*zoff*cxyz;
+   cz = cz + 2. * zoff * czz + xoff * cxz + yoff * cyz + xoff*yoff*cxyz;
+   axy= axy + zoff*axyz;
+   axz= axz + yoff*axyz;
+   ayz= ayz + xoff*axyz;
+   bxy= bxy + zoff*bxyz;
+   bxz= bxz + yoff*bxyz;
+   byz= byz + xoff*bxyz;
+   cxy= cxy + zoff*cxyz;
+   cxz= cxz + yoff*cxyz;
+   cyz= cyz + xoff*cxyz;
+   ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+   const LBMReal o = omega;
+
+   f_E = eps_new*((2*(-2*ax + by + cz-kxxMzzAverage-kxxMyyAverage))/(27.*o));
+   f_N = eps_new*((2*(ax - 2*by + cz+2*kxxMyyAverage-kxxMzzAverage))/(27.*o));
+   f_T = eps_new*((2*(ax + by - 2*cz-kxxMyyAverage+2*kxxMzzAverage))/(27.*o));
+   f_NE = eps_new*(-(ax + 3*ay + 3*bx + by - 2*cz+2*kxxMyyAverage-kxxMyyAverage+3*kxyAverage)/(54.*o));
+   f_SE = eps_new*(-(ax - 3*ay - 3*bx + by - 2*cz+2*kxxMyyAverage-kxxMyyAverage-3*kxyAverage)/(54.*o));
+   f_TE = eps_new*(-(ax + 3*az - 2*by + 3*cx + cz+2*kxxMyyAverage-kxxMzzAverage+3*kxzAverage)/(54.*o));
+   f_BE = eps_new*(-(ax - 3*az - 2*by - 3*cx + cz+2*kxxMyyAverage-kxxMzzAverage-3*kxzAverage)/(54.*o));
+   f_TN = eps_new*(-(-2*ax + by + 3*bz + 3*cy + cz-kxxMyyAverage-kxxMzzAverage+3*kyzAverage)/(54.*o));
+   f_BN = eps_new*(-(-2*ax + by - 3*bz - 3*cy + cz-kxxMyyAverage-kxxMzzAverage-3*kyzAverage)/(54.*o));
+   f_ZERO = 0.;
+   f_TNE = eps_new*(-(ay + az + bx + bz + cx + cy+kxyAverage+kxzAverage+kyzAverage)/(72.*o));
+   f_TSW = eps_new*((-ay + az - bx + bz + cx + cy-kxyAverage+kxzAverage+kyzAverage)/(72.*o));
+   f_TSE = eps_new*((ay - az + bx + bz - cx + cy+kxyAverage-kxzAverage+kyzAverage)/(72.*o));
+   f_TNW = eps_new*((ay + az + bx - bz + cx - cy+kxyAverage+kxzAverage-kyzAverage)/(72.*o));
+
+   x_E = 0.25*eps_new*((2*(-4*axx + bxy + cxz))/(27.*o));
+   x_N = 0.25*eps_new*((2*(2*axx - 2*bxy + cxz))/(27.*o));
+   x_T = 0.25*eps_new*((2*(2*axx + bxy - 2*cxz))/(27.*o));
+   x_NE = 0.25*eps_new*(-((2*axx + 3*axy + 6*bxx + bxy - 2*cxz))/(54.*o));
+   x_SE = 0.25*eps_new*(-((2*axx - 3*axy - 6*bxx + bxy - 2*cxz))/(54.*o));
+   x_TE = 0.25*eps_new*(-((2*axx + 3*axz - 2*bxy + 6*cxx + cxz))/(54.*o));
+   x_BE = 0.25*eps_new*(-((2*axx - 3*axz - 2*bxy - 6*cxx + cxz))/(54.*o));
+   x_TN = 0.25*eps_new*(-((-4*axx + bxy + 3*bxz + 3*cxy + cxz))/(54.*o));
+   x_BN = 0.25*eps_new*(-((-4*axx + bxy - 3*bxz - 3*cxy + cxz))/(54.*o));
+   x_ZERO = 0.;
+   x_TNE = 0.25*eps_new*(-((axy + axz + 2*bxx + bxz + 2*cxx + cxy))/(72.*o));
+   x_TSW = 0.25*eps_new*(((-axy + axz - 2*bxx + bxz + 2*cxx + cxy))/(72.*o));
+   x_TSE = 0.25*eps_new*(((axy - axz + 2*bxx + bxz - 2*cxx + cxy))/(72.*o));
+   x_TNW = 0.25*eps_new*(((axy + axz + 2*bxx - bxz + 2*cxx - cxy))/(72.*o));
+
+   y_E = 0.25*eps_new*(2*(-2*axy + 2*byy + cyz))/(27.*o);
+   y_N = 0.25*eps_new*(2*(axy - 4*byy + cyz))/(27.*o);
+   y_T = 0.25*eps_new*(2*(axy + 2*byy - 2*cyz))/(27.*o);
+   y_NE = 0.25*eps_new*(-((axy + 6*ayy + 3*bxy + 2*byy - 2*cyz))/(54.*o));
+   y_SE = 0.25*eps_new*(-((axy - 6*ayy - 3*bxy + 2*byy - 2*cyz))/(54.*o));
+   y_TE = 0.25*eps_new*(-((axy + 3*ayz - 4*byy + 3*cxy + cyz))/(54.*o));
+   y_BE = 0.25*eps_new*(-((axy - 3*ayz - 4*byy - 3*cxy + cyz))/(54.*o));
+   y_TN = 0.25*eps_new*(-((-2*axy + 2*byy + 3*byz + 6*cyy + cyz))/(54.*o));
+   y_BN = 0.25*eps_new*(-((-2*axy + 2*byy - 3*byz - 6*cyy + cyz))/(54.*o));
+   y_ZERO = 0.;
+   y_TNE = 0.25*eps_new*(-((2*ayy + ayz + bxy + byz + cxy + 2*cyy))/(72.*o));
+   y_TSW = 0.25*eps_new*(((-2*ayy + ayz - bxy + byz + cxy + 2*cyy))/(72.*o));
+   y_TSE = 0.25*eps_new*(((2*ayy - ayz + bxy + byz - cxy + 2*cyy))/(72.*o));
+   y_TNW = 0.25*eps_new*(((2*ayy + ayz + bxy - byz + cxy - 2*cyy))/(72.*o));
+
+   z_E = 0.25*eps_new*((2*(-2*axz + byz + 2*czz))/(27.*o));
+   z_N = 0.25*eps_new*((2*(axz - 2*byz + 2*czz))/(27.*o));
+   z_T = 0.25*eps_new*((2*(axz + byz - 4*czz))/(27.*o));
+   z_NE = 0.25*eps_new*(-((axz + 3*ayz + 3*bxz + byz - 4*czz))/(54.*o));
+   z_SE = 0.25*eps_new*(-((axz - 3*ayz - 3*bxz + byz - 4*czz))/(54.*o));
+   z_TE = 0.25*eps_new*(-((axz + 6*azz - 2*byz + 3*cxz + 2*czz))/(54.*o));
+   z_BE = 0.25*eps_new*(-((axz - 6*azz - 2*byz - 3*cxz + 2*czz))/(54.*o));
+   z_TN = 0.25*eps_new*(-((-2*axz + byz + 6*bzz + 3*cyz + 2*czz))/(54.*o));
+   z_BN = 0.25*eps_new*(-((-2*axz + byz - 6*bzz - 3*cyz + 2*czz))/(54.*o));
+   z_ZERO = 0.;
+   z_TNE = 0.25*eps_new*(-((ayz + 2*azz + bxz + 2*bzz + cxz + cyz))/(72.*o));
+   z_TSW = 0.25*eps_new*(((-ayz + 2*azz - bxz + 2*bzz + cxz + cyz))/(72.*o));
+   z_TSE = 0.25*eps_new*(((ayz - 2*azz + bxz + 2*bzz - cxz + cyz))/(72.*o));
+   z_TNW = 0.25*eps_new*(((ayz + 2*azz + bxz - 2*bzz + cxz - cyz))/(72.*o));
+
+   xy_E   =   0.0625*eps_new *((                       2.*cxyz)/(27.*o));
+   xy_N   =   0.0625*eps_new *((                       2.*cxyz)/(27.*o));
+   xy_T   = -(0.0625*eps_new *((                       4.*cxyz)/(27.*o)));
+   xy_NE  =   0.0625*eps_new *(                            cxyz /(27.*o));
+   xy_SE  =   0.0625*eps_new *(                            cxyz /(27.*o));
+   xy_TE  = -(0.0625*eps_new *(( 3.*axyz            +     cxyz)/(54.*o)));
+   xy_BE  = -(0.0625*eps_new *((-3.*axyz            +     cxyz)/(54.*o)));
+   xy_TN  = -(0.0625*eps_new *((            3.*bxyz +     cxyz)/(54.*o)));
+   xy_BN  = -(0.0625*eps_new *((          - 3.*bxyz +     cxyz)/(54.*o)));
+   //xy_ZERO=   0.0625*eps_new;
+   xy_TNE = -(0.0625*eps_new *((     axyz +     bxyz           )/(72.*o)));
+   xy_TSW =   0.0625*eps_new *((     axyz +     bxyz           )/(72.*o));
+   xy_TSE =   0.0625*eps_new *((-    axyz +     bxyz           )/(72.*o));
+   xy_TNW =   0.0625*eps_new *((     axyz -     bxyz           )/(72.*o));
+
+   xz_E   =   0.0625*eps_new *((            2.*bxyz           )/(27.*o));
+   xz_N   = -(0.0625*eps_new *((            4.*bxyz           )/(27.*o)));
+   xz_T   =   0.0625*eps_new *((            2.*bxyz           )/(27.*o));
+   xz_NE  = -(0.0625*eps_new *(( 3.*axyz +     bxyz           )/(54.*o)));
+   xz_SE  = -(0.0625*eps_new *((-3.*axyz +     bxyz           )/(54.*o)));
+   xz_TE  =   0.0625*eps_new *((                bxyz           )/(27.*o));
+   xz_BE  =   0.0625*eps_new *((                bxyz           )/(27.*o));
+   xz_TN  = -(0.0625*eps_new *((                bxyz + 3.*cxyz)/(54.*o)));
+   xz_BN  = -(0.0625*eps_new *((                bxyz - 3.*cxyz)/(54.*o)));
+   //xz_ZERO=   0.0625*eps_new;
+   xz_TNE = -(0.0625*eps_new *((     axyz            +     cxyz)/(72.*o)));
+   xz_TSW =   0.0625*eps_new *((-    axyz            +     cxyz)/(72.*o));
+   xz_TSE =   0.0625*eps_new *((     axyz            +     cxyz)/(72.*o));
+   xz_TNW =   0.0625*eps_new *((     axyz            -     cxyz)/(72.*o));
+
+   yz_E   = -(0.0625*eps_new *(( 4.*axyz                      )/(27.*o)));
+   yz_N   =   0.0625*eps_new *(( 2.*axyz                      )/(27.*o));
+   yz_T   =   0.0625*eps_new *(( 2.*axyz                      )/(27.*o));
+   yz_NE  = -(0.0625*eps_new *((     axyz + 3.*bxyz           )/(54.*o)));
+   yz_SE  = -(0.0625*eps_new *((     axyz - 3.*bxyz           )/(54.*o)));
+   yz_TE  = -(0.0625*eps_new *((     axyz            + 3.*cxyz)/(54.*o)));
+   yz_BE  = -(0.0625*eps_new *((     axyz            - 3.*cxyz)/(54.*o)));
+   yz_TN  =   0.0625*eps_new *((     axyz                      )/(27.*o));
+   yz_BN  =   0.0625*eps_new *((     axyz                      )/(27.*o));
+   //yz_ZERO=   0.0625*eps_new;
+   yz_TNE = -(0.0625*eps_new *((                bxyz +     cxyz)/(72.*o)));
+   yz_TSW =   0.0625*eps_new *((          -     bxyz +     cxyz)/(72.*o));
+   yz_TSE =   0.0625*eps_new *((                bxyz -     cxyz)/(72.*o));
+   yz_TNW =   0.0625*eps_new *((                bxyz +     cxyz)/(72.*o));
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::calcInterpolatedNode(LBMReal* f, LBMReal omega, LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs)
+{
+   using namespace D3Q27System;
+
+   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);
+   LBMReal vx2  = b0 + 0.25*( xs*bx + ys*by + zs*bz) + 0.0625*(bxx + xs*ys*bxy + xs*zs*bxz + byy + ys*zs*byz + bzz) + 0.015625*(xs*ys*zs*bxyz);
+   LBMReal vx3  = c0 + 0.25*( xs*cx + ys*cy + zs*cz) + 0.0625*(cxx + xs*ys*cxy + xs*zs*cxz + cyy + ys*zs*cyz + czz) + 0.015625*(xs*ys*zs*cxyz);
+
+   //////////////////////////////////////////////////////////////////////////
+   //DRAFT
+   //vx1 -= forcingF*0.5;
+   //////////////////////////////////////////////////////////////////////////
+
+   LBMReal feq[ENDF+1];
+   D3Q27System::calcCompFeq(feq,rho,vx1,vx2,vx3);
+
+   f[E]    = f_E    + xs*x_E    + ys*y_E    + zs*z_E    + xs*ys*xy_E    + xs*zs*xz_E    + ys*zs*yz_E    + feq[E];
+   f[W]    = f_E    + xs*x_E    + ys*y_E    + zs*z_E    + xs*ys*xy_E    + xs*zs*xz_E    + ys*zs*yz_E    + feq[W];
+   f[N]    = f_N    + xs*x_N    + ys*y_N    + zs*z_N    + xs*ys*xy_N    + xs*zs*xz_N    + ys*zs*yz_N    + feq[N];
+   f[S]    = f_N    + xs*x_N    + ys*y_N    + zs*z_N    + xs*ys*xy_N    + xs*zs*xz_N    + ys*zs*yz_N    + feq[S];
+   f[T]    = f_T    + xs*x_T    + ys*y_T    + zs*z_T    + xs*ys*xy_T    + xs*zs*xz_T    + ys*zs*yz_T    + feq[T];
+   f[B]    = f_T    + xs*x_T    + ys*y_T    + zs*z_T    + xs*ys*xy_T    + xs*zs*xz_T    + ys*zs*yz_T    + feq[B];
+   f[NE]   = f_NE   + xs*x_NE   + ys*y_NE   + zs*z_NE   + xs*ys*xy_NE   + xs*zs*xz_NE   + ys*zs*yz_NE   + feq[NE];
+   f[SW]   = f_NE   + xs*x_NE   + ys*y_NE   + zs*z_NE   + xs*ys*xy_NE   + xs*zs*xz_NE   + ys*zs*yz_NE   + feq[SW];
+   f[SE]   = f_SE   + xs*x_SE   + ys*y_SE   + zs*z_SE   + xs*ys*xy_SE   + xs*zs*xz_SE   + ys*zs*yz_SE   + feq[SE];
+   f[NW]   = f_SE   + xs*x_SE   + ys*y_SE   + zs*z_SE   + xs*ys*xy_SE   + xs*zs*xz_SE   + ys*zs*yz_SE   + feq[NW];
+   f[TE]   = f_TE   + xs*x_TE   + ys*y_TE   + zs*z_TE   + xs*ys*xy_TE   + xs*zs*xz_TE   + ys*zs*yz_TE   + feq[TE];
+   f[BW]   = f_TE   + xs*x_TE   + ys*y_TE   + zs*z_TE   + xs*ys*xy_TE   + xs*zs*xz_TE   + ys*zs*yz_TE   + feq[BW];
+   f[BE]   = f_BE   + xs*x_BE   + ys*y_BE   + zs*z_BE   + xs*ys*xy_BE   + xs*zs*xz_BE   + ys*zs*yz_BE   + feq[BE];
+   f[TW]   = f_BE   + xs*x_BE   + ys*y_BE   + zs*z_BE   + xs*ys*xy_BE   + xs*zs*xz_BE   + ys*zs*yz_BE   + feq[TW];
+   f[TN]   = f_TN   + xs*x_TN   + ys*y_TN   + zs*z_TN   + xs*ys*xy_TN   + xs*zs*xz_TN   + ys*zs*yz_TN   + feq[TN];
+   f[BS]   = f_TN   + xs*x_TN   + ys*y_TN   + zs*z_TN   + xs*ys*xy_TN   + xs*zs*xz_TN   + ys*zs*yz_TN   + feq[BS];
+   f[BN]   = f_BN   + xs*x_BN   + ys*y_BN   + zs*z_BN   + xs*ys*xy_BN   + xs*zs*xz_BN   + ys*zs*yz_BN   + feq[BN];
+   f[TS]   = f_BN   + xs*x_BN   + ys*y_BN   + zs*z_BN   + xs*ys*xy_BN   + xs*zs*xz_BN   + ys*zs*yz_BN   + feq[TS];
+   f[TNE]  = f_TNE  + xs*x_TNE  + ys*y_TNE  + zs*z_TNE  + xs*ys*xy_TNE  + xs*zs*xz_TNE  + ys*zs*yz_TNE  + feq[TNE];
+   f[TSW]  = f_TSW  + xs*x_TSW  + ys*y_TSW  + zs*z_TSW  + xs*ys*xy_TSW  + xs*zs*xz_TSW  + ys*zs*yz_TSW  + feq[TSW];
+   f[TSE]  = f_TSE  + xs*x_TSE  + ys*y_TSE  + zs*z_TSE  + xs*ys*xy_TSE  + xs*zs*xz_TSE  + ys*zs*yz_TSE  + feq[TSE];
+   f[TNW]  = f_TNW  + xs*x_TNW  + ys*y_TNW  + zs*z_TNW  + xs*ys*xy_TNW  + xs*zs*xz_TNW  + ys*zs*yz_TNW  + feq[TNW];
+   f[BNE]  = f_TSW  + xs*x_TSW  + ys*y_TSW  + zs*z_TSW  + xs*ys*xy_TSW  + xs*zs*xz_TSW  + ys*zs*yz_TSW  + feq[BNE];
+   f[BSW]  = f_TNE  + xs*x_TNE  + ys*y_TNE  + zs*z_TNE  + xs*ys*xy_TNE  + xs*zs*xz_TNE  + ys*zs*yz_TNE  + feq[BSW];
+   f[BSE]  = f_TNW  + xs*x_TNW  + ys*y_TNW  + zs*z_TNW  + xs*ys*xy_TNW  + xs*zs*xz_TNW  + ys*zs*yz_TNW  + feq[BSE];
+   f[BNW]  = f_TSE  + xs*x_TSE  + ys*y_TSE  + zs*z_TSE  + xs*ys*xy_TSE  + xs*zs*xz_TSE  + ys*zs*yz_TSE  + feq[BNW];
+   f[ZERO] = f_ZERO + xs*x_ZERO + ys*y_ZERO + zs*z_ZERO                                                 + feq[ZERO];
+}
+//////////////////////////////////////////////////////////////////////////
+//Position SWB -0.25, -0.25, -0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressBSW()
+{
+   return   press_SWT * (0.140625 + 0.1875 * xoff + 0.1875 * yoff - 0.5625 * zoff) +
+      press_NWT * (0.046875 + 0.0625 * xoff - 0.1875 * yoff - 0.1875 * zoff) +
+      press_SET * (0.046875 - 0.1875 * xoff + 0.0625 * yoff - 0.1875 * zoff) +
+      press_NET * (0.015625 - 0.0625 * xoff - 0.0625 * yoff - 0.0625 * zoff) +
+      press_NEB * (0.046875 - 0.1875 * xoff - 0.1875 * yoff + 0.0625 * zoff) +
+      press_NWB * (0.140625 + 0.1875 * xoff - 0.5625 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.140625 - 0.5625 * xoff + 0.1875 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.421875 + 0.5625 * xoff + 0.5625 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position SWT -0.25, -0.25, 0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressTSW()
+{
+   return   press_SWT * (0.421875 + 0.5625 * xoff + 0.5625 * yoff - 0.5625 * zoff) +
+      press_NWT * (0.140625 + 0.1875 * xoff - 0.5625 * yoff - 0.1875 * zoff) +
+      press_SET * (0.140625 - 0.5625 * xoff + 0.1875 * yoff - 0.1875 * zoff) +
+      press_NET * (0.046875 - 0.1875 * xoff - 0.1875 * yoff - 0.0625 * zoff) +
+      press_NEB * (0.015625 - 0.0625 * xoff - 0.0625 * yoff + 0.0625 * zoff) +
+      press_NWB * (0.046875 + 0.0625 * xoff - 0.1875 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.046875 - 0.1875 * xoff + 0.0625 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.140625 + 0.1875 * xoff + 0.1875 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position SET 0.25, -0.25, 0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressTSE()
+{
+   return   press_SET * (0.421875 - 0.5625 * xoff + 0.5625 * yoff - 0.5625 * zoff) +
+      press_NET * (0.140625 - 0.1875 * xoff - 0.5625 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.140625 + 0.5625 * xoff + 0.1875 * yoff - 0.1875 * zoff) +
+      press_NWT * (0.046875 + 0.1875 * xoff - 0.1875 * yoff - 0.0625 * zoff) +
+      press_NWB * (0.015625 + 0.0625 * xoff - 0.0625 * yoff + 0.0625 * zoff) +
+      press_NEB * (0.046875 - 0.0625 * xoff - 0.1875 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.046875 + 0.1875 * xoff + 0.0625 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.140625 - 0.1875 * xoff + 0.1875 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position SEB 0.25, -0.25, -0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressBSE()
+{
+   return   press_SET * (0.140625 - 0.1875 * xoff + 0.1875 * yoff - 0.5625 * zoff) +
+      press_NET * (0.046875 - 0.0625 * xoff - 0.1875 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.046875 + 0.1875 * xoff + 0.0625 * yoff - 0.1875 * zoff) +
+      press_NWT * (0.015625 + 0.0625 * xoff - 0.0625 * yoff - 0.0625 * zoff) +
+      press_NWB * (0.046875 + 0.1875 * xoff - 0.1875 * yoff + 0.0625 * zoff) +
+      press_NEB * (0.140625 - 0.1875 * xoff - 0.5625 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.140625 + 0.5625 * xoff + 0.1875 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.421875 - 0.5625 * xoff + 0.5625 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position NWB -0.25, 0.25, -0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressBNW()
+{
+   return   press_NWT * (0.140625 + 0.1875 * xoff - 0.1875 * yoff - 0.5625 * zoff) +
+      press_NET * (0.046875 - 0.1875 * xoff - 0.0625 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.046875 + 0.0625 * xoff + 0.1875 * yoff - 0.1875 * zoff) +
+      press_SET * (0.015625 - 0.0625 * xoff + 0.0625 * yoff - 0.0625 * zoff) +
+      press_SEB * (0.046875 - 0.1875 * xoff + 0.1875 * yoff + 0.0625 * zoff) +
+      press_NEB * (0.140625 - 0.5625 * xoff - 0.1875 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.140625 + 0.1875 * xoff + 0.5625 * yoff + 0.1875 * zoff) +
+      press_NWB * (0.421875 + 0.5625 * xoff - 0.5625 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position NWT -0.25, 0.25, 0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressTNW()
+{
+   return   press_NWT * (0.421875 + 0.5625 * xoff - 0.5625 * yoff - 0.5625 * zoff) +
+      press_NET * (0.140625 - 0.5625 * xoff - 0.1875 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.140625 + 0.1875 * xoff + 0.5625 * yoff - 0.1875 * zoff) +
+      press_SET * (0.046875 - 0.1875 * xoff + 0.1875 * yoff - 0.0625 * zoff) +
+      press_SEB * (0.015625 - 0.0625 * xoff + 0.0625 * yoff + 0.0625 * zoff) +
+      press_NEB * (0.046875 - 0.1875 * xoff - 0.0625 * yoff + 0.1875 * zoff) +
+      press_SWB * (0.046875 + 0.0625 * xoff + 0.1875 * yoff + 0.1875 * zoff) +
+      press_NWB * (0.140625 + 0.1875 * xoff - 0.1875 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position NET 0.25, 0.25, 0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressTNE()
+{
+   return   press_NET * (0.421875 - 0.5625 * xoff - 0.5625 * yoff - 0.5625 * zoff) +
+      press_NWT * (0.140625 + 0.5625 * xoff - 0.1875 * yoff - 0.1875 * zoff) +
+      press_SET * (0.140625 - 0.1875 * xoff + 0.5625 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.046875 + 0.1875 * xoff + 0.1875 * yoff - 0.0625 * zoff) +
+      press_SWB * (0.015625 + 0.0625 * xoff + 0.0625 * yoff + 0.0625 * zoff) +
+      press_NWB * (0.046875 + 0.1875 * xoff - 0.0625 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.046875 - 0.0625 * xoff + 0.1875 * yoff + 0.1875 * zoff) +
+      press_NEB * (0.140625 - 0.1875 * xoff - 0.1875 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position NEB 0.25, 0.25, -0.25
+LBMReal CompressibleOffsetInterpolationProcessor::calcPressBNE()
+{
+   return   press_NET * (0.140625 - 0.1875 * xoff - 0.1875 * yoff - 0.5625 * zoff) +
+      press_NWT * (0.046875 + 0.1875 * xoff - 0.0625 * yoff - 0.1875 * zoff) +
+      press_SET * (0.046875 - 0.0625 * xoff + 0.1875 * yoff - 0.1875 * zoff) +
+      press_SWT * (0.015625 + 0.0625 * xoff + 0.0625 * yoff - 0.0625 * zoff) +
+      press_SWB * (0.046875 + 0.1875 * xoff + 0.1875 * yoff + 0.0625 * zoff) +
+      press_NWB * (0.140625 + 0.5625 * xoff - 0.1875 * yoff + 0.1875 * zoff) +
+      press_SEB * (0.140625 - 0.1875 * xoff + 0.5625 * yoff + 0.1875 * zoff) +
+      press_NEB * (0.421875 - 0.5625 * xoff - 0.5625 * yoff + 0.5625 * zoff);
+}
+//////////////////////////////////////////////////////////////////////////
+//Position C 0.0, 0.0, 0.0
+void CompressibleOffsetInterpolationProcessor::calcInterpolatedNodeFC(LBMReal* f, LBMReal omega)
+{
+   using namespace D3Q27System;
+
+   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) +
+      press_SET * (0.125 - 0.25 * xoff + 0.25 * yoff - 0.25 * zoff) +
+      press_SWT * (0.125 + 0.25 * xoff + 0.25 * yoff - 0.25 * zoff) +
+      press_NEB * (0.125 - 0.25 * xoff - 0.25 * yoff + 0.25 * zoff) +
+      press_NWB * (0.125 + 0.25 * xoff - 0.25 * yoff + 0.25 * zoff) +
+      press_SEB * (0.125 - 0.25 * xoff + 0.25 * yoff + 0.25 * zoff) +
+      press_SWB * (0.125 + 0.25 * xoff + 0.25 * yoff + 0.25 * zoff);
+   LBMReal vx1  = a0;
+   LBMReal vx2  = b0;
+   LBMReal vx3  = c0;
+
+   LBMReal rho = press ;//+ (ax+by+cz)/3.;
+
+   //////////////////////////////////////////////////////////////////////////
+   //DRAFT
+   //vx1 -= forcingC*0.5;
+   //////////////////////////////////////////////////////////////////////////
+
+   LBMReal feq[ENDF+1];
+   D3Q27System::calcCompFeq(feq,rho,vx1,vx2,vx3);
+
+   LBMReal eps_new = 2.;
+   LBMReal o  = omega;
+   LBMReal op = 1.;
+
+   //f_E    = eps_new *((5.*ax*o + 5.*by*o + 5.*cz*o - 8.*ax*op + 4.*by*op + 4.*cz*op)/(54.*o*op));
+   //f_N    = f_E + eps_new *((2.*(ax - by))/(9.*o));
+   //f_T    = f_E + eps_new *((2.*(ax - cz))/(9.*o));
+   //f_NE   = eps_new *(-(5.*cz*o + 3.*(ay + bx)*op - 2.*cz*op + ax*(5.*o + op) + by*(5.*o + op))/(54.*o*op));
+   //f_SE   = f_NE + eps_new *((  ay + bx )/(9.*o));
+   //f_TE   = eps_new *(-(5.*cz*o + by*(5.*o - 2.*op) + 3.*(az + cx)*op + cz*op + ax*(5.*o + op))/(54.*o*op));
+   //f_BE   = f_TE + eps_new *((  az + cx )/(9.*o));
+   //f_TN   = eps_new *(-(5.*ax*o + 5.*by*o + 5.*cz*o - 2.*ax*op + by*op + 3.*bz*op + 3.*cy*op + cz*op)/(54.*o*op));
+   //f_BN   = f_TN + eps_new *((  bz + cy )/(9.*o));
+   //f_ZERO = eps_new *((5.*(ax + by + cz))/(9.*op));
+   //f_TNE  = eps_new *(-(ay + az + bx + bz + cx + cy)/(72.*o));
+   //f_TSW  = - eps_new *((ay + bx)/(36.*o)) - f_TNE;
+   //f_TSE  = - eps_new *((az + cx)/(36.*o)) - f_TNE;
+   //f_TNW  = - eps_new *((bz + cy)/(36.*o)) - f_TNE;
+
+   f_E = eps_new*((2*(-2*ax + by + cz-kxxMzzAverage-kxxMyyAverage))/(27.*o));
+   f_N = eps_new*((2*(ax - 2*by + cz+2*kxxMyyAverage-kxxMzzAverage))/(27.*o));
+   f_T = eps_new*((2*(ax + by - 2*cz-kxxMyyAverage+2*kxxMzzAverage))/(27.*o));
+   f_NE = eps_new*(-(ax + 3*ay + 3*bx + by - 2*cz+2*kxxMyyAverage-kxxMyyAverage+3*kxyAverage)/(54.*o));
+   f_SE = eps_new*(-(ax - 3*ay - 3*bx + by - 2*cz+2*kxxMyyAverage-kxxMyyAverage-3*kxyAverage)/(54.*o));
+   f_TE = eps_new*(-(ax + 3*az - 2*by + 3*cx + cz+2*kxxMyyAverage-kxxMzzAverage+3*kxzAverage)/(54.*o));
+   f_BE = eps_new*(-(ax - 3*az - 2*by - 3*cx + cz+2*kxxMyyAverage-kxxMzzAverage-3*kxzAverage)/(54.*o));
+   f_TN = eps_new*(-(-2*ax + by + 3*bz + 3*cy + cz-kxxMyyAverage-kxxMzzAverage+3*kyzAverage)/(54.*o));
+   f_BN = eps_new*(-(-2*ax + by - 3*bz - 3*cy + cz-kxxMyyAverage-kxxMzzAverage-3*kyzAverage)/(54.*o));
+   f_ZERO = 0.;
+   f_TNE = eps_new*(-(ay + az + bx + bz + cx + cy+kxyAverage+kxzAverage+kyzAverage)/(72.*o));
+   f_TSW = eps_new*((-ay + az - bx + bz + cx + cy-kxyAverage+kxzAverage+kyzAverage)/(72.*o));
+   f_TSE = eps_new*((ay - az + bx + bz - cx + cy+kxyAverage-kxzAverage+kyzAverage)/(72.*o));
+   f_TNW = eps_new*((ay + az + bx - bz + cx - cy+kxyAverage+kxzAverage-kyzAverage)/(72.*o));
+
+   f[E]    = f_E    + feq[E];
+   f[W]    = f_E    + feq[W];
+   f[N]    = f_N    + feq[N];
+   f[S]    = f_N    + feq[S];
+   f[T]    = f_T    + feq[T];
+   f[B]    = f_T    + feq[B];
+   f[NE]   = f_NE   + feq[NE];
+   f[SW]   = f_NE   + feq[SW];
+   f[SE]   = f_SE   + feq[SE];
+   f[NW]   = f_SE   + feq[NW];
+   f[TE]   = f_TE   + feq[TE];
+   f[BW]   = f_TE   + feq[BW];
+   f[BE]   = f_BE   + feq[BE];
+   f[TW]   = f_BE   + feq[TW];
+   f[TN]   = f_TN   + feq[TN];
+   f[BS]   = f_TN   + feq[BS];
+   f[BN]   = f_BN   + feq[BN];
+   f[TS]   = f_BN   + feq[TS];
+   f[TNE]  = f_TNE  + feq[TNE];
+   f[TNW]  = f_TNW  + feq[TNW];
+   f[TSE]  = f_TSE  + feq[TSE];
+   f[TSW]  = f_TSW  + feq[TSW];
+   f[BNE]  = f_TSW  + feq[BNE];
+   f[BNW]  = f_TSE  + feq[BNW];
+   f[BSE]  = f_TNW  + feq[BSE];
+   f[BSW]  = f_TNE  + feq[BSW];
+   f[ZERO] = f_ZERO + feq[ZERO];
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::calcInterpolatedVelocity(LBMReal x, LBMReal y, LBMReal z, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3)
+{
+	vx1  = a0 + ax*x + ay*y + az*z + axx*x*x + ayy*y*y + azz*z*z + axy*x*y + axz*x*z + ayz*y*z+axyz*x*y*z;
+	vx2  = b0 + bx*x + by*y + bz*z + bxx*x*x + byy*y*y + bzz*z*z + bxy*x*y + bxz*x*z + byz*y*z+bxyz*x*y*z;
+	vx3  = c0 + cx*x + cy*y + cz*z + cxx*x*x + cyy*y*y + czz*z*z + cxy*x*y + cxz*x*z + cyz*y*z+cxyz*x*y*z;
+}
+//////////////////////////////////////////////////////////////////////////
+void CompressibleOffsetInterpolationProcessor::calcInterpolatedShearStress(LBMReal x, LBMReal y, LBMReal z,LBMReal& tauxx, LBMReal& tauyy, LBMReal& tauzz,LBMReal& tauxy, LBMReal& tauxz, LBMReal& tauyz)
+{
+	tauxx=ax+2*axx*x+axy*y+axz*z+axyz*y*z;
+	tauyy=by+2*byy*y+bxy*x+byz*z+bxyz*x*z;
+	tauzz=cz+2*czz*z+cxz*x+cyz*y+cxyz*x*y;
+	tauxy=0.5*((ay+2.0*ayy*y+axy*x+ayz*z+axyz*x*z)+(bx+2.0*bxx*x+bxy*y+bxz*z+bxyz*y*z));
+	tauxz=0.5*((az+2.0*azz*z+axz*x+ayz*y+axyz*x*y)+(cx+2.0*cxx*x+cxy*y+cxz*z+cxyz*y*z));
+	tauyz=0.5*((bz+2.0*bzz*z+bxz*x+byz*y+bxyz*x*y)+(cy+2.0*cyy*y+cxy*x+cyz*z+cxyz*x*z));
+}
diff --git a/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h b/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h
new file mode 100644
index 0000000000000000000000000000000000000000..e3bea7b4634e749e915fac5596658a167fb7f5dc
--- /dev/null
+++ b/source/VirtualFluidsCore/LBM/CompressibleOffsetInterpolationProcessor.h
@@ -0,0 +1,77 @@
+#ifndef CompressibleOffsetInterpolationProcessor_H_
+#define CompressibleOffsetInterpolationProcessor_H_
+
+#include "D3Q27InterpolationProcessor.h"
+#include "D3Q27System.h"
+
+//////////////////////////////////////////////////////////////////////////
+//it works only for cascaded LBM
+//super compact interpolation method by Martin Geier
+//////////////////////////////////////////////////////////////////////////
+
+class CompressibleOffsetInterpolationProcessor;
+typedef boost::shared_ptr<CompressibleOffsetInterpolationProcessor> CompressibleOffsetInterpolationProcessorPtr;
+
+class CompressibleOffsetInterpolationProcessor : public D3Q27InterpolationProcessor
+{
+public:
+   CompressibleOffsetInterpolationProcessor();
+   CompressibleOffsetInterpolationProcessor(LBMReal omegaC, LBMReal omegaF);
+   virtual ~CompressibleOffsetInterpolationProcessor();
+   D3Q27InterpolationProcessorPtr clone();
+   void setOmegas(LBMReal omegaC, LBMReal omegaF);
+   void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF);
+   void interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF, LBMReal xoff, LBMReal yoff, LBMReal zoff);
+   void interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC); 
+   void interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC, LBMReal xoff, LBMReal yoff, LBMReal zoff); 
+   //LBMReal forcingC, forcingF;
+protected:   
+private:
+   LBMReal omegaC, omegaF;
+   LBMReal a0, ax, ay, az, axx, ayy, azz, axy, axz, ayz, b0, bx, by, bz, bxx, byy, bzz, bxy, bxz, byz, c0, cx, cy, cz, cxx, cyy, czz, cxy, cxz, cyz, axyz, bxyz, cxyz;
+   LBMReal xoff,    yoff,    zoff;
+   LBMReal xoff_sq, yoff_sq, zoff_sq;
+   LBMReal press_SWT, press_NWT, press_NET, press_SET, press_SWB, press_NWB, press_NEB, press_SEB;
+
+   LBMReal  f_E,  f_N,  f_T,  f_NE,  f_SE,  f_BE,  f_TE,  f_TN,  f_BN,  f_TNE,  f_TNW,  f_TSE,  f_TSW,  f_ZERO;
+   LBMReal  x_E,  x_N,  x_T,  x_NE,  x_SE,  x_BE,  x_TE,  x_TN,  x_BN,  x_TNE,  x_TNW,  x_TSE,  x_TSW,  x_ZERO;
+   LBMReal  y_E,  y_N,  y_T,  y_NE,  y_SE,  y_BE,  y_TE,  y_TN,  y_BN,  y_TNE,  y_TNW,  y_TSE,  y_TSW,  y_ZERO;
+   LBMReal  z_E,  z_N,  z_T,  z_NE,  z_SE,  z_BE,  z_TE,  z_TN,  z_BN,  z_TNE,  z_TNW,  z_TSE,  z_TSW,  z_ZERO;
+   LBMReal xy_E, xy_N, xy_T, xy_NE, xy_SE, xy_BE, xy_TE, xy_TN, xy_BN, xy_TNE, xy_TNW, xy_TSE, xy_TSW/*, xy_ZERO*/;
+   LBMReal xz_E, xz_N, xz_T, xz_NE, xz_SE, xz_BE, xz_TE, xz_TN, xz_BN, xz_TNE, xz_TNW, xz_TSE, xz_TSW/*, xz_ZERO*/;
+   LBMReal yz_E, yz_N, yz_T, yz_NE, yz_SE, yz_BE, yz_TE, yz_TN, yz_BN, yz_TNE, yz_TNW, yz_TSE, yz_TSW/*, yz_ZERO*/;
+
+   LBMReal kxyAverage, kyzAverage, kxzAverage, kxxMyyAverage, kxxMzzAverage; 
+
+   LBMReal a,b,c;
+
+   void setOffsets(LBMReal xoff, LBMReal yoff, LBMReal zoff);
+   void calcMoments(const LBMReal* const f, LBMReal omega, LBMReal& rho, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3, 
+      LBMReal& kxy, LBMReal& kyz, LBMReal& kxz, LBMReal& kxxMyy, LBMReal& kxxMzz);
+   void calcInterpolatedCoefficiets(const D3Q27ICell& icell, LBMReal omega, LBMReal eps_new);
+   void calcInterpolatedNode(LBMReal* f, LBMReal omega, LBMReal x, LBMReal y, LBMReal z, LBMReal press, LBMReal xs, LBMReal ys, LBMReal zs);
+   LBMReal calcPressBSW();
+   LBMReal calcPressTSW();
+   LBMReal calcPressTSE();
+   LBMReal calcPressBSE();
+   LBMReal calcPressBNW();
+   LBMReal calcPressTNW();
+   LBMReal calcPressTNE();
+   LBMReal calcPressBNE();
+   void calcInterpolatedNodeFC(LBMReal* f, LBMReal omega);
+   void calcInterpolatedVelocity(LBMReal x, LBMReal y, LBMReal z,LBMReal& vx1, LBMReal& vx2, LBMReal& vx3);
+   void calcInterpolatedShearStress(LBMReal x, LBMReal y, LBMReal z,LBMReal& tauxx, LBMReal& tauyy, LBMReal& tauzz,LBMReal& tauxy, LBMReal& tauxz, LBMReal& tauyz);
+};
+
+//////////////////////////////////////////////////////////////////////////
+inline void CompressibleOffsetInterpolationProcessor::interpolateCoarseToFine(D3Q27ICell& icellC, D3Q27ICell& icellF)
+{
+   this->interpolateCoarseToFine(icellC, icellF, 0.0, 0.0, 0.0);
+}
+//////////////////////////////////////////////////////////////////////////
+inline void CompressibleOffsetInterpolationProcessor::interpolateFineToCoarse(D3Q27ICell& icellF, LBMReal* icellC)
+{
+   this->interpolateFineToCoarse(icellF, icellC, 0.0, 0.0, 0.0);
+}
+
+#endif
diff --git a/source/VirtualFluidsCore/LBM/D3Q27System.h b/source/VirtualFluidsCore/LBM/D3Q27System.h
index 23c2fb8ef4106779cac5e5a6f7b7ece2cba0e27a..45fb79d7a01a2657c1111dac8d8cc8c6cad0778a 100644
--- a/source/VirtualFluidsCore/LBM/D3Q27System.h
+++ b/source/VirtualFluidsCore/LBM/D3Q27System.h
@@ -396,85 +396,155 @@ namespace D3Q27System
    }
 
    /*=====================================================================*/
-   static void calcCompMacroscopicValues(const LBMReal* const& f/*[27]*/, LBMReal& rho, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3)
+   static void calcCompMacroscopicValues(const LBMReal* const& f/*[27]*/, LBMReal& drho, LBMReal& vx1, LBMReal& vx2, LBMReal& vx3)
    {
-      D3Q27System::calcDensity(f, rho);
+      D3Q27System::calcDensity(f, drho);
       D3Q27System::calcIncompVelocityX1(f, vx1);
       D3Q27System::calcIncompVelocityX2(f, vx2);
       D3Q27System::calcIncompVelocityX3(f, vx3);
+      LBMReal rho = drho+one;
       vx1/=rho;
       vx2/=rho;
       vx3/=rho;
    }
    //////////////////////////////////////////////////////////////////////////
-   static LBMReal getCompFeqForDirection(const int& direction, const LBMReal& rho,const LBMReal& vx1,const LBMReal& vx2,const LBMReal& vx3)
+   static LBMReal getCompFeqForDirection(const int& direction, const LBMReal& drho,const LBMReal& vx1,const LBMReal& vx2,const LBMReal& vx3)
    {
       LBMReal cu_sq=1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
 
-      switch(direction)    
+      //switch(direction)    
+      //{
+      //   case ZERO : return REAL_CAST( c8o27*rho*(1.0-cu_sq));
+      //   case E : return REAL_CAST(  c2o27*rho*(1.0+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq));
+      //   case W : return REAL_CAST(  c2o27*rho*(1.0+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq));
+      //   case N : return REAL_CAST(  c2o27*rho*(1.0+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq));
+      //   case S : return REAL_CAST(  c2o27*rho*(1.0+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq));
+      //   case T : return REAL_CAST(  c2o27*rho*(1.0+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq));
+      //   case B : return REAL_CAST(  c2o27*rho*(1.0+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq));
+      //   case NE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq));
+      //   case SW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq));
+      //   case SE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq));
+      //   case NW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq));
+      //   case TE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq));
+      //   case BW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq));
+      //   case BE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq));
+      //   case TW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq));
+      //   case TN : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq));
+      //   case BS : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq));
+      //   case BN : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq));
+      //   case TS : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq));
+      //   case TNE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq));
+      //   case BSW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq));
+      //   case BNE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq));
+      //   case TSW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq));
+      //   case TSE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq));
+      //   case BNW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq));
+      //   case BSE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq));
+      //   case TNW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq));
+      //   default: throw UbException(UB_EXARGS,"unknown dir");
+      //}
+
+
+      ////-----
+      LBMReal rho = drho+one;
+      switch (direction)
       {
-         case ZERO : return REAL_CAST( c8o27*rho*(1.0-cu_sq));
-         case E : return REAL_CAST(  c2o27*rho*(1.0+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq));
-         case W : return REAL_CAST(  c2o27*rho*(1.0+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq));
-         case N : return REAL_CAST(  c2o27*rho*(1.0+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq));
-         case S : return REAL_CAST(  c2o27*rho*(1.0+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq));
-         case T : return REAL_CAST(  c2o27*rho*(1.0+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq));
-         case B : return REAL_CAST(  c2o27*rho*(1.0+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq));
-         case NE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq));
-         case SW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq));
-         case SE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq));
-         case NW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq));
-         case TE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq));
-         case BW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq));
-         case BE : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq));
-         case TW : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq));
-         case TN : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq));
-         case BS : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq));
-         case BN : return REAL_CAST( c1o54*rho*(1.0+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq));
-         case TS : return REAL_CAST( c1o54*rho*(1.0+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq));
-         case TNE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq));
-         case BSW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq));
-         case BNE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq));
-         case TSW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq));
-         case TSE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq));
-         case BNW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq));
-         case BSE : return REAL_CAST(c1o216*rho*(1.0+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq));
-         case TNW : return REAL_CAST(c1o216*rho*(1.0+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq));
-         default: throw UbException(UB_EXARGS,"unknown dir");
+      case ZERO: return REAL_CAST(c8o27*(drho+rho*(-cu_sq)));
+      case E: return REAL_CAST(c2o27*(drho+rho*(3.0*(vx1)+c9o2*(vx1)*(vx1)-cu_sq)));
+      case W: return REAL_CAST(c2o27*(drho+rho*(3.0*(-vx1)+c9o2*(-vx1)*(-vx1)-cu_sq)));
+      case N: return REAL_CAST(c2o27*(drho+rho*(3.0*(vx2)+c9o2*(vx2)*(vx2)-cu_sq)));
+      case S: return REAL_CAST(c2o27*(drho+rho*(3.0*(-vx2)+c9o2*(-vx2)*(-vx2)-cu_sq)));
+      case T: return REAL_CAST(c2o27*(drho+rho*(3.0*(vx3)+c9o2*(vx3)*(vx3)-cu_sq)));
+      case B: return REAL_CAST(c2o27*(drho+rho*(3.0*(-vx3)+c9o2*(-vx3)*(-vx3)-cu_sq)));
+      case NE: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx1+vx2)+c9o2*(vx1+vx2)*(vx1+vx2)-cu_sq)));
+      case SW: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq)));
+      case SE: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx1-vx2)+c9o2*(vx1-vx2)*(vx1-vx2)-cu_sq)));
+      case NW: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq)));
+      case TE: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx1+vx3)+c9o2*(vx1+vx3)*(vx1+vx3)-cu_sq)));
+      case BW: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq)));
+      case BE: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx1-vx3)+c9o2*(vx1-vx3)*(vx1-vx3)-cu_sq)));
+      case TW: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq)));
+      case TN: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx2+vx3)+c9o2*(vx2+vx3)*(vx2+vx3)-cu_sq)));
+      case BS: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq)));
+      case BN: return REAL_CAST(c1o54*(drho+rho*(3.0*(vx2-vx3)+c9o2*(vx2-vx3)*(vx2-vx3)-cu_sq)));
+      case TS: return REAL_CAST(c1o54*(drho+rho*(3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq)));
+      case TNE: return REAL_CAST(c1o216*(drho+rho*(3.0*(vx1+vx2+vx3)+c9o2*(vx1+vx2+vx3)*(vx1+vx2+vx3)-cu_sq)));
+      case BSW: return REAL_CAST(c1o216*(drho+rho*(3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq)));
+      case BNE: return REAL_CAST(c1o216*(drho+rho*(3.0*(vx1+vx2-vx3)+c9o2*(vx1+vx2-vx3)*(vx1+vx2-vx3)-cu_sq)));
+      case TSW: return REAL_CAST(c1o216*(drho+rho*(3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq)));
+      case TSE: return REAL_CAST(c1o216*(drho+rho*(3.0*(vx1-vx2+vx3)+c9o2*(vx1-vx2+vx3)*(vx1-vx2+vx3)-cu_sq)));
+      case BNW: return REAL_CAST(c1o216*(drho+rho*(3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq)));
+      case BSE: return REAL_CAST(c1o216*(drho+rho*(3.0*(vx1-vx2-vx3)+c9o2*(vx1-vx2-vx3)*(vx1-vx2-vx3)-cu_sq)));
+      case TNW: return REAL_CAST(c1o216*(drho+rho*(3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq)));
+      default: throw UbException(UB_EXARGS, "unknown dir");
       }
+
    }
    //////////////////////////////////////////////////////////////////////////
-   static void calcCompFeq(LBMReal* const& feq/*[27]*/,const LBMReal& rho,const LBMReal& vx1,const LBMReal& vx2,const LBMReal& vx3)	
+   static void calcCompFeq(LBMReal* const& feq/*[27]*/,const LBMReal& drho,const LBMReal& vx1,const LBMReal& vx2,const LBMReal& vx3)	
    {
-      LBMReal cu_sq=1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
-
-      feq[ZERO] =  c8o27*rho*(1.0-cu_sq);
-      feq[E] =   c2o27*rho*(1.0+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq);
-      feq[W] =   c2o27*rho*(1.0+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq);
-      feq[N] =   c2o27*rho*(1.0+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq);
-      feq[S] =   c2o27*rho*(1.0+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq);
-      feq[T] =   c2o27*rho*(1.0+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq);
-      feq[B] =   c2o27*rho*(1.0+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq);
-      feq[NE] =  c1o54*rho*(1.0+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq);
-      feq[SW] =  c1o54*rho*(1.0+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq);
-      feq[SE] =  c1o54*rho*(1.0+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq);
-      feq[NW] =  c1o54*rho*(1.0+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq);
-      feq[TE] =  c1o54*rho*(1.0+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq);
-      feq[BW] =  c1o54*rho*(1.0+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq);
-      feq[BE] =  c1o54*rho*(1.0+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq);
-      feq[TW] =  c1o54*rho*(1.0+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq);
-      feq[TN] =  c1o54*rho*(1.0+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq);
-      feq[BS] =  c1o54*rho*(1.0+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq);
-      feq[BN] =  c1o54*rho*(1.0+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq);
-      feq[TS] =  c1o54*rho*(1.0+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq);
-      feq[TNE] = c1o216*rho*(1.0+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq);
-      feq[BSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq);
-      feq[BNE] = c1o216*rho*(1.0+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq);
-      feq[TSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq);
-      feq[TSE] = c1o216*rho*(1.0+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq);
-      feq[BNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq);
-      feq[BSE] = c1o216*rho*(1.0+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq);
-      feq[TNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq);
+      //LBMReal cu_sq=1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
+
+      //feq[ZERO] =  c8o27*rho*(1.0-cu_sq);
+      //feq[E] =   c2o27*rho*(1.0+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq);
+      //feq[W] =   c2o27*rho*(1.0+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq);
+      //feq[N] =   c2o27*rho*(1.0+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq);
+      //feq[S] =   c2o27*rho*(1.0+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq);
+      //feq[T] =   c2o27*rho*(1.0+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq);
+      //feq[B] =   c2o27*rho*(1.0+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq);
+      //feq[NE] =  c1o54*rho*(1.0+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq);
+      //feq[SW] =  c1o54*rho*(1.0+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq);
+      //feq[SE] =  c1o54*rho*(1.0+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq);
+      //feq[NW] =  c1o54*rho*(1.0+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq);
+      //feq[TE] =  c1o54*rho*(1.0+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq);
+      //feq[BW] =  c1o54*rho*(1.0+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq);
+      //feq[BE] =  c1o54*rho*(1.0+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq);
+      //feq[TW] =  c1o54*rho*(1.0+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq);
+      //feq[TN] =  c1o54*rho*(1.0+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq);
+      //feq[BS] =  c1o54*rho*(1.0+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq);
+      //feq[BN] =  c1o54*rho*(1.0+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq);
+      //feq[TS] =  c1o54*rho*(1.0+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq);
+      //feq[TNE] = c1o216*rho*(1.0+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq);
+      //feq[BSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq);
+      //feq[BNE] = c1o216*rho*(1.0+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq);
+      //feq[TSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq);
+      //feq[TSE] = c1o216*rho*(1.0+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq);
+      //feq[BNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq);
+      //feq[BSE] = c1o216*rho*(1.0+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq);
+      //feq[TNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq);
+
+      //////////////////////////////////////////////////////////////////////////
+
+      LBMReal cu_sq = 1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
+      LBMReal rho = drho+one;
+
+      feq[ZERO] = c8o27*(drho+rho*(-cu_sq));
+      feq[E] = c2o27*(drho+rho*(3.0*(vx1)+c9o2*(vx1)*(vx1)-cu_sq));
+      feq[W] = c2o27*(drho+rho*(3.0*(-vx1)+c9o2*(-vx1)*(-vx1)-cu_sq));
+      feq[N] = c2o27*(drho+rho*(3.0*(vx2)+c9o2*(vx2)*(vx2)-cu_sq));
+      feq[S] = c2o27*(drho+rho*(3.0*(-vx2)+c9o2*(-vx2)*(-vx2)-cu_sq));
+      feq[T] = c2o27*(drho+rho*(3.0*(vx3)+c9o2*(vx3)*(vx3)-cu_sq));
+      feq[B] = c2o27*(drho+rho*(3.0*(-vx3)+c9o2*(-vx3)*(-vx3)-cu_sq));
+      feq[NE] = c1o54*(drho+rho*(3.0*(vx1+vx2)+c9o2*(vx1+vx2)*(vx1+vx2)-cu_sq));
+      feq[SW] = c1o54*(drho+rho*(3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq));
+      feq[SE] = c1o54*(drho+rho*(3.0*(vx1-vx2)+c9o2*(vx1-vx2)*(vx1-vx2)-cu_sq));
+      feq[NW] = c1o54*(drho+rho*(3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq));
+      feq[TE] = c1o54*(drho+rho*(3.0*(vx1+vx3)+c9o2*(vx1+vx3)*(vx1+vx3)-cu_sq));
+      feq[BW] = c1o54*(drho+rho*(3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq));
+      feq[BE] = c1o54*(drho+rho*(3.0*(vx1-vx3)+c9o2*(vx1-vx3)*(vx1-vx3)-cu_sq));
+      feq[TW] = c1o54*(drho+rho*(3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq));
+      feq[TN] = c1o54*(drho+rho*(3.0*(vx2+vx3)+c9o2*(vx2+vx3)*(vx2+vx3)-cu_sq));
+      feq[BS] = c1o54*(drho+rho*(3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq));
+      feq[BN] = c1o54*(drho+rho*(3.0*(vx2-vx3)+c9o2*(vx2-vx3)*(vx2-vx3)-cu_sq));
+      feq[TS] = c1o54*(drho+rho*(3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq));
+      feq[TNE] = c1o216*(drho+rho*(3.0*(vx1+vx2+vx3)+c9o2*(vx1+vx2+vx3)*(vx1+vx2+vx3)-cu_sq));
+      feq[BSW] = c1o216*(drho+rho*(3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq));
+      feq[BNE] = c1o216*(drho+rho*(3.0*(vx1+vx2-vx3)+c9o2*(vx1+vx2-vx3)*(vx1+vx2-vx3)-cu_sq));
+      feq[TSW] = c1o216*(drho+rho*(3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq));
+      feq[TSE] = c1o216*(drho+rho*(3.0*(vx1-vx2+vx3)+c9o2*(vx1-vx2+vx3)*(vx1-vx2+vx3)-cu_sq));
+      feq[BNW] = c1o216*(drho+rho*(3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq));
+      feq[BSE] = c1o216*(drho+rho*(3.0*(vx1-vx2-vx3)+c9o2*(vx1-vx2-vx3)*(vx1-vx2-vx3)-cu_sq));
+      feq[TNW] = c1o216*(drho+rho*(3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq));
    }
    //////////////////////////////////////////////////////////////////////////
    static LBMReal getIncompFeqForDirection(const int& direction,const LBMReal& drho, const LBMReal& vx1,const LBMReal& vx2,const LBMReal& vx3)	
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.cpp b/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.cpp
deleted file mode 100644
index 12c29819037e4c1696374dac7dbb9ff48a4cd804..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.cpp
+++ /dev/null
@@ -1,999 +0,0 @@
-#include "LBMKernelESD3Q27CCLB.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "D3Q27EsoTwist3DSplittedVector.h"
-#include <math.h>
-
-
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelESD3Q27CCLB::LBMKernelESD3Q27CCLB()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelESD3Q27CCLB::LBMKernelESD3Q27CCLB(int nx1, int nx2, int nx3, Grid3DPtr grid) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3),
-     grid(grid)
-{
-   this->compressible = false;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelESD3Q27CCLB::~LBMKernelESD3Q27CCLB(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelESD3Q27CCLB::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1, nx2, nx3, 0.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelESD3Q27CCLB::initNeighbours()
-{
-   int x1 = block.lock()->getX1();
-   int x2 = block.lock()->getX2();
-   int x3 = block.lock()->getX3();
-   int level = block.lock()->getLevel();
-
-   if(Block3DPtr block = grid->getBlock(x1+1,x2,x3,level))
-   {
-      blockN100L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN100NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }   
-   if(Block3DPtr block = grid->getBlock(x1,x2+1,x3,level))
-   {
-      blockN010L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN010NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   if(Block3DPtr block = grid->getBlock(x1,x2,x3+1,level))
-   {
-      blockN001L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN001NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   if(Block3DPtr block = grid->getBlock(x1+1,x2+1,x3,level))
-   {
-      blockN110L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN110NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   if(Block3DPtr block = grid->getBlock(x1,x2+1,x3+1,level))
-   {
-      blockN011L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN011NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   if(Block3DPtr block = grid->getBlock(x1+1,x2,x3+1,level))
-   {
-      blockN101L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN101NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   if(Block3DPtr block = grid->getBlock(x1+1,x2+1,x3+1,level))
-   {
-      blockN111L = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      blockN111NL = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(block->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-
-   UbTupleInt3 blockNX = grid->getBlockNX();
-   blockNX1 = val<1>(blockNX);
-   blockNX2 = val<2>(blockNX);
-   blockNX3 = val<3>(blockNX);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelESD3Q27CCLB::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelESD3Q27CCLB(nx1, nx2, nx3, grid));
-   kernel->setBlock(this->getBlock());
-   boost::dynamic_pointer_cast<LBMKernelESD3Q27CCLB>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelESD3Q27CCLB::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelESD3Q27CCLB::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = 0;//ghostLayerWidth;
-   int minX2 = 0;//ghostLayerWidth;
-   int minX3 = 0;//ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1;//-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2;//-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3;//-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////
-
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-//////////////////////////////////////////////////////////////////////////
-               //CbArray4D<LBMReal,IndexerX4X3X2X1>* temp = (localDistributions.get())+1;
-               //CbArray4D<LBMReal,IndexerX4X3X2X1>* temp = (localDistributions.get())+1;
-
-               PxL = localDistributions;
-               PxNL = nonLocalDistributions;
-               PxyL = localDistributions;
-               PxyNL = nonLocalDistributions;
-               PxzL = localDistributions;
-               PxzNL = nonLocalDistributions;
-               //PxyzL = localDistributions;
-               PxyzNL = nonLocalDistributions;
-               PyL = localDistributions;
-               PyNL = nonLocalDistributions;
-               PzL = localDistributions;
-               PzNL = nonLocalDistributions;
-               PyzL = localDistributions;
-               PyzNL = nonLocalDistributions;
-               int x1p=x1+1;
-               int x2p=x2+1;
-               int x3p=x3+1;
-
-
-               if (x1+1 >= blockNX1)
-               {
-                  x1p=1;
-                  PxL = blockN100L;
-                  PxNL = blockN100NL;
-                  PxyL = blockN100L;
-                  PxyNL = blockN100NL;
-                  PxzL = blockN100L;
-                  PxzNL = blockN100NL;
-                  //PxyzL = blockN100L;
-                  PxyzNL = blockN100NL;
-                  
-
-               }
-               if (x2+1 >= blockNX2)
-               {
-                  x2p=1;
-                  PyL = blockN010L;
-                  PyNL = blockN010NL;
-                  if(x1+1 >= blockNX1){
-                     PxyL = blockN110L;
-                     PxyNL = blockN110NL;
-                     //PxyzL = blockN110L;
-                     PxyzNL = blockN110NL;
-                  }
-               }
-               if (x3+1 >= blockNX3)
-               {
-                  x3p=1;
-                  PzL = blockN001L;
-                  PzNL = blockN001NL;
-                  if(x1+1 >= blockNX1){
-                     PxzL = blockN101L;
-                     PxzNL = blockN101NL;
-                        if (x2+1 >= blockNX2)
-                           {
-                              //PxyzL = blockN111L;
-                              PxyzNL = blockN111NL;
-                           }
-                  }
-                  if (x2+1 >= blockNX2)
-                  {
-                     PyzL = blockN011L;
-                     PyzNL = blockN011NL;
-                  }
-               }
-              
-               //PxL = CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr(localDistributions.get() + (x1+1)/blockNX1 * (-localDistributions.get() + blockN100L.get()));
-
-               LBMReal mfaaa = (*PxyzNL)(D3Q27System::ET_BSW,x1p,x2p,x3p); 
-               LBMReal mfaab = (*PxyNL)(D3Q27System::ET_SW,x1p,x2p,x3 );
-               LBMReal mfaac = (*PxyL)(D3Q27System::ET_TSW,x1p,x2p,x3);
-               LBMReal mfaba = (*PxzNL)(D3Q27System::ET_BW,x1p,x2,x3p );
-               LBMReal mfabb = (*PxNL)(D3Q27System::ET_W,x1p,x2,x3  );
-               LBMReal mfabc = (*PxL)(D3Q27System::ET_TW, x1p,x2,x3);
-               LBMReal mfbaa = (*PyzNL)(D3Q27System::ET_BS,x1,x2p,x3p );
-               LBMReal mfbab = (*PyNL)(D3Q27System::ET_S,x1,x2p,x3  );
-               LBMReal mfbac = (*PyL)(D3Q27System::ET_TS,x1,x2p,x3);
-               LBMReal mfbba = (*PzNL)(D3Q27System::ET_B,x1,x2,x3p  );
-               LBMReal mfbbb = (*zeroDistributions)(x1,x2,x3);
-               LBMReal mfbbc = (*localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               LBMReal mfaca = (*PxzNL)(D3Q27System::ET_BNW,x1p,x2,x3p);
-               LBMReal mfacb = (*PxL)(D3Q27System::ET_NW,x1p,x2,x3);
-               LBMReal mfacc = (*PxL)(D3Q27System::ET_TNW,x1p,x2,x3);
-               LBMReal mfcaa = (*PyzNL)(D3Q27System::ET_BSE,x1,x2p,x3p);
-               LBMReal mfcab = (*PyNL)(D3Q27System::ET_SE,x1,x2p,x3 );
-               LBMReal mfcac = (*PyL)(D3Q27System::ET_TSE,x1,x2p,x3);
-               LBMReal mfcca = (*PzNL)(D3Q27System::ET_BNE,x1,x2,x3p);
-               LBMReal mfccb = (*localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               LBMReal mfccc = (*localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               LBMReal mfbca = (*PzNL)(D3Q27System::ET_BN,x1,x2,x3p );
-               LBMReal mfbcb = (*localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
-               LBMReal mfbcc = (*localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               LBMReal mfcba = (*PzNL)(D3Q27System::ET_BE,x1,x2,x3p );
-               LBMReal mfcbb = (*localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               LBMReal mfcbc = (*localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               LBMReal m0, m1, m2;
-
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               LBMReal oMdrho;
-               {
-                  oMdrho=mfccc+mfaaa;
-                  m0=mfaca+mfcac;
-                  m1=mfacc+mfcaa;
-                  m2=mfaac+mfcca;
-                  oMdrho+=m0;
-                  m1+=m2;
-                  oMdrho+=m1;
-                  m0=mfbac+mfbca;
-                  m1=mfbaa+mfbcc;
-                  m0+=m1;
-                  m1=mfabc+mfcba;
-                  m2=mfaba+mfcbc;
-                  m1+=m2;
-                  m0+=m1;
-                  m1=mfacb+mfcab;
-                  m2=mfaab+mfccb;
-                  m1+=m2;
-                  m0+=m1;
-                  oMdrho+=m0;
-                  m0=mfabb+mfcbb;
-                  m1=mfbab+mfbcb;
-                  m2=mfbba+mfbbc;
-                  m0+=m1+m2;
-                  m0+=mfbbb; //hat gefehlt
-                  oMdrho = 1. - (oMdrho + m0);
-               }
-               LBMReal vx2;
-               LBMReal vy2;
-               LBMReal vz2;
-
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               //LBMReal s9 = minusomega;
-               //test
-               //s9 = 0.;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               LBMReal OxyyMxzz  = 1.;//2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               {
-                  LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-                  LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-                  LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-
-                  //relax
-                  mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-                  mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-                  mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               }
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// Cumulants
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                     +" dif="+UbSystem::toString(dif)
-                     +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelESD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
-               (*localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
-               (*localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
-               (*localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
-               (*PxL)(D3Q27System::ET_NW,x1p,x2,  x3)   = mfcab;
-               (*localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
-               (*PxL)(D3Q27System::ET_TW,x1p,x2,  x3)   = mfcba;
-               (*localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
-               (*PyL)(D3Q27System::ET_TS,x1,  x2p,x3)   = mfbca;
-               (*localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
-               (*PxL)(D3Q27System::ET_TNW,x1p,x2,  x3)  = mfcaa;
-               (*PyL)(D3Q27System::ET_TSE,x1,  x2p,x3)  = mfaca;
-               (*PxyL)(D3Q27System::ET_TSW,x1p,x2p,x3)  = mfcca;
-
-               (*PxNL)(D3Q27System::ET_W,x1p,x2,  x3    ) = mfcbb;
-               (*PyNL)(D3Q27System::ET_S,x1,  x2p,x3    ) = mfbcb;
-               (*PzNL)(D3Q27System::ET_B,x1,  x2,  x3p  ) = mfbbc;
-               (*PxyNL)(D3Q27System::ET_SW,x1p,x2p,x3   ) = mfccb;
-               (*PyNL)(D3Q27System::ET_SE,x1,  x2p,x3   ) = mfacb;
-               (*PxzNL)(D3Q27System::ET_BW,x1p,x2,  x3p ) = mfcbc;
-               (*PzNL)(D3Q27System::ET_BE,x1,  x2,  x3p ) = mfabc;
-               (*PyzNL)(D3Q27System::ET_BS,x1,  x2p,x3p ) = mfbcc;
-               (*PzNL)(D3Q27System::ET_BN,x1,  x2,  x3p ) = mfbac;
-               (*PxyzNL)(D3Q27System::ET_BSW,x1p,x2p,x3p) = mfccc;
-               (*PyzNL)(D3Q27System::ET_BSE,x1,  x2p,x3p) = mfacc;
-               (*PxzNL)(D3Q27System::ET_BNW,x1p,x2,  x3p) = mfcac;
-               (*PzNL)(D3Q27System::ET_BNE,x1,  x2,  x3p) = mfaac;
-
-               (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelESD3Q27CCLB::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
-
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.h b/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.h
deleted file mode 100644
index 616d83d70666c07311e4bdcbc7105ad8e9bcc518..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelESD3Q27CCLB.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//Cascaded Cumulant LBM
-
-#ifndef LBMKernelESD3Q27CCLB_H
-#define LBMKernelESD3Q27CCLB_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-#include "Grid3D.h"
-
-
-class LBMKernelESD3Q27CCLB;
-typedef boost::shared_ptr<LBMKernelESD3Q27CCLB> LBMKernelESD3Q27CCLBPtr;
-
-
-class LBMKernelESD3Q27CCLB :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelESD3Q27CCLB();
-   LBMKernelESD3Q27CCLB(int nx1, int nx2, int nx3, Grid3DPtr grid);
-   ~LBMKernelESD3Q27CCLB(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-   void initNeighbours();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-   }
-
-   void collideAll();  
-
-   void init();
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal M_zXX, M_zYY, M_zZZ, M_zXY,    M_zXZ,  M_zYZ,
-      M_zXXY,    M_zXYY,    M_zXXZ,    M_zXZZ,   M_zYYZ,  M_zYZZ,  M_zXYZ,
-      M_zXXYY,   M_zXXZZ,   M_zYYZZ,   M_zXXYZ,  M_zXYYZ,  M_zXYZZ,
-      M_zXXYYZ,  M_zXXYZZ,  M_zXYYZZ,  M_zXXYYZZ;
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-      mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-   LBMReal MXXpMYYpMZZ,MXXmMYY, MXXmMZZ,
-      MXXYpMYZZ,MXXZpMYYZ,MXYYpMXZZ,  MXXYmMYZZ,MXXZmMYYZ,MXYYmMXZZ,
-      MXXYYppp,MXXYYpm2p, MXXYYppm2;
-   UbTimer timer;
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   mu::value_type muX1,muX2,muX3;
-   mu::value_type muDeltaT;
-   mu::value_type muNue;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-   Grid3DPtr grid;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr blockN100L, blockN010L, blockN001L, blockN110L, blockN011L, blockN101L, blockN111L;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr blockN100NL, blockN010NL, blockN001NL, blockN110NL, blockN011NL, blockN101NL, blockN111NL;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr PxL, PxyL, PxyzL, PyL, PyzL, PxzL, PzL;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr PxNL, PxyNL, PxyzNL, PyNL, PyzNL, PxzNL, PzNL;
-   int blockNX1, blockNX2, blockNX3;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp
deleted file mode 100644
index 9466a4fcad9cb5e29ffc6372c0ff86456ea1e094..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.cpp
+++ /dev/null
@@ -1,580 +0,0 @@
-#include "LBMKernelETD3Q27BGK.h"
-#include "D3Q27System.h"
-#include "D3Q27EsoTwist3DSplittedVector.h"
-#include "D3Q27EsoTwist3DSoA.h"
-
-//#define PROOF_CORRECTNESS
-
-LBMKernelETD3Q27BGK::LBMKernelETD3Q27BGK(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27BGK::LBMKernelETD3Q27BGK(int nx1, int nx2, int nx3, bool compressible) : 
-                                         LBMKernelETD3Q27(nx1, nx2, nx3)
-{
-   this->compressible = compressible;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27BGK::~LBMKernelETD3Q27BGK(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27BGK::init()
-{
-   int ghostLayerWitdh = this->getGhostLayerWidth();
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSoA(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27BGK::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27BGK(nx1, nx2, nx3, this->compressible));
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27BGK>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27BGK::calculate()
-{
-   if(this->compressible)
-      collideAllCompressible();
-   else
-      collideAllIncompressible();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27BGK::collideAllCompressible()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   ///////////////////////////////////
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   //Distributions d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-   
-   D3Q27BoundaryConditionPtr bcPtr;
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal feq[D3Q27System::ENDF+1];
-   LBMReal rho,vx1,vx2,vx3;
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               int x1p = x1 + 1;
-               int x2p = x2 + 1;
-               int x3p = x3 + 1;
-
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               f[ZERO] = (*this->zeroDistributions)(x1,x2,x3);
-
-               f[E] = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               f[N] = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3);  
-               f[T] = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               f[NE] = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               f[NW] = (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,x3);
-               f[TE] = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               f[TW] = (*this->localDistributions)(D3Q27System::ET_TW, x1p,x2,x3);
-               f[TN] = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               f[TS] = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2p,x3);
-               f[TNE] = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               f[TNW] = (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,x3);
-               f[TSE] = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2p,x3);
-               f[TSW] = (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3);
-
-               f[W ] = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,x3  );
-               f[S ] = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2p,x3  );
-               f[B ] = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3p  );
-               f[SW] = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3 );
-               f[SE] = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2p,x3 );
-               f[BW] = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,x3p );
-               f[BE] = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3p );
-               f[BS] = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2p,x3p );
-               f[BN] = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3p );
-               f[BSW] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p);
-               f[BSE] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2p,x3p);
-               f[BNW] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,x3p);
-               f[BNE] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3p);
-
-               //////////////////////////////////////////////////////////////////////////
-                  
-               rho = ((f[TNE] + f[BSW])+(f[TSE]+f[BNW]))+((f[BSE]+f[TNW])+ (f[TSW]+f[BNE]))
-                    +(((f[NE] + f[SW]) + (f[SE] + f[NW]))+((f[TE] + f[BW])+(f[BE]+ f[TW]))
-                    +((f[BN] + f[TS]) + (f[TN] + f[BS])))+((f[E] + f[W])+(f[N] + f[S])
-                    +(f[T] + f[B]))+f[ZERO];
-
-               vx1 = ((((f[TNE]-f[BSW]) + (f[TSE]-f[BNW])) + ((f[BSE]-f[TNW]) + (f[BNE]-f[TSW]))) +
-                  (((f[BE]-f[TW]) + (f[TE]-f[BW])) + ((f[SE]-f[NW]) + (f[NE]-f[SW]))) +
-                  (f[E]-f[W])); 
-
-               vx2 = ((((f[TNE]-f[BSW]) + (f[BNW]-f[TSE])) + ((f[TNW]-f[BSE]) + (f[BNE]-f[TSW]))) +
-                  (((f[BN]-f[TS]) + (f[TN]-f[BS])) + ((f[NW]-f[SE]) + (f[NE]-f[SW]))) +
-                  (f[N]-f[S])); 
-
-               vx3 = ((((f[TNE]-f[BSW]) + (f[TSE]-f[BNW])) + ((f[TNW]-f[BSE]) + (f[TSW]-f[BNE]))) +
-                  (((f[TS]-f[BN]) + (f[TN]-f[BS])) + ((f[TW]-f[BE]) + (f[TE]-f[BW]))) +
-                  (f[T]-f[B]));
-
-               vx1/=rho;
-               vx2/=rho;
-               vx3/=rho;
-
-               LBMReal cu_sq=1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
-
-               feq[ZERO] =  c8o27*rho*(1.0-cu_sq);
-               feq[E] =   c2o27*rho*(1.0+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq);
-               feq[W] =   c2o27*rho*(1.0+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq);
-               feq[N] =   c2o27*rho*(1.0+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq);
-               feq[S] =   c2o27*rho*(1.0+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq);
-               feq[T] =   c2o27*rho*(1.0+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq);
-               feq[B] =   c2o27*rho*(1.0+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq);
-               feq[NE] =  c1o54*rho*(1.0+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq);
-               feq[SW] =  c1o54*rho*(1.0+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq);
-               feq[SE] =  c1o54*rho*(1.0+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq);
-               feq[NW] =  c1o54*rho*(1.0+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq);
-               feq[TE] =  c1o54*rho*(1.0+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq);
-               feq[BW] =  c1o54*rho*(1.0+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq);
-               feq[BE] =  c1o54*rho*(1.0+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq);
-               feq[TW] =  c1o54*rho*(1.0+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq);
-               feq[TN] =  c1o54*rho*(1.0+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq);
-               feq[BS] =  c1o54*rho*(1.0+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq);
-               feq[BN] =  c1o54*rho*(1.0+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq);
-               feq[TS] =  c1o54*rho*(1.0+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq);
-               feq[TNE] = c1o216*rho*(1.0+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq);
-               feq[BSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq);
-               feq[BNE] = c1o216*rho*(1.0+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq);
-               feq[TSW] = c1o216*rho*(1.0+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq);
-               feq[TSE] = c1o216*rho*(1.0+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq);
-               feq[BNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq);
-               feq[BSE] = c1o216*rho*(1.0+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq);
-               feq[TNW] = c1o216*rho*(1.0+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq);
-                  
-               //Relaxation
-               f[ZERO] += (feq[ZERO]-f[ZERO])*collFactor;
-               f[E] += (feq[E]-f[E])*collFactor;
-               f[W] += (feq[W]-f[W])*collFactor;
-               f[N] += (feq[N]-f[N])*collFactor;
-               f[S] += (feq[S]-f[S])*collFactor;
-               f[T] += (feq[T]-f[T])*collFactor;
-               f[B] += (feq[B]-f[B])*collFactor;
-               f[NE] += (feq[NE]-f[NE])*collFactor;
-               f[SW] += (feq[SW]-f[SW])*collFactor;
-               f[SE] += (feq[SE]-f[SE])*collFactor;
-               f[NW] += (feq[NW]-f[NW])*collFactor;
-               f[TE] += (feq[TE]-f[TE])*collFactor;
-               f[BW] += (feq[BW]-f[BW])*collFactor;
-               f[BE] += (feq[BE]-f[BE])*collFactor;
-               f[TW] += (feq[TW]-f[TW])*collFactor;
-               f[TN] += (feq[TN]-f[TN])*collFactor;
-               f[BS] += (feq[BS]-f[BS])*collFactor;
-               f[BN] += (feq[BN]-f[BN])*collFactor;
-               f[TS] += (feq[TS]-f[TS])*collFactor;
-
-               f[TNE] += (feq[TNE]-f[TNE])*collFactor;
-               f[BSW] += (feq[BSW]-f[BSW])*collFactor;
-               f[BNE] += (feq[BNE]-f[BNE])*collFactor;
-               f[TSW] += (feq[TSW]-f[TSW])*collFactor;
-               f[TSE] += (feq[TSE]-f[TSE])*collFactor;
-               f[BNW] += (feq[BNW]-f[BNW])*collFactor;
-               f[BSE] += (feq[BSE]-f[BSE])*collFactor;
-               f[TNW] += (feq[TNW]-f[TNW])*collFactor;
-
-               //////////////////////////////////////////////////////////////////////////
-               //forcing
-               //////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = x1+ix1*bcArrayMaxX1;
-                  muX2 = x2+ix2*bcArrayMaxX2;
-                  muX3 = x3+ix3*bcArrayMaxX3;
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  f[ZERO] +=                   0.0                        ;
-                  f[E  ] +=  3.0*c2o27  *  (forcingX1)                    ;
-                  f[W  ] +=  3.0*c2o27  *  (-forcingX1)                   ;
-                  f[N  ] +=  3.0*c2o27  *             (forcingX2)         ;
-                  f[S  ] +=  3.0*c2o27  *             (-forcingX2)        ;
-                  f[T  ] +=  3.0*c2o27  *                     (forcingX3) ;
-                  f[B  ] +=  3.0*c2o27  *                     (-forcingX3);
-                  f[NE ] +=  3.0*c1o54 * ( forcingX1+forcingX2          ) ;
-                  f[SW ] +=  3.0*c1o54 * (-forcingX1-forcingX2          ) ;
-                  f[SE ] +=  3.0*c1o54 * ( forcingX1-forcingX2          ) ;
-                  f[NW ] +=  3.0*c1o54 * (-forcingX1+forcingX2          ) ;
-                  f[TE ] +=  3.0*c1o54 * ( forcingX1          +forcingX3) ;
-                  f[BW ] +=  3.0*c1o54 * (-forcingX1          -forcingX3) ;
-                  f[BE ] +=  3.0*c1o54 * ( forcingX1          -forcingX3) ;
-                  f[TW ] +=  3.0*c1o54 * (-forcingX1          +forcingX3) ;
-                  f[TN ] +=  3.0*c1o54 * (           forcingX2+forcingX3) ;
-                  f[BS ] +=  3.0*c1o54 * (          -forcingX2-forcingX3) ;
-                  f[BN ] +=  3.0*c1o54 * (           forcingX2-forcingX3) ;
-                  f[TS ] +=  3.0*c1o54 * (          -forcingX2+forcingX3) ;
-                  f[TNE] +=  3.0*c1o216* ( forcingX1+forcingX2+forcingX3) ;
-                  f[BSW] +=  3.0*c1o216* (-forcingX1-forcingX2-forcingX3) ;
-                  f[BNE] +=  3.0*c1o216* ( forcingX1+forcingX2-forcingX3) ;
-                  f[TSW] +=  3.0*c1o216* (-forcingX1-forcingX2+forcingX3) ;
-                  f[TSE] +=  3.0*c1o216* ( forcingX1-forcingX2+forcingX3) ;
-                  f[BNW] +=  3.0*c1o216* (-forcingX1+forcingX2-forcingX3) ;
-                  f[BSE] +=  3.0*c1o216* ( forcingX1-forcingX2-forcingX3) ;
-                  f[TNW] +=  3.0*c1o216* (-forcingX1+forcingX2+forcingX3) ;
-               }
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = ((f[TNE] + f[BSW])+(f[TSE]+f[BNW]))+((f[BSE]+f[TNW])+ (f[TSW]+f[BNE]))
-                                 +(((f[NE] + f[SW]) + (f[SE] + f[NW]))+((f[TE] + f[BW])+(f[BE]+ f[TW]))
-                                 +((f[BN] + f[TS]) + (f[TN] + f[BS])))+((f[E] + f[W])+(f[N] + f[S])
-                                 +(f[T] + f[B]))+f[ZERO];
-
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho is not correct, dif = " + UbSystem::toString(dif)));
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[D3Q27System::INV_E];
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[D3Q27System::INV_N];
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[D3Q27System::INV_T];
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[D3Q27System::INV_NE];
-               (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3) = f[D3Q27System::INV_NW];
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[D3Q27System::INV_TE];
-               (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3) = f[D3Q27System::INV_TW];
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[D3Q27System::INV_TN];
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3) = f[D3Q27System::INV_TS];
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[D3Q27System::INV_TNE];
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3) = f[D3Q27System::INV_TNW];
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3) = f[D3Q27System::INV_TSE];
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3) = f[D3Q27System::INV_TSW];
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = f[D3Q27System::INV_W ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = f[D3Q27System::INV_S ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = f[D3Q27System::INV_B ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = f[D3Q27System::INV_SW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = f[D3Q27System::INV_SE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = f[D3Q27System::INV_BW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = f[D3Q27System::INV_BE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = f[D3Q27System::INV_BS];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = f[D3Q27System::INV_BN];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = f[D3Q27System::INV_BSW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = f[D3Q27System::INV_BSE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = f[D3Q27System::INV_BNW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = f[D3Q27System::INV_BNE];
-
-               (*this->zeroDistributions)(x1,x2,x3) = f[D3Q27System::ZERO];
-
-
-              //////////////////////////////////////////////////////////////////////////
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27BGK::collideAllIncompressible()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-      forcingX1 = 0;
-      forcingX2 = 0;
-      forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-   D3Q27BoundaryConditionPtr bcPtr;
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal feq[D3Q27System::ENDF+1];
-   LBMReal drho,vx1,vx2,vx3;
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               int x1p = x1 + 1;
-               int x2p = x2 + 1;
-               int x3p = x3 + 1;
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               f[ZERO] = (*this->zeroDistributions)(x1,x2,x3);
-
-               f[E] = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               f[N] = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3);  
-               f[T] = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               f[NE] = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               f[NW] = (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,x3);
-               f[TE] = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               f[TW] = (*this->localDistributions)(D3Q27System::ET_TW, x1p,x2,x3);
-               f[TN] = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               f[TS] = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2p,x3);
-               f[TNE] = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               f[TNW] = (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,x3);
-               f[TSE] = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2p,x3);
-               f[TSW] = (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3);
-
-               f[W ] = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,x3  );
-               f[S ] = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2p,x3  );
-               f[B ] = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3p  );
-               f[SW] = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3 );
-               f[SE] = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2p,x3 );
-               f[BW] = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,x3p );
-               f[BE] = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3p );
-               f[BS] = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2p,x3p );
-               f[BN] = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3p );
-               f[BSW] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p);
-               f[BSE] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2p,x3p);
-               f[BNW] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,x3p);
-               f[BNE] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3p);
-               //////////////////////////////////////////////////////////////////////////
-
-               drho = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-
-               vx1 = f[E] - f[W] + f[NE] - f[SW] + f[SE] - f[NW] + f[TE] - f[BW]
-               + f[BE] - f[TW] + f[TNE] - f[TSW] + f[TSE] - f[TNW] + f[BNE] - f[BSW]
-               + f[BSE] - f[BNW]; 
-
-               vx2 = f[N] - f[S] + f[NE] - f[SW] - f[SE] + f[NW] + f[TN] - f[BS] + f[BN]
-               - f[TS] + f[TNE] - f[TSW] - f[TSE] + f[TNW] + f[BNE] - f[BSW] - f[BSE] 
-               + f[BNW]; 
-
-               vx3 = f[T] - f[B] + f[TE] - f[BW] - f[BE] + f[TW] + f[TN] - f[BS] - f[BN] 
-               + f[TS] + f[TNE] + f[TSW] + f[TSE] + f[TNW] - f[BNE] - f[BSW] - f[BSE] 
-               - f[BNW];
-
-               LBMReal cu_sq=1.5*(vx1*vx1+vx2*vx2+vx3*vx3);
-
-               feq[ZERO] =  c8o27*(drho-cu_sq);
-               feq[E] =  c2o27*(drho+3.0*( vx1   )+c9o2*( vx1   )*( vx1   )-cu_sq);
-               feq[W] =  c2o27*(drho+3.0*(-vx1   )+c9o2*(-vx1   )*(-vx1   )-cu_sq);
-               feq[N] =  c2o27*(drho+3.0*(    vx2)+c9o2*(    vx2)*(    vx2)-cu_sq);
-               feq[S] =  c2o27*(drho+3.0*(   -vx2)+c9o2*(   -vx2)*(   -vx2)-cu_sq);
-               feq[T] =  c2o27*(drho+3.0*( vx3   )+c9o2*(    vx3)*(    vx3)-cu_sq);
-               feq[B] =  c2o27*(drho+3.0*(   -vx3)+c9o2*(   -vx3)*(   -vx3)-cu_sq);
-               feq[NE] = c1o54*(drho+3.0*( vx1+vx2)+c9o2*( vx1+vx2)*( vx1+vx2)-cu_sq);
-               feq[SW] = c1o54*(drho+3.0*(-vx1-vx2)+c9o2*(-vx1-vx2)*(-vx1-vx2)-cu_sq);
-               feq[SE] = c1o54*(drho+3.0*( vx1-vx2)+c9o2*( vx1-vx2)*( vx1-vx2)-cu_sq);
-               feq[NW] = c1o54*(drho+3.0*(-vx1+vx2)+c9o2*(-vx1+vx2)*(-vx1+vx2)-cu_sq);
-               feq[TE] = c1o54*(drho+3.0*( vx1+vx3)+c9o2*( vx1+vx3)*( vx1+vx3)-cu_sq);
-               feq[BW] = c1o54*(drho+3.0*(-vx1-vx3)+c9o2*(-vx1-vx3)*(-vx1-vx3)-cu_sq);
-               feq[BE] = c1o54*(drho+3.0*( vx1-vx3)+c9o2*( vx1-vx3)*( vx1-vx3)-cu_sq);
-               feq[TW] = c1o54*(drho+3.0*(-vx1+vx3)+c9o2*(-vx1+vx3)*(-vx1+vx3)-cu_sq);
-               feq[TN] = c1o54*(drho+3.0*( vx2+vx3)+c9o2*( vx2+vx3)*( vx2+vx3)-cu_sq);
-               feq[BS] = c1o54*(drho+3.0*(-vx2-vx3)+c9o2*(-vx2-vx3)*(-vx2-vx3)-cu_sq);
-               feq[BN] = c1o54*(drho+3.0*( vx2-vx3)+c9o2*( vx2-vx3)*( vx2-vx3)-cu_sq);
-               feq[TS] = c1o54*(drho+3.0*(-vx2+vx3)+c9o2*(-vx2+vx3)*(-vx2+vx3)-cu_sq);
-               feq[TNE]= c1o216*(drho+3.0*( vx1+vx2+vx3)+c9o2*( vx1+vx2+vx3)*( vx1+vx2+vx3)-cu_sq);
-               feq[BSW]= c1o216*(drho+3.0*(-vx1-vx2-vx3)+c9o2*(-vx1-vx2-vx3)*(-vx1-vx2-vx3)-cu_sq);
-               feq[BNE]= c1o216*(drho+3.0*( vx1+vx2-vx3)+c9o2*( vx1+vx2-vx3)*( vx1+vx2-vx3)-cu_sq);
-               feq[TSW]= c1o216*(drho+3.0*(-vx1-vx2+vx3)+c9o2*(-vx1-vx2+vx3)*(-vx1-vx2+vx3)-cu_sq);
-               feq[TSE]= c1o216*(drho+3.0*( vx1-vx2+vx3)+c9o2*( vx1-vx2+vx3)*( vx1-vx2+vx3)-cu_sq);
-               feq[BNW]= c1o216*(drho+3.0*(-vx1+vx2-vx3)+c9o2*(-vx1+vx2-vx3)*(-vx1+vx2-vx3)-cu_sq);
-               feq[BSE]= c1o216*(drho+3.0*( vx1-vx2-vx3)+c9o2*( vx1-vx2-vx3)*( vx1-vx2-vx3)-cu_sq);
-               feq[TNW]= c1o216*(drho+3.0*(-vx1+vx2+vx3)+c9o2*(-vx1+vx2+vx3)*(-vx1+vx2+vx3)-cu_sq);
-
-               //Relaxation
-               f[ZERO] += (feq[ZERO]-f[ZERO])*collFactor;
-               f[E] += (feq[E]-f[E])*collFactor;
-               f[W] += (feq[W]-f[W])*collFactor;
-               f[N] += (feq[N]-f[N])*collFactor;
-               f[S] += (feq[S]-f[S])*collFactor;
-               f[T] += (feq[T]-f[T])*collFactor;
-               f[B] += (feq[B]-f[B])*collFactor;
-               f[NE] += (feq[NE]-f[NE])*collFactor;
-               f[SW] += (feq[SW]-f[SW])*collFactor;
-               f[SE] += (feq[SE]-f[SE])*collFactor;
-               f[NW] += (feq[NW]-f[NW])*collFactor;
-               f[TE] += (feq[TE]-f[TE])*collFactor;
-               f[BW] += (feq[BW]-f[BW])*collFactor;
-               f[BE] += (feq[BE]-f[BE])*collFactor;
-               f[TW] += (feq[TW]-f[TW])*collFactor;
-               f[TN] += (feq[TN]-f[TN])*collFactor;
-               f[BS] += (feq[BS]-f[BS])*collFactor;
-               f[BN] += (feq[BN]-f[BN])*collFactor;
-               f[TS] += (feq[TS]-f[TS])*collFactor;
-
-               f[TNE] += (feq[TNE]-f[TNE])*collFactor;
-               f[BSW] += (feq[BSW]-f[BSW])*collFactor;
-               f[BNE] += (feq[BNE]-f[BNE])*collFactor;
-               f[TSW] += (feq[TSW]-f[TSW])*collFactor;
-               f[TSE] += (feq[TSE]-f[TSE])*collFactor;
-               f[BNW] += (feq[BNW]-f[BNW])*collFactor;
-               f[BSE] += (feq[BSE]-f[BSE])*collFactor;
-               f[TNW] += (feq[TNW]-f[TNW])*collFactor;
-
-               //////////////////////////////////////////////////////////////////////////
-               //forcing
-               if (withForcing)
-               {
-                  muX1 = x1+ix1*bcArrayMaxX1;
-                  muX2 = x2+ix2*bcArrayMaxX2;
-                  muX3 = x3+ix3*bcArrayMaxX3;
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  f[ZERO] +=                   0.0                        ;
-                  f[E  ] +=  3.0*c2o27  *  (forcingX1)                    ;
-                  f[W  ] +=  3.0*c2o27  *  (-forcingX1)                   ;
-                  f[N  ] +=  3.0*c2o27  *             (forcingX2)         ;
-                  f[S  ] +=  3.0*c2o27  *             (-forcingX2)        ;
-                  f[T  ] +=  3.0*c2o27  *                     (forcingX3) ;
-                  f[B  ] +=  3.0*c2o27  *                     (-forcingX3);
-                  f[NE ] +=  3.0*c1o54 * ( forcingX1+forcingX2          ) ;
-                  f[SW ] +=  3.0*c1o54 * (-forcingX1-forcingX2          ) ;
-                  f[SE ] +=  3.0*c1o54 * ( forcingX1-forcingX2          ) ;
-                  f[NW ] +=  3.0*c1o54 * (-forcingX1+forcingX2          ) ;
-                  f[TE ] +=  3.0*c1o54 * ( forcingX1          +forcingX3) ;
-                  f[BW ] +=  3.0*c1o54 * (-forcingX1          -forcingX3) ;
-                  f[BE ] +=  3.0*c1o54 * ( forcingX1          -forcingX3) ;
-                  f[TW ] +=  3.0*c1o54 * (-forcingX1          +forcingX3) ;
-                  f[TN ] +=  3.0*c1o54 * (           forcingX2+forcingX3) ;
-                  f[BS ] +=  3.0*c1o54 * (          -forcingX2-forcingX3) ;
-                  f[BN ] +=  3.0*c1o54 * (           forcingX2-forcingX3) ;
-                  f[TS ] +=  3.0*c1o54 * (          -forcingX2+forcingX3) ;
-                  f[TNE] +=  3.0*c1o216* ( forcingX1+forcingX2+forcingX3) ;
-                  f[BSW] +=  3.0*c1o216* (-forcingX1-forcingX2-forcingX3) ;
-                  f[BNE] +=  3.0*c1o216* ( forcingX1+forcingX2-forcingX3) ;
-                  f[TSW] +=  3.0*c1o216* (-forcingX1-forcingX2+forcingX3) ;
-                  f[TSE] +=  3.0*c1o216* ( forcingX1-forcingX2+forcingX3) ;
-                  f[BNW] +=  3.0*c1o216* (-forcingX1+forcingX2-forcingX3) ;
-                  f[BSE] +=  3.0*c1o216* ( forcingX1-forcingX2-forcingX3) ;
-                  f[TNW] +=  3.0*c1o216* (-forcingX1+forcingX2+forcingX3) ;
-               }
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-               LBMReal dif = drho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho is not correct"));
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[D3Q27System::INV_E];
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[D3Q27System::INV_N];
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[D3Q27System::INV_T];
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[D3Q27System::INV_NE];
-               (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3) = f[D3Q27System::INV_NW];
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[D3Q27System::INV_TE];
-               (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3) = f[D3Q27System::INV_TW];
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[D3Q27System::INV_TN];
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3) = f[D3Q27System::INV_TS];
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[D3Q27System::INV_TNE];
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3) = f[D3Q27System::INV_TNW];
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3) = f[D3Q27System::INV_TSE];
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3) = f[D3Q27System::INV_TSW];
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = f[D3Q27System::INV_W ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = f[D3Q27System::INV_S ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = f[D3Q27System::INV_B ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = f[D3Q27System::INV_SW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = f[D3Q27System::INV_SE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = f[D3Q27System::INV_BW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = f[D3Q27System::INV_BE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = f[D3Q27System::INV_BS];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = f[D3Q27System::INV_BN];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = f[D3Q27System::INV_BSW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = f[D3Q27System::INV_BSE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = f[D3Q27System::INV_BNW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = f[D3Q27System::INV_BNE];
-
-               (*this->zeroDistributions)(x1,x2,x3) = f[D3Q27System::ZERO];
-               //////////////////////////////////////////////////////////////////////////
-
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27BGK::getCallculationTime()
-{
-   return 0;
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.h
deleted file mode 100644
index c3a7c3c31bb932794563baa3ba9be4c977c34800..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27BGK.h
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef LBMKERNELETD3Q27BGK_H
-#define LBMKERNELETD3Q27BGK_H
-
-#include "LBMKernelETD3Q27.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-#include <boost/serialization/export.hpp>
-
-class LBMKernelETD3Q27BGK;
-typedef boost::shared_ptr<LBMKernelETD3Q27BGK> LBMKernelETD3Q27BGKPtr;
-
-class LBMKernelETD3Q27BGK :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27BGK();
-   LBMKernelETD3Q27BGK(int nx1, int nx2, int nx3, bool compressible);
-   ~LBMKernelETD3Q27BGK(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-private:
-   void init();
-   void collideAllCompressible();
-   void collideAllIncompressible();
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   mu::value_type muX1,muX2,muX3;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-   }
-
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.cpp
deleted file mode 100644
index c5e0a1f53ab3169d6c649acba41ebb41e6b09a95..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBSparse.cpp
+++ /dev/null
@@ -1,902 +0,0 @@
-#include "LBMKernelETD3Q27CCLBSparse.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "EsoTwistD3Q27SparseData.h"
-#include <math.h>
-
-#define PROOF_CORRECTNESS
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBSparse::LBMKernelETD3Q27CCLBSparse()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBSparse::LBMKernelETD3Q27CCLBSparse(int nx1, int nx2, int nx3, Parameter p) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3),
-   parameter(p)
-{
-   this->compressible = false;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBSparse::~LBMKernelETD3Q27CCLBSparse(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBSparse::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   size_t ibx[3];
-   ibx[0] = block.lock()->getX1();
-   ibx[1] = block.lock()->getX2();
-   ibx[2] = block.lock()->getX3();
-
-   size_t nx[3];
-   nx[0] = nx1;
-   nx[1] = nx2;
-   nx[2] = nx3;
-
-   DistributionArray3DPtr d(new EsoTwistD3Q27SparseData(ibx, nx, block.lock()->getLevel(), -999.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27CCLBSparse::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27CCLBSparse(nx1, nx2, nx3, parameter));
-   kernel->setBlock(block.lock());
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBSparse>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   switch (parameter)
-   {
-   case NORMAL:
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBSparse>(kernel)->OxyyMxzz = 1.0;
-      break;
-   case MAGIC:
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBSparse>(kernel)->OxyyMxzz = 2.0 +(-collFactor);
-      break;
-   }
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBSparse::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBSparse::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNu = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nu",&muNu);
-      muForcingX2.DefineVar("nu",&muNu);
-      muForcingX3.DefineVar("nu",&muNu);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   EsoTwistD3Q27SparseDataPtr fd = boost::dynamic_pointer_cast<EsoTwistD3Q27SparseData>(dataSet->getFdistributions());
-   EsoTwistD3Q27SparseData::SparseDataPtr ld  = fd->getLocalDistributions();;
-   EsoTwistD3Q27SparseData::SparseDataPtr nld = fd->getNonLocalDistributions();
-   EsoTwistD3Q27SparseData::SparseDataPtr zd  = fd->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = 0;//ghostLayerWidth;
-   int minX2 = 0;//ghostLayerWidth;
-   int minX3 = 0;//ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1;//-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2;//-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3;//-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-
-               size_t x1plus = x1+1;
-               size_t x2plus = x2+1;
-               size_t x3plus = x3+1;
-
-               LBMReal mfcbb = (*ld)[fd->index4D(D3Q27System::ET_E, x1,x2,x3)];
-               LBMReal mfbcb = (*ld)[fd->index4D(D3Q27System::ET_N,x1,x2,x3)];  
-               LBMReal mfbbc = (*ld)[fd->index4D(D3Q27System::ET_T,x1,x2,x3)];
-               LBMReal mfccb = (*ld)[fd->index4D(D3Q27System::ET_NE,x1,x2,x3)];
-               LBMReal mfacb = (*ld)[fd->index4D(D3Q27System::ET_NW,x1plus,x2,x3)];
-               LBMReal mfcbc = (*ld)[fd->index4D(D3Q27System::ET_TE,x1,x2,x3)];
-               LBMReal mfabc = (*ld)[fd->index4D(D3Q27System::ET_TW, x1plus,x2,x3)];
-               LBMReal mfbcc = (*ld)[fd->index4D(D3Q27System::ET_TN,x1,x2,x3)];
-               LBMReal mfbac = (*ld)[fd->index4D(D3Q27System::ET_TS,x1,x2plus,x3)];
-               LBMReal mfccc = (*ld)[fd->index4D(D3Q27System::ET_TNE,x1,x2,x3)];
-               LBMReal mfacc = (*ld)[fd->index4D(D3Q27System::ET_TNW,x1plus,x2,x3)];
-               LBMReal mfcac = (*ld)[fd->index4D(D3Q27System::ET_TSE,x1,x2plus,x3)];
-               LBMReal mfaac = (*ld)[fd->index4D(D3Q27System::ET_TSW,x1plus,x2plus,x3)];
-
-               LBMReal mfabb = (*nld)[fd->index4D(D3Q27System::ET_W,x1plus,x2,x3  )];
-               LBMReal mfbab = (*nld)[fd->index4D(D3Q27System::ET_S,x1,x2plus,x3  )];
-               LBMReal mfbba = (*nld)[fd->index4D(D3Q27System::ET_B,x1,x2,x3plus  )];
-               LBMReal mfaab = (*nld)[fd->index4D(D3Q27System::ET_SW,x1plus,x2plus,x3 )];
-               LBMReal mfcab = (*nld)[fd->index4D(D3Q27System::ET_SE,x1,x2plus,x3 )];
-               LBMReal mfaba = (*nld)[fd->index4D(D3Q27System::ET_BW,x1plus,x2,x3plus )];
-               LBMReal mfcba = (*nld)[fd->index4D(D3Q27System::ET_BE,x1,x2,x3plus )];
-               LBMReal mfbaa = (*nld)[fd->index4D(D3Q27System::ET_BS,x1,x2plus,x3plus )];
-               LBMReal mfbca = (*nld)[fd->index4D(D3Q27System::ET_BN,x1,x2,x3plus )];
-               LBMReal mfaaa = (*nld)[fd->index4D(D3Q27System::ET_BSW,x1plus,x2plus,x3plus)];
-               LBMReal mfcaa = (*nld)[fd->index4D(D3Q27System::ET_BSE,x1,x2plus,x3plus)];
-               LBMReal mfaca = (*nld)[fd->index4D(D3Q27System::ET_BNW,x1plus,x2,x3plus)];
-               LBMReal mfcca = (*nld)[fd->index4D(D3Q27System::ET_BNE,x1,x2,x3plus)];
-               
-               LBMReal mfbbb = (*zd)[fd->index3D(x1,x2,x3)];
-               //////////////////////////////////////////////////////////////////////////
- 
- 
-               LBMReal m0, m1, m2;
-
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-
-               //forcing 
-               ///////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = static_cast<double>(x1-1+ix1*maxX1);
-                  muX2 = static_cast<double>(x2-1+ix2*maxX2);
-                  muX3 = static_cast<double>(x3-1+ix3*maxX3);
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  vvx += forcingX1*0.5; // X
-                  vvy += forcingX2*0.5; // Y
-                  vvz += forcingX3*0.5; // Z
-               }
-               ///////////////////////////////////////////////////////////////////////////////////////////               
-               LBMReal oMdrho;
-
-               oMdrho=mfccc+mfaaa;
-               m0=mfaca+mfcac;
-               m1=mfacc+mfcaa;
-               m2=mfaac+mfcca;
-               oMdrho+=m0;
-               m1+=m2;
-               oMdrho+=m1;
-               m0=mfbac+mfbca;
-               m1=mfbaa+mfbcc;
-               m0+=m1;
-               m1=mfabc+mfcba;
-               m2=mfaba+mfcbc;
-               m1+=m2;
-               m0+=m1;
-               m1=mfacb+mfcab;
-               m2=mfaab+mfccb;
-               m1+=m2;
-               m0+=m1;
-               oMdrho+=m0;
-               m0=mfabb+mfcbb;
-               m1=mfbab+mfbcb;
-               m2=mfbba+mfbbc;
-               m0+=m1+m2;
-               m0+=mfbbb; //hat gefehlt
-               oMdrho = 1. - (oMdrho + m0);
-
-               LBMReal vx2;
-               LBMReal vy2;
-               LBMReal vz2;
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               //LBMReal OxyyMxzz  = 1.;//2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = mfbcc - (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = mfcbc - (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = mfccb - (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbab * mfbcb + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               LBMReal dxux = -c1o2 * collFactor *(mxxMyy + mxxMzz) + c1o2 * OxxPyyPzz*(mfaaa - mxxPyyPzz);
-               LBMReal dyuy = dxux + collFactor * c3o2 * mxxMyy;
-               LBMReal dzuz = dxux + collFactor * c3o2 * mxxMzz;
-
-               //relax
-               mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-               mxxMyy    += collFactor * (-mxxMyy) - 3. * (1. - c1o2 * collFactor) * (vx2 * dxux - vy2 * dyuy);
-               mxxMzz    += collFactor * (-mxxMzz) - 3. * (1. - c1o2 * collFactor) * (vx2 * dxux - vz2 * dzuz);
-
-               mfabb     += collFactor * (-mfabb);
-               mfbab     += collFactor * (-mfbab);
-               mfbba     += collFactor * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //forcing
-               mfbaa=-mfbaa;
-               mfaba=-mfaba;
-               mfaab=-mfaab;
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                     +" dif="+UbSystem::toString(dif)
-                     +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLBSparse::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*ld)[fd->index4D(D3Q27System::ET_E, x1,x2,x3)]               = mfabb;
-               (*ld)[fd->index4D(D3Q27System::ET_N,x1,x2,x3)]                = mfbab;
-               (*ld)[fd->index4D(D3Q27System::ET_T,x1,x2,x3)]                = mfbba;
-               (*ld)[fd->index4D(D3Q27System::ET_NE,x1,x2,x3)]               = mfaab;
-               (*ld)[fd->index4D(D3Q27System::ET_NW,x1plus,x2,x3)]           = mfcab;
-               (*ld)[fd->index4D(D3Q27System::ET_TE,x1,x2,x3)]               = mfaba;
-               (*ld)[fd->index4D(D3Q27System::ET_TW, x1plus,x2,x3)]          = mfcba;
-               (*ld)[fd->index4D(D3Q27System::ET_TN,x1,x2,x3)]               = mfbaa;
-               (*ld)[fd->index4D(D3Q27System::ET_TS,x1,x2plus,x3)]           = mfbca;
-               (*ld)[fd->index4D(D3Q27System::ET_TNE,x1,x2,x3)]              = mfaaa;
-               (*ld)[fd->index4D(D3Q27System::ET_TNW,x1plus,x2,x3)]          = mfcaa;
-               (*ld)[fd->index4D(D3Q27System::ET_TSE,x1,x2plus,x3)]          = mfaca;
-               (*ld)[fd->index4D(D3Q27System::ET_TSW,x1plus,x2plus,x3)]      = mfcca;
-                                                                          
-               (*nld)[fd->index4D(D3Q27System::ET_W,x1plus,x2,x3  )]         = mfcbb;
-               (*nld)[fd->index4D(D3Q27System::ET_S,x1,x2plus,x3  )]         = mfbcb;
-               (*nld)[fd->index4D(D3Q27System::ET_B,x1,x2,x3plus  )]         = mfbbc;
-               (*nld)[fd->index4D(D3Q27System::ET_SW,x1plus,x2plus,x3)]      = mfccb;
-               (*nld)[fd->index4D(D3Q27System::ET_SE,x1,x2plus,x3 )]         = mfacb;
-               (*nld)[fd->index4D(D3Q27System::ET_BW,x1plus,x2,x3plus)]      = mfcbc;
-               (*nld)[fd->index4D(D3Q27System::ET_BE,x1,x2,x3plus )]         = mfabc;
-               (*nld)[fd->index4D(D3Q27System::ET_BS,x1,x2plus,x3plus)]      = mfbcc;
-               (*nld)[fd->index4D(D3Q27System::ET_BN,x1,x2,x3plus )]         = mfbac;
-               (*nld)[fd->index4D(D3Q27System::ET_BSW,x1plus,x2plus,x3plus)] = mfccc;
-               (*nld)[fd->index4D(D3Q27System::ET_BSE,x1,x2plus,x3plus)]     = mfacc;
-               (*nld)[fd->index4D(D3Q27System::ET_BNW,x1plus,x2,x3plus)]     = mfcac;
-               (*nld)[fd->index4D(D3Q27System::ET_BNE,x1,x2,x3plus)]         = mfaac;
-
-               mfbbb = (*zd)[fd->index3D(x1,x2,x3)];
-               //////////////////////////////////////////////////////////////////////////
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27CCLBSparse::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.cpp
deleted file mode 100644
index 6c40806e49ac723a1b936638dcca06a836355ac7..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.cpp
+++ /dev/null
@@ -1,3377 +0,0 @@
-#include "LBMKernelETD3Q27CCLB_Geier.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "D3Q27EsoTwist3DSplittedVector.h"
-#include <math.h>
-
-#define PROOF_CORRECTNESS
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLB_Geier::LBMKernelETD3Q27CCLB_Geier()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLB_Geier::LBMKernelETD3Q27CCLB_Geier(int nx1, int nx2, int nx3, int option) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3),
-     option(option)
-{
-   this->compressible = false;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLB_Geier::~LBMKernelETD3Q27CCLB_Geier(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLB_Geier::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+2, nx2+2, nx3+2, -999.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27CCLB_Geier::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27CCLB_Geier(nx1, nx2, nx3, option));
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLB_Geier>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   if (option == 0)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLB_Geier>(kernel)->OxyyMxzz = 1.0;
-   }
-   else if (option == 1)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLB_Geier>(kernel)->OxyyMxzz = 2.0 +(-collFactor);
-   }
-   
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLB_Geier::calculate()
-{
-   timer.resetAndStart();
-   collideAll2();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLB_Geier::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////
-
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-               
-               //Rest ist b
-
-               LBMReal mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1); 
-               LBMReal mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3 );
-               LBMReal mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3);
-               LBMReal mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,x3+1 );
-               LBMReal mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,x3  );
-               LBMReal mfabc = (*this->localDistributions)(D3Q27System::ET_TW, x1+1,x2,x3);
-               LBMReal mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2+1,x3+1 );
-               LBMReal mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2+1,x3  );
-               LBMReal mfbac = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2+1,x3);
-               LBMReal mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3+1  );
-               LBMReal mfbbb = (*this->zeroDistributions)(x1,x2,x3);
-               LBMReal mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               LBMReal mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,x3+1);
-               LBMReal mfacb = (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,x3);
-               LBMReal mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,x3);
-               LBMReal mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2+1,x3+1);
-               LBMReal mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2+1,x3 );
-               LBMReal mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2+1,x3);
-               LBMReal mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3+1);
-               LBMReal mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               LBMReal mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               LBMReal mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3+1 );
-               LBMReal mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
-               LBMReal mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               LBMReal mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3+1 );
-               LBMReal mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               LBMReal mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               LBMReal m0, m1, m2;
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               mfaaa -=c1o216;
-               mfaab -=c1o54;
-               mfaac -=c1o216;
-               mfaba -=c1o54;
-               mfabb -=c2o27;
-               mfabc -=c1o54;
-               mfbaa -=c1o54;
-               mfbab -=c2o27;
-               mfbac -=c1o54;
-               mfbba -=c2o27;
-               mfbbb -=c8o27;
-               mfbbc -=c2o27;
-               mfaca -=c1o216;
-               mfacb -=c1o54;
-               mfacc -=c1o216;
-               mfcaa -=c1o216;
-               mfcab -=c1o54;
-               mfcac -=c1o216;
-               mfcca -=c1o216;
-               mfccb -=c1o54;
-               mfccc -=c1o216;
-               mfbca -=c1o54;
-               mfbcb -=c2o27;
-               mfbcc -=c1o54;
-               mfcba -=c1o54;
-               mfcbb -=c2o27;
-               mfcbc -=c1o54;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb))/rho;
-
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab))/rho;
-
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba))/rho; 
-
-               LBMReal vx2=vvx*vvx;
-               LBMReal vy2=vvy*vvy;
-               LBMReal vz2=vvz*vvz;
-
-
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa	+ mfaac;
-               m1    = mfaac	- mfaaa;
-               m0    = m2		+ mfaab;
-               mfaaa = m0;
-               m0   += c1o36;	
-               mfaab = m1 -		m0 * vvz;
-               mfaac = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2		+ mfabb;
-               mfaba = m0;
-               m0   += c1o9;
-               mfabb = m1 -		m0 * vvz;
-               mfabc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2		+ mfacb;
-               mfaca = m0;
-               m0   += c1o36;
-               mfacb = m1 -		m0 * vvz;
-               mfacc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa	+ mfbac;
-               m1    = mfbac	- mfbaa;
-               m0    = m2		+ mfbab;
-               mfbaa = m0;
-               m0   += c1o9;
-               mfbab = m1 -		m0 * vvz;
-               mfbac = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2		+ mfbbb;
-               mfbba = m0;
-               m0   += c4o9;
-               mfbbb = m1 -		m0 * vvz;
-               mfbbc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2		+ mfbcb;
-               mfbca = m0;
-               m0   += c1o9;
-               mfbcb = m1 -		m0 * vvz;
-               mfbcc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa	+ mfcac;
-               m1    = mfcac	- mfcaa;
-               m0    = m2		+ mfcab;
-               mfcaa = m0;
-               m0   += c1o36;
-               mfcab = m1 -		m0 * vvz;
-               mfcac = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2		+ mfcbb;
-               mfcba = m0;
-               m0   += c1o9;
-               mfcbb = m1 -		m0 * vvz;
-               mfcbc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2		+ mfccb;
-               mfcca = m0;
-               m0   += c1o36;
-               mfccb = m1 -		m0 * vvz;
-               mfccc = m2 - 2. *	m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa	+ mfaca;
-               m1    = mfaca	- mfaaa;
-               m0    = m2		+ mfaba;
-               mfaaa = m0;
-               m0   += c1o6;
-               mfaba = m1 -		m0 * vvy;
-               mfaca = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2		+ mfabb;
-               mfaab = m0;
-               mfabb = m1 -		m0 * vvy;
-               mfacb = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2		+ mfabc;
-               mfaac = m0;
-               m0   += c1o18;
-               mfabc = m1 -		m0 * vvy;
-               mfacc = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa	+ mfbca;
-               m1    = mfbca	- mfbaa;
-               m0    = m2		+ mfbba;
-               mfbaa = m0;
-               m0   += c2o3;
-               mfbba = m1 -		m0 * vvy;
-               mfbca = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2		+ mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -		m0 * vvy;
-               mfbcb = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2		+ mfbbc;
-               mfbac = m0;
-               m0   += c2o9;
-               mfbbc = m1 -		m0 * vvy;
-               mfbcc = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa	+ mfcca;
-               m1    = mfcca	- mfcaa;
-               m0    = m2		+ mfcba;
-               mfcaa = m0;
-               m0   += c1o6;
-               mfcba = m1 -		m0 * vvy;
-               mfcca = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2		+ mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -		m0 * vvy;
-               mfccb = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2		+ mfcbc;
-               mfcac = m0;
-               m0   += c1o18;
-               mfcbc = m1 -		m0 * vvy;
-               mfccc = m2 - 2. *	m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9		Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa	+ mfcaa;
-               m1    = mfcaa	- mfaaa;
-               m0    = m2		+ mfbaa;
-               mfaaa = m0;
-               m0   += 1.;
-               mfbaa = m1 -		m0 * vvx;
-               mfcaa = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2		+ mfbba;
-               mfaba = m0;
-               mfbba = m1 -		m0 * vvx;
-               mfcba = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2		+ mfbca;
-               mfaca = m0;
-               m0   += c1o3;
-               mfbca = m1 -		m0 * vvx;
-               mfcca = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab	+ mfcab;
-               m1    = mfcab	- mfaab;
-               m0    = m2		+ mfbab;
-               mfaab = m0;
-               mfbab = m1 -		m0 * vvx;
-               mfcab = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2		+ mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -		m0 * vvx;
-               mfcbb = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2		+ mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -		m0 * vvx;
-               mfccb = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac	+ mfcac;
-               m1    = mfcac	- mfaac;
-               m0    = m2		+ mfbac;
-               mfaac = m0;
-               m0   += c1o3;
-               mfbac = m1 -		m0 * vvx;
-               mfcac = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2		+ mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -		m0 * vvx;
-               mfcbc = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2		+ mfbcc;
-               mfacc = m0;
-               m0   += c1o9;
-               mfbcc = m1 -		m0 * vvx;
-               mfccc = m2 - 2. *	m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-
-
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// BGK
-               //////////////////////////////////////////////////////////////////////////////////////
-               ////2.
-               //mfabb += -s9 * (-mfabb);
-               //mfbab += -s9 * (-mfbab);
-               //mfbba += -s9 * (-mfbba);
-               //
-               //mfcaa += -s9 * (c1o3 * mfaaa - mfcaa);
-               //mfaca += -s9 * (c1o3 * mfaaa - mfaca);
-               //mfaac += -s9 * (c1o3 * mfaaa - mfaac);
-               //
-               ////3.
-               //mfabc += -s9 * (-mfabc);
-               //mfbac += -s9 * (-mfbac);
-               //
-               //mfacb += -s9 * (-mfacb);
-               //mfbca += -s9 * (-mfbca);
-
-               //mfcab += -s9 * (-mfcab);
-               //mfcba += -s9 * (-mfcba);
-
-               //mfbbb += -s9 * (-mfbbb);
-
-               ////4.
-               //mfacc += -s9 * (c1o9 * mfaaa - mfacc);
-               //mfcac += -s9 * (c1o9 * mfaaa - mfcac);
-               //mfcca += -s9 * (c1o9 * mfaaa - mfcca);
-
-               //mfbbc += -s9 * (-mfbbc);
-               //mfbcb += -s9 * (-mfbcb);
-               //mfcbb += -s9 * (-mfcbb);
-
-               ////5.
-               //mfbcc += -s9 * (-mfbcc);
-               //mfcbc += -s9 * (-mfcbc);
-               //mfccb += -s9 * (-mfccb);
-
-               ////6.
-               //mfccc += -s9 * (c1o27 * mfaaa - mfccc);
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Central Moments Style
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * rho) * mfabb + 2. * mfbba * mfbab) / rho;
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * rho) * mfbab + 2. * mfbba * mfabb) / rho;
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * rho) * mfbba + 2. * mfbab * mfabb) / rho; 
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) / rho - c1o3 * (mfcaa + mfaca);
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) / rho - c1o3 * (mfcaa + mfaac);
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) / rho - c1o3 * (mfaac + mfaca);
-
-               //Cum 5.
-               LBMReal CUMbcc = mfbcc - (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) / rho - c1o3 * (mfbca + mfbac);
-               LBMReal CUMcbc = mfcbc - (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) / rho - c1o3 * (mfcba + mfabc);
-               LBMReal CUMccb = mfccb - (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) / rho - c1o3 * (mfacb + mfcab);
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc +(-4. *  mfbbb * mfbbb  
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) / rho
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb) / (rho * rho)
-                  - c1o3* (mfacc + mfcac + mfcca)
-                  + c1o9* (mfcaa + mfaca + mfaac)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3 / rho;
-
-               //4.
-               CUMacc += 1.0 * (-CUMacc); 
-               CUMcac += 1.0 * (-CUMcac); 
-               CUMcca += 1.0 * (-CUMcca); 
-
-               CUMbbc += 1.0 * (-CUMbbc); 
-               CUMbcb += 1.0 * (-CUMbcb); 
-               CUMcbb += 1.0 * (-CUMcbb); 
-
-               //5.
-               CUMbcc += 1.0 * (-CUMbcc);
-               CUMcbc += 1.0 * (-CUMcbc);
-               CUMccb += 1.0 * (-CUMccb);
-
-               //6.
-               CUMccc += 1.0 * (-CUMccc);
-
-     
-               //
-               //mfabb += -s9 * (-mfabb);
-               //mfbab += -s9 * (-mfbab);
-               //mfbba += -s9 * (-mfbba);
-               //
-               //mfcaa += -s9 * (c1o3 * mfaaa - mfcaa);
-               //mfaca += -s9 * (c1o3 * mfaaa - mfaca);
-               //mfaac += -s9 * (c1o3 * mfaaa - mfaac);
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz	   = mfcaa - mfaac;
-
-               //relax
-               mxxPyyPzz += 1.0*(mfaaa-mxxPyyPzz);
-               mxxMyy    += -s9 * (-mxxMyy);
-               mxxMzz    += -s9 * (-mxxMzz);
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-
-               //3.
-               //mfabc += 1.0 * (-mfabc);
-               //mfbac += 1.0 * (-mfbac);
-               //
-               //mfacb += 1.0 * (-mfacb);
-               //mfbca += 1.0 * (-mfbca);
-
-               //mfcab += 1.0 * (-mfcab);
-               //mfcba += 1.0 * (-mfcba);
-
-               //mfbbb += 1.0 * (-mfbbb);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-
-
-               mfbbb     +=  1.0* (-mfbbb);
-               mxxyPyzz  +=  1.0 * (-mxxyPyzz);
-               mxxyMyzz  += 1.0 * (-mxxyMyzz);
-               mxxzPyyz  += 1.0 * (-mxxzPyyz);
-               mxxzMyyz  += 1.0 * (-mxxzMyyz);
-               mxyyPxzz  += 1.0 * (-mxyyPxzz);
-               mxyyMxzz  += 1.0 * (-mxyyMxzz);
- 
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-               //4.
-               mfacc += 1.0 * (c1o9 * mfaaa - mfacc);
-               mfcac += 1.0 * (c1o9 * mfaaa - mfcac);
-               mfcca += 1.0 * (c1o9 * mfaaa - mfcca);
-
-               mfbbc += 1.0 * (-mfbbc);
-               mfbcb += 1.0 * (-mfbcb);
-               mfcbb += 1.0 * (-mfcbb);
-
-               //5.
-               mfbcc += 1.0 * (-mfbcc);
-               mfcbc += 1.0 * (-mfcbc);
-               mfccb += 1.0 * (-mfccb);
-
-               ////6.
-               mfccc += 1.0 * (c1o27 * mfaaa - mfccc);
- 
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 ) * mfabb + 2. * mfbba * mfbab) / rho;
-               mfbcb = CUMbcb + ((mfaca + c1o3 ) * mfbab + 2. * mfbba * mfabb) / rho;
-               mfbbc = CUMbbc + ((mfaac + c1o3 ) * mfbba + 2. * mfbab * mfabb) / rho; 
-
-               //here is problem
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) / rho + c1o3 * (mfcaa + mfaca)/rho-(1.0-1.0/rho)*c1o9;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) / rho + c1o3 * (mfcaa + mfaac)/rho-(1.0-1.0/rho)*c1o9;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) / rho + c1o3 * (mfaac + mfaca)/rho-(1.0-1.0/rho)*c1o9;
-
-               ////5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) / rho + c1o3 * (mfbca + mfbac)/rho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) / rho + c1o3 * (mfcba + mfabc)/rho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) / rho + c1o3 * (mfacb + mfcab)/rho;
-
-               ////6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb  
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) / rho
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb) / (rho * rho)
-                  - c1o3* (mfacc + mfcac + mfcca)/rho
-                  - c1o9* (mfcaa + mfaca + mfaac)/rho
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3 / rho) -(1.0-1.0/rho)*c1o27;
-               //////////////////////////////////////////////////////////////////////////////////////
-
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               //////////////////////////////////////////////////////////////////////////////////////
-               //LBMReal OxxPyyPzz = 1.;
-               //LBMReal OxyyPxzz  = 1.0;
-               //LBMReal OxyyMxzz  = 1.0;
-               //LBMReal O4        = 1.;
-               //LBMReal O5        = 1.;
-               //LBMReal O6        = 1.;
-
-               ////LBMReal OxxPyyPzz = -s9;
-               ////LBMReal OxyyPxzz  = -s9;
-               ////LBMReal OxyyMxzz  = -s9;
-               ////LBMReal O4        = -s9;
-               ////LBMReal O5        = -s9;
-               ////LBMReal O6        = -s9;
-
-
-               ////Cum 4.
-               //LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * rho) * mfabb + 2. * mfbba * mfbab) / rho;
-               //LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * rho) * mfbab + 2. * mfbba * mfabb) / rho;
-               //LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * rho) * mfbba + 2. * mfbab * mfabb) / rho; 
-
-               //LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) / rho - c1o3 * (mfcaa + mfaca);
-               //LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) / rho - c1o3 * (mfcaa + mfaac);
-               //LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) / rho - c1o3 * (mfaac + mfaca);
-
-               ////Cum 5.
-               //LBMReal CUMbcc = mfbcc - (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) / rho - c1o3 * (mfbca + mfbac);
-               //LBMReal CUMcbc = mfcbc - (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) / rho - c1o3 * (mfcba + mfabc);
-               //LBMReal CUMccb = mfccb - (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) / rho - c1o3 * (mfacb + mfcab);
-
-               ////Cum 6.
-               //LBMReal CUMccc = mfccc +(-4. *  mfbbb * mfbbb  
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) / rho
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-               //   +  2. * (mfcaa * mfaca * mfaac)
-               //   + 16. *  mfbba * mfbab * mfabb) / (rho * rho)
-               //   - c1o3* (mfacc + mfcac + mfcca)
-               //   + c1o9* (mfcaa + mfaca + mfaac)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3 / rho;
-
-               //////////
-               ////2.
-
-               //// linear combinations
-               ////LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               ////LBMReal mxxMyy    = mfcaa - mfaca;
-               ////LBMReal mxxMzz    = mfcaa - mfaac;
-               ////{
-               ////   LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-               ////   LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-               ////   LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-               ////   //relax
-               ////   mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-               ////   mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-               ////   mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               ////}
-               ////mfabb     += -s9 * (-mfabb);
-               ////mfbab     += -s9 * (-mfbab);
-               ////mfbba     += -s9 * (-mfbba);
-               ////// linear combinations back
-               ////mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               ////mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               ////mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-               ////////////
-
-               //////// simple 2nd moments without high order Galilean invariance
-               ////2.
-               //// linear combinations
-               //LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               //LBMReal mxxMyy    = mfcaa - mfaca;
-               //LBMReal mxxMzz	   = mfcaa - mfaac;
-
-               ////relax
-               //mxxPyyPzz += OxxPyyPzz*(mfaaa-mxxPyyPzz);
-               //mxxMyy    += -s9 * (-mxxMyy);
-               //mxxMzz    += -s9 * (-mxxMzz);
-               //mfabb     += -s9 * (-mfabb);
-               //mfbab     += -s9 * (-mfbab);
-               //mfbba     += -s9 * (-mfbba);
-
-               //// linear combinations back
-               //mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               ////3.
-               //// linear combinations
-               //LBMReal mxxyPyzz = mfcba + mfabc;
-               //LBMReal mxxyMyzz = mfcba - mfabc;
-
-               //LBMReal mxxzPyyz = mfcab + mfacb;
-               //LBMReal mxxzMyyz = mfcab - mfacb;
-
-               //LBMReal mxyyPxzz = mfbca + mfbac;
-               //LBMReal mxyyMxzz = mfbca - mfbac;
-
-               ////relax
-
-
-               //mfbbb     +=  OxyyMxzz* (-mfbbb);
-               //mxxyPyzz  +=  OxyyPxzz * (-mxxyPyzz);
-               //mxxyMyzz  += OxyyMxzz * (-mxxyMyzz);
-               //mxxzPyyz  += OxyyPxzz * (-mxxzPyyz);
-               //mxxzMyyz  += OxyyMxzz * (-mxxzMyyz);
-               //mxyyPxzz  += OxyyPxzz * (-mxyyPxzz);
-               //mxyyMxzz  += OxyyMxzz * (-mxyyMxzz);
-               ////wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mfbbb)/(abs(mfbbb)+qudricLimit);
-               ////mfbbb     += wadjust * (-mfbbb);
-               ////wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxyPyzz)/(abs(mxxyPyzz)+qudricLimit);
-               ////mxxyPyzz  += wadjust * (-mxxyPyzz);
-               ////wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxyMyzz)/(abs(mxxyMyzz)+qudricLimit);
-               ////mxxyMyzz  += wadjust * (-mxxyMyzz);
-               ////wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxzPyyz)/(abs(mxxzPyyz)+qudricLimit);
-               ////mxxzPyyz  += wadjust * (-mxxzPyyz);
-               ////wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxzMyyz)/(abs(mxxzMyyz)+qudricLimit);
-               ////mxxzMyyz  += wadjust * (-mxxzMyyz);
-               ////wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxyyPxzz)/(abs(mxyyPxzz)+qudricLimit);
-               ////mxyyPxzz  += wadjust * (-mxyyPxzz);
-               ////wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxyyMxzz)/(abs(mxyyMxzz)+qudricLimit);
-               ////mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               //// linear combinations back
-               //mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               //mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               ////4.
-               //CUMacc += O4 * (-CUMacc); 
-               //CUMcac += O4 * (-CUMcac); 
-               //CUMcca += O4 * (-CUMcca); 
-
-               //CUMbbc += O4 * (-CUMbbc); 
-               //CUMbcb += O4 * (-CUMbcb); 
-               //CUMcbb += O4 * (-CUMcbb); 
-
-               ////5.
-               //CUMbcc += O5 * (-CUMbcc);
-               //CUMcbc += O5 * (-CUMcbc);
-               //CUMccb += O5 * (-CUMccb);
-
-               ////6.
-               //CUMccc += O6 * (-CUMccc);
-
-               ////back cumulants to central moments
-               ////4.
-               //mfcbb = CUMcbb + ((mfcaa + c1o3 * rho) * mfabb + 2. * mfbba * mfbab) / rho;
-               //mfbcb = CUMbcb + ((mfaca + c1o3 * rho) * mfbab + 2. * mfbba * mfabb) / rho;
-               //mfbbc = CUMbbc + ((mfaac + c1o3 * rho) * mfbba + 2. * mfbab * mfabb) / rho; 
-
-               //mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) / rho + c1o3 * (mfcaa + mfaca);
-               //mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) / rho + c1o3 * (mfcaa + mfaac);
-               //mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) / rho + c1o3 * (mfaac + mfaca);
-
-               ////5.
-               //mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) / rho + c1o3 * (mfbca + mfbac);
-               //mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) / rho + c1o3 * (mfcba + mfabc);
-               //mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) / rho + c1o3 * (mfacb + mfcab);
-
-               ////6.
-               //mfccc = CUMccc  -((-4. *  mfbbb * mfbbb  
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) / rho
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-               //   +  2. * (mfcaa * mfaca * mfaac)
-               //   + 16. *  mfbba * mfbab * mfabb) / (rho * rho)
-               //   - c1o3* (mfacc + mfcac + mfcca)
-               //   + c1o9* (mfcaa + mfaca + mfaac)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3 / rho);
-               //////////////////////////////////////////////////////////////////////////////////////
-
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1.) * (     vz2 - vvz) * c1o2; 
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa       * (1. - vz2)              - 1. * vz2; 
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1.) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2; 
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2); 
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3) * (     vz2 - vvz) * c1o2; 
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca         * (1. - vz2)              - c1o3 * vz2; 
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2; 
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2); 
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2; 
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2); 
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2; 
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2); 
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3) * (     vz2 - vvz) * c1o2; 
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa         * (1. - vz2)              - c1o3 * vz2; 
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2; 
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2); 
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9) * (     vz2 - vvz) * c1o2; 
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca         * (1. - vz2)              - c1o9 * vz2; 
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa         * (1. - vy2)              - c1o6 * vy2; 
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab         * (1. - vy2)              - c2o3 * vy2; 
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac         * (1. - vy2)              - c1o6 * vy2; 
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2; 
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2); 
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2; 
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2); 
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2; 
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2); 
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa          * (1. - vy2)              - c1o18 * vy2; 
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab         * (1. - vy2)              - c2o9 * vy2; 
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18) * (     vy2 - vvy) * c1o2; 
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac          * (1. - vy2)              - c1o18 * vy2; 
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa          * (1. - vx2)              - c1o36 * vx2; 
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba         * (1. - vx2)              - c1o9 * vx2; 
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca          * (1. - vx2)              - c1o36 * vx2; 
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab         * (1. - vx2)              - c1o9 * vx2; 
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb         * (1. - vx2)              - c4o9 * vx2; 
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb         * (1. - vx2)              - c1o9 * vx2; 
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac          * (1. - vx2)              - c1o36 * vx2; 
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc         * (1. - vx2)              - c1o9 * vx2; 
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36) * (     vx2 - vvx) * c1o2; 
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc          * (1. - vx2)              - c1o36 * vx2; 
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               mfaaa +=c1o216;
-               mfaab +=c1o54;
-               mfaac +=c1o216;
-               mfaba +=c1o54;
-               mfabb +=c2o27;
-               mfabc +=c1o54;
-               mfbaa +=c1o54;
-               mfbab +=c2o27;
-               mfbac +=c1o54;
-               mfbba +=c2o27;
-               mfbbb +=c8o27;
-               mfbbc +=c2o27;
-               mfaca +=c1o216;
-               mfacb +=c1o54;
-               mfacc +=c1o216;
-               mfcaa +=c1o216;
-               mfcab +=c1o54;
-               mfcac +=c1o216;
-               mfcca +=c1o216;
-               mfccb +=c1o54;
-               mfccc +=c1o216;
-               mfbca +=c1o54;
-               mfbcb +=c2o27;
-               mfbcc +=c1o54;
-               mfcba +=c1o54;
-               mfcbb +=c2o27;
-               mfcbc +=c1o54;
-          
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                     +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                     +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
-               (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,  x3)   = mfcab;
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
-               (*this->localDistributions)(D3Q27System::ET_TW,x1+1,x2,  x3)   = mfcba;
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2+1,x3)   = mfbca;
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,  x3)  = mfcaa;
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2+1,x3)  = mfaca;
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3)  = mfcca;
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,  x3    ) = mfcbb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2+1,x3    ) = mfbcb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3+1  ) = mfbbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3   ) = mfccb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2+1,x3   ) = mfacb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,  x3+1 ) = mfcbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3+1 ) = mfabc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2+1,x3+1 ) = mfbcc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3+1 ) = mfbac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1) = mfccc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2+1,x3+1) = mfacc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,  x3+1) = mfcac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3+1) = mfaac;
-
-               (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLB_Geier::collideAll2()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////
-
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-
-               LBMReal mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1); 
-               LBMReal mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3 );
-               LBMReal mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3);
-               LBMReal mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,x3+1 );
-               LBMReal mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,x3  );
-               LBMReal mfabc = (*this->localDistributions)(D3Q27System::ET_TW, x1+1,x2,x3);
-               LBMReal mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2+1,x3+1 );
-               LBMReal mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2+1,x3  );
-               LBMReal mfbac = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2+1,x3);
-               LBMReal mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3+1  );
-               LBMReal mfbbb = (*this->zeroDistributions)(x1,x2,x3);
-               LBMReal mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               LBMReal mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,x3+1);
-               LBMReal mfacb = (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,x3);
-               LBMReal mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,x3);
-               LBMReal mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2+1,x3+1);
-               LBMReal mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2+1,x3 );
-               LBMReal mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2+1,x3);
-               LBMReal mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3+1);
-               LBMReal mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               LBMReal mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               LBMReal mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3+1 );
-               LBMReal mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
-               LBMReal mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               LBMReal mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3+1 );
-               LBMReal mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               LBMReal mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               LBMReal m0, m1, m2;
-
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               //mfaaa -=c1o216;
-               //mfaab -=c1o54;
-               //mfaac -=c1o216;
-               //mfaba -=c1o54;
-               //mfabb -=c2o27;
-               //mfabc -=c1o54;
-               //mfbaa -=c1o54;
-               //mfbab -=c2o27;
-               //mfbac -=c1o54;
-               //mfbba -=c2o27;
-               //mfbbb -=c8o27;
-               //mfbbc -=c2o27;
-               //mfaca -=c1o216;
-               //mfacb -=c1o54;
-               //mfacc -=c1o216;
-               //mfcaa -=c1o216;
-               //mfcab -=c1o54;
-               //mfcac -=c1o216;
-               //mfcca -=c1o216;
-               //mfccb -=c1o54;
-               //mfccc -=c1o216;
-               //mfbca -=c1o54;
-               //mfbcb -=c2o27;
-               //mfbcc -=c1o54;
-               //mfcba -=c1o54;
-               //mfcbb -=c2o27;
-               //mfcbc -=c1o54;
-               
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-
-               //forcing 
-               ///////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = static_cast<double>(x1+ix1*bcArrayMaxX1);
-                  muX2 = static_cast<double>(x2+ix2*bcArrayMaxX2);
-                  muX3 = static_cast<double>(x3+ix3*bcArrayMaxX3);
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  vvx += forcingX1*0.5; // X
-                  vvy += forcingX2*0.5; // Y
-                  vvz += forcingX3*0.5; // Z
-               }
-               ///////////////////////////////////////////////////////////////////////////////////////////               
-               
-               ////////////////////////////////////////////////////////////////////////////////////
-               //fast
-               //LBMReal oMdrho = 1. - (mfccc+mfaaa + mfaca+mfcac + mfacc+mfcaa + mfaac+mfcca +
-               //                                   mfbac+mfbca + mfbaa+mfbcc + mfabc+mfcba + mfaba+mfcbc + mfacb+mfcab + mfaab+mfccb +
-               //                                   mfabb+mfcbb + mfbab+mfbcb  +  mfbba+mfbbc);//fehlt mfbbb
-               //LBMReal vvx    =mfccc-mfaaa + mfcac-mfaca + mfcaa-mfacc + mfcca-mfaac +
-               //                         mfcba-mfabc + mfcbc-mfaba + mfcab-mfacb + mfccb-mfaab +
-               //                         mfcbb-mfabb;
-               //LBMReal vvy    =mfccc-mfaaa + mfaca-mfcac + mfacc-mfcaa + mfcca-mfaac +
-               //                         mfbca-mfbac + mfbcc-mfbaa + mfacb-mfcab + mfccb-mfaab +
-               //                         mfbcb-mfbab;
-               //LBMReal vvz    =mfccc-mfaaa + mfcac-mfaca + mfacc-mfcaa + mfaac-mfcca +
-               //                         mfbac-mfbca + mfbcc-mfbaa + mfabc-mfcba + mfcbc-mfaba +
-               //                         mfbbc-mfbba;
-               ////////////////////////////////////////////////////////////////////////////////////
-               // oMdrho assembler style -------> faaaaaastaaaa
-               //LBMReal m0, m1, m2;
-               LBMReal oMdrho;
-               {
-                  oMdrho=mfccc+mfaaa;
-                  m0=mfaca+mfcac;
-                  m1=mfacc+mfcaa;
-                  m2=mfaac+mfcca;
-                  oMdrho+=m0;
-                  m1+=m2;
-                  oMdrho+=m1;
-                  m0=mfbac+mfbca;
-                  m1=mfbaa+mfbcc;
-                  m0+=m1;
-                  m1=mfabc+mfcba;
-                  m2=mfaba+mfcbc;
-                  m1+=m2;
-                  m0+=m1;
-                  m1=mfacb+mfcab;
-                  m2=mfaab+mfccb;
-                  m1+=m2;
-                  m0+=m1;
-                  oMdrho+=m0;
-                  m0=mfabb+mfcbb;
-                  m1=mfbab+mfbcb;
-                  m2=mfbba+mfbbc;
-                  m0+=m1+m2;
-                  m0+=mfbbb; //hat gefehlt
-                  oMdrho = 1. - (oMdrho + m0);
-               }
-               //LBMReal vvx;
-               LBMReal vx2;
-               //{
-               //     vvx = mfccc-mfaaa;
-               //     m0  = mfcac-mfaca;
-               //     m1  = mfcaa-mfacc;
-               //     m2  = mfcca-mfaac;
-               //     vvx+= m0;
-               //     m1 += m2;
-               //     vvx+= m1;
-               //     vx2 = mfcba-mfabc;
-               //     m0  = mfcbc-mfaba;
-               //     m1  = mfcab-mfacb;
-               //     m2  = mfccb-mfaab;
-               //     vx2+= m0;
-               //     m1 += m2;
-               //     vx2+= m1;
-               //     vvx+= vx2;
-               //     vx2 = mfcbb-mfabb;
-               //     vvx+= vx2;
-               //}
-               //LBMReal vvy;
-               LBMReal vy2;
-               //{
-               //     vvy = mfccc-mfaaa;
-               //     m0  = mfaca-mfcac;
-               //     m1  = mfacc-mfcaa;
-               //     m2  = mfcca-mfaac;
-               //     vvy+= m0;
-               //     m1 += m2;
-               //     vvy+= m1;
-               //     vy2 = mfbca-mfbac;
-               //     m0  = mfbcc-mfbaa;
-               //     m1  = mfacb-mfcab;
-               //     m2  = mfccb-mfaab;
-               //     vy2+= m0;
-               //     m1 += m2;
-               //     vy2+= m1;
-               //     vvy+= vy2;
-               //     vy2 = mfbcb-mfbab;
-               //     vvy+= vy2;
-               //}
-               //LBMReal vvz;
-               LBMReal vz2;
-               //{
-               //     vvz = mfccc-mfaaa;
-               //     m0  = mfcac-mfaca;
-               //     m1  = mfacc-mfcaa;
-               //     m2  = mfaac-mfcca;
-               //     vvz+= m0;
-               //     m1 += m2;
-               //     vvz+= m1;
-               //     vz2 = mfbac-mfbca;
-               //     m0  = mfbcc-mfbaa;
-               //     m1  = mfabc-mfcba;
-               //     m2  = mfcbc-mfaba;
-               //     vz2+= m0;
-               //     m1 += m2;
-               //     vz2+= m1;
-               //     vvz+= vz2;
-               //     vz2 = mfbbc-mfbba;
-               //     vvz+= vz2;
-               //}
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               //LBMReal s9 = minusomega;
-               //test
-               //s9 = 0.;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// BGK
-               //////////////////////////////////////////////////////////////////////////////////////
-               ////2.
-               //mfabb += -s9 * (-mfabb);
-               //mfbab += -s9 * (-mfbab);
-               //mfbba += -s9 * (-mfbba);
-               //
-               //mfcaa += -s9 * (c1o3 * mfaaa - mfcaa);
-               //mfaca += -s9 * (c1o3 * mfaaa - mfaca);
-               //mfaac += -s9 * (c1o3 * mfaaa - mfaac);
-               //
-               ////3.
-               //mfabc += -s9 * (-mfabc);
-               //mfbac += -s9 * (-mfbac);
-               //
-               //mfacb += -s9 * (-mfacb);
-               //mfbca += -s9 * (-mfbca);
-               //mfcab += -s9 * (-mfcab);
-               //mfcba += -s9 * (-mfcba);
-               //mfbbb += -s9 * (-mfbbb);
-               ////4.
-               //mfacc += -s9 * (c1o9 * mfaaa - mfacc);
-               //mfcac += -s9 * (c1o9 * mfaaa - mfcac);
-               //mfcca += -s9 * (c1o9 * mfaaa - mfcca);
-               //mfbbc += -s9 * (-mfbbc);
-               //mfbcb += -s9 * (-mfbcb);
-               //mfcbb += -s9 * (-mfcbb);
-               ////5.
-               //mfbcc += -s9 * (-mfbcc);
-               //mfcbc += -s9 * (-mfcbc);
-               //mfccb += -s9 * (-mfccb);
-               ////6.
-               //mfccc += -s9 * (c1o27 * mfaaa - mfccc);
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               //LBMReal OxyyMxzz  = 1.;//2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               {
-                  LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-                  LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-                  LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-
-                  //relax
-                  mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-                  mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-                  mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               }
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-               
-               ////////////////////////////////////////////////////////////////////////////////////
-               //forcing
-               mfbaa=-mfbaa;
-               mfaba=-mfaba;
-               mfaab=-mfaab;
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// Cumulants
-               //////////////////////////////////////////////////////////////////////////////////////
-               //LBMReal OxxPyyPzz = 1.;
-               //LBMReal OxyyPxzz  = 2+s9;//1.;
-               //LBMReal OxyyMxzz  = 2+s9;//1.;
-               //LBMReal O4        = 1.;
-               //LBMReal O5        = 1.;
-               //LBMReal O6        = 1.;
-               ////Cum 4.
-               //LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3) * mfabb + 2. * mfbba * mfbab);
-               //LBMReal CUMbcb = mfbcb - ((mfaca + c1o3) * mfbab + 2. * mfbba * mfabb);
-               //LBMReal CUMbbc = mfbbc - ((mfaac + c1o3) * mfbba + 2. * mfbab * mfabb);
-               //LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba)- c1o3 * (mfcaa + mfaca);
-               //LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab)- c1o3 * (mfcaa + mfaac);
-               //LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb)- c1o3 * (mfaac + mfaca);
-               ////Cum 5.
-               //LBMReal CUMbcc = mfbcc - (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) //O(eps^5)
-               //   - c1o3 * (mfbca + mfbac); //O(eps^3)
-               //LBMReal CUMcbc = mfcbc - (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) //O(eps^5)
-               //   - c1o3 * (mfcba + mfabc); //O(eps^3)
-               //LBMReal CUMccb = mfccb - (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) //O(eps^5)
-               //   - c1o3 * (mfacb + mfcab);//O(eps^3)
-               ////Cum 6.
-               //LBMReal CUMccc = mfccc +(-4. *  mfbbb * mfbbb  //O(eps^6)
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca) // O(eps^4)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc) // O(eps^6)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) // O(esp^6)
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac) //O(eps^6)
-               //   +  2. * (mfcaa * mfaca * mfaac) //O(eps^6)
-               //   + 16. *  mfbba * mfbab * mfabb) //O(eps^6)
-               //   - c1o3* (mfacc + mfcac + mfcca) //O(eps^2)
-               //   + c1o9* (mfcaa + mfaca + mfaac) //O(eps^2)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)//O(eps^4)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3;//O(eps^4)
-               ////2.
-               //// linear combinations
-               //LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               //LBMReal mxxMyy    = mfcaa - mfaca;
-               //LBMReal mxxMzz         = mfcaa - mfaac;
-               //{
-               //   LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-               //   LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-               //   LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-               //   //relax
-               //   mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-               //   mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-               //   mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               //}
-               //mfabb     += -s9 * (-mfabb);
-               //mfbab     += -s9 * (-mfbab);
-               //mfbba     += -s9 * (-mfbba);
-               //// linear combinations back
-               //mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-               ////3.
-               //// linear combinations
-               //LBMReal mxxyPyzz = mfcba + mfabc;
-               //LBMReal mxxyMyzz = mfcba - mfabc;
-               //LBMReal mxxzPyyz = mfcab + mfacb;
-               //LBMReal mxxzMyyz = mfcab - mfacb;
-               //LBMReal mxyyPxzz = mfbca + mfbac;
-               //LBMReal mxyyMxzz = mfbca - mfbac;
-               ////relax
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mfbbb)/(abs(mfbbb)+qudricLimit);
-               //mfbbb     += wadjust * (-mfbbb);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxyPyzz)/(abs(mxxyPyzz)+qudricLimit);
-               //mxxyPyzz  += wadjust * (-mxxyPyzz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxyMyzz)/(abs(mxxyMyzz)+qudricLimit);
-               //mxxyMyzz  += wadjust * (-mxxyMyzz);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxzPyyz)/(abs(mxxzPyyz)+qudricLimit);
-               //mxxzPyyz  += wadjust * (-mxxzPyyz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxzMyyz)/(abs(mxxzMyyz)+qudricLimit);
-               //mxxzMyyz  += wadjust * (-mxxzMyyz);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxyyPxzz)/(abs(mxyyPxzz)+qudricLimit);
-               //mxyyPxzz  += wadjust * (-mxyyPxzz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxyyMxzz)/(abs(mxyyMxzz)+qudricLimit);
-               //mxyyMxzz  += wadjust * (-mxyyMxzz);
-               //// linear combinations back
-               //mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               //mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-               ////4.
-               //CUMacc += O4 * (-CUMacc);
-               //CUMcac += O4 * (-CUMcac);
-               //CUMcca += O4 * (-CUMcca);
-               //CUMbbc += O4 * (-CUMbbc);
-               //CUMbcb += O4 * (-CUMbcb);
-               //CUMcbb += O4 * (-CUMcbb);
-               ////5.
-               //CUMbcc += O5 * (-CUMbcc);
-               //CUMcbc += O5 * (-CUMcbc);
-               //CUMccb += O5 * (-CUMccb);
-               ////6.
-               //CUMccc += O6 * (-CUMccc);
-               ////back cumulants to central moments
-               ////4.
-               //mfcbb = CUMcbb + ((mfcaa + c1o3) * mfabb + 2. * mfbba * mfbab);
-               //mfbcb = CUMbcb + ((mfaca + c1o3) * mfbab + 2. * mfbba * mfabb);
-               //mfbbc = CUMbbc + ((mfaac + c1o3) * mfbba + 2. * mfbab * mfabb);
-               //mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca);
-               //mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac);
-               //mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca);
-               ////5.
-               //mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac);
-               //mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc);
-               //mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab);
-               ////6.
-               //mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-               //   +  2. * (mfcaa * mfaca * mfaac)
-               //   + 16. *  mfbba * mfbab * mfabb)
-               //   - c1o3* (mfacc + mfcac + mfcca)
-               //   + c1o9* (mfcaa + mfaca + mfaac)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3);
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mfaaa +=c1o216;
-               //mfaab +=c1o54;
-               //mfaac +=c1o216;
-               //mfaba +=c1o54;
-               //mfabb +=c2o27;
-               //mfabc +=c1o54;
-               //mfbaa +=c1o54;
-               //mfbab +=c2o27;
-               //mfbac +=c1o54;
-               //mfbba +=c2o27;
-               //mfbbb +=c8o27;
-               //mfbbc +=c2o27;
-               //mfaca +=c1o216;
-               //mfacb +=c1o54;
-               //mfacc +=c1o216;
-               //mfcaa +=c1o216;
-               //mfcab +=c1o54;
-               //mfcac +=c1o216;
-               //mfcca +=c1o216;
-               //mfccb +=c1o54;
-               //mfccc +=c1o216;
-               //mfbca +=c1o54;
-               //mfbcb +=c2o27;
-               //mfbcc +=c1o54;
-               //mfcba +=c1o54;
-               //mfcbb +=c2o27;
-               //mfcbc +=c1o54;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                                       +" dif="+UbSystem::toString(dif)
-                                       +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
-               (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,  x3)   = mfcab;
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
-               (*this->localDistributions)(D3Q27System::ET_TW,x1+1,x2,  x3)   = mfcba;
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2+1,x3)   = mfbca;
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,  x3)  = mfcaa;
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2+1,x3)  = mfaca;
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3)  = mfcca;
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,  x3    ) = mfcbb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2+1,x3    ) = mfbcb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3+1  ) = mfbbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3   ) = mfccb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2+1,x3   ) = mfacb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,  x3+1 ) = mfcbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3+1 ) = mfabc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2+1,x3+1 ) = mfbcc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3+1 ) = mfbac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1) = mfccc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2+1,x3+1) = mfacc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,  x3+1) = mfcac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3+1) = mfaac;
-
-               (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLB_Geier::collideAll3()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////
-
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-
-               LBMReal mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1); 
-               LBMReal mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3 );
-               LBMReal mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3);
-               LBMReal mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,x3+1 );
-               LBMReal mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,x3  );
-               LBMReal mfabc = (*this->localDistributions)(D3Q27System::ET_TW, x1+1,x2,x3);
-               LBMReal mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2+1,x3+1 );
-               LBMReal mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2+1,x3  );
-               LBMReal mfbac = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2+1,x3);
-               LBMReal mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3+1  );
-               LBMReal mfbbb = (*this->zeroDistributions)(x1,x2,x3);
-               LBMReal mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               LBMReal mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,x3+1);
-               LBMReal mfacb = (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,x3);
-               LBMReal mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,x3);
-               LBMReal mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2+1,x3+1);
-               LBMReal mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2+1,x3 );
-               LBMReal mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2+1,x3);
-               LBMReal mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3+1);
-               LBMReal mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               LBMReal mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               LBMReal mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3+1 );
-               LBMReal mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
-               LBMReal mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               LBMReal mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3+1 );
-               LBMReal mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               LBMReal mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               LBMReal m0, m1, m2;
-
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               //mfaaa -=c1o216;
-               //mfaab -=c1o54;
-               //mfaac -=c1o216;
-               //mfaba -=c1o54;
-               //mfabb -=c2o27;
-               //mfabc -=c1o54;
-               //mfbaa -=c1o54;
-               //mfbab -=c2o27;
-               //mfbac -=c1o54;
-               //mfbba -=c2o27;
-               //mfbbb -=c8o27;
-               //mfbbc -=c2o27;
-               //mfaca -=c1o216;
-               //mfacb -=c1o54;
-               //mfacc -=c1o216;
-               //mfcaa -=c1o216;
-               //mfcab -=c1o54;
-               //mfcac -=c1o216;
-               //mfcca -=c1o216;
-               //mfccb -=c1o54;
-               //mfccc -=c1o216;
-               //mfbca -=c1o54;
-               //mfbcb -=c2o27;
-               //mfbcc -=c1o54;
-               //mfcba -=c1o54;
-               //mfcbb -=c2o27;
-               //mfcbc -=c1o54;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-               ////////////////////////////////////////////////////////////////////////////////////
-               //fast
-               //LBMReal oMdrho = 1. - (mfccc+mfaaa + mfaca+mfcac + mfacc+mfcaa + mfaac+mfcca +
-               //                                   mfbac+mfbca + mfbaa+mfbcc + mfabc+mfcba + mfaba+mfcbc + mfacb+mfcab + mfaab+mfccb +
-               //                                   mfabb+mfcbb + mfbab+mfbcb  +  mfbba+mfbbc);//fehlt mfbbb
-               //LBMReal vvx    =mfccc-mfaaa + mfcac-mfaca + mfcaa-mfacc + mfcca-mfaac +
-               //                         mfcba-mfabc + mfcbc-mfaba + mfcab-mfacb + mfccb-mfaab +
-               //                         mfcbb-mfabb;
-               //LBMReal vvy    =mfccc-mfaaa + mfaca-mfcac + mfacc-mfcaa + mfcca-mfaac +
-               //                         mfbca-mfbac + mfbcc-mfbaa + mfacb-mfcab + mfccb-mfaab +
-               //                         mfbcb-mfbab;
-               //LBMReal vvz    =mfccc-mfaaa + mfcac-mfaca + mfacc-mfcaa + mfaac-mfcca +
-               //                         mfbac-mfbca + mfbcc-mfbaa + mfabc-mfcba + mfcbc-mfaba +
-               //                         mfbbc-mfbba;
-               ////////////////////////////////////////////////////////////////////////////////////
-               // oMdrho assembler style -------> faaaaaastaaaa
-               //LBMReal m0, m1, m2;
-               LBMReal oMdrho;
-               {
-                  oMdrho=mfccc+mfaaa;
-                  m0=mfaca+mfcac;
-                  m1=mfacc+mfcaa;
-                  m2=mfaac+mfcca;
-                  oMdrho+=m0;
-                  m1+=m2;
-                  oMdrho+=m1;
-                  m0=mfbac+mfbca;
-                  m1=mfbaa+mfbcc;
-                  m0+=m1;
-                  m1=mfabc+mfcba;
-                  m2=mfaba+mfcbc;
-                  m1+=m2;
-                  m0+=m1;
-                  m1=mfacb+mfcab;
-                  m2=mfaab+mfccb;
-                  m1+=m2;
-                  m0+=m1;
-                  oMdrho+=m0;
-                  m0=mfabb+mfcbb;
-                  m1=mfbab+mfbcb;
-                  m2=mfbba+mfbbc;
-                  m0+=m1+m2;
-                  m0+=mfbbb; //hat gefehlt
-                  oMdrho = 1. - (oMdrho + m0);
-               }
-               //LBMReal vvx;
-               LBMReal vx2;
-               //{
-               //     vvx = mfccc-mfaaa;
-               //     m0  = mfcac-mfaca;
-               //     m1  = mfcaa-mfacc;
-               //     m2  = mfcca-mfaac;
-               //     vvx+= m0;
-               //     m1 += m2;
-               //     vvx+= m1;
-               //     vx2 = mfcba-mfabc;
-               //     m0  = mfcbc-mfaba;
-               //     m1  = mfcab-mfacb;
-               //     m2  = mfccb-mfaab;
-               //     vx2+= m0;
-               //     m1 += m2;
-               //     vx2+= m1;
-               //     vvx+= vx2;
-               //     vx2 = mfcbb-mfabb;
-               //     vvx+= vx2;
-               //}
-               //LBMReal vvy;
-               LBMReal vy2;
-               //{
-               //     vvy = mfccc-mfaaa;
-               //     m0  = mfaca-mfcac;
-               //     m1  = mfacc-mfcaa;
-               //     m2  = mfcca-mfaac;
-               //     vvy+= m0;
-               //     m1 += m2;
-               //     vvy+= m1;
-               //     vy2 = mfbca-mfbac;
-               //     m0  = mfbcc-mfbaa;
-               //     m1  = mfacb-mfcab;
-               //     m2  = mfccb-mfaab;
-               //     vy2+= m0;
-               //     m1 += m2;
-               //     vy2+= m1;
-               //     vvy+= vy2;
-               //     vy2 = mfbcb-mfbab;
-               //     vvy+= vy2;
-               //}
-               //LBMReal vvz;
-               LBMReal vz2;
-               //{
-               //     vvz = mfccc-mfaaa;
-               //     m0  = mfcac-mfaca;
-               //     m1  = mfacc-mfcaa;
-               //     m2  = mfaac-mfcca;
-               //     vvz+= m0;
-               //     m1 += m2;
-               //     vvz+= m1;
-               //     vz2 = mfbac-mfbca;
-               //     m0  = mfbcc-mfbaa;
-               //     m1  = mfabc-mfcba;
-               //     m2  = mfcbc-mfaba;
-               //     vz2+= m0;
-               //     m1 += m2;
-               //     vz2+= m1;
-               //     vvz+= vz2;
-               //     vz2 = mfbbc-mfbba;
-               //     vvz+= vz2;
-               //}
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               //LBMReal s9 = minusomega;
-               //test
-               //s9 = 0.;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// BGK
-               //////////////////////////////////////////////////////////////////////////////////////
-               ////2.
-               //mfabb += -s9 * (-mfabb);
-               //mfbab += -s9 * (-mfbab);
-               //mfbba += -s9 * (-mfbba);
-               //
-               //mfcaa += -s9 * (c1o3 * mfaaa - mfcaa);
-               //mfaca += -s9 * (c1o3 * mfaaa - mfaca);
-               //mfaac += -s9 * (c1o3 * mfaaa - mfaac);
-               //
-               ////3.
-               //mfabc += -s9 * (-mfabc);
-               //mfbac += -s9 * (-mfbac);
-               //
-               //mfacb += -s9 * (-mfacb);
-               //mfbca += -s9 * (-mfbca);
-               //mfcab += -s9 * (-mfcab);
-               //mfcba += -s9 * (-mfcba);
-               //mfbbb += -s9 * (-mfbbb);
-               ////4.
-               //mfacc += -s9 * (c1o9 * mfaaa - mfacc);
-               //mfcac += -s9 * (c1o9 * mfaaa - mfcac);
-               //mfcca += -s9 * (c1o9 * mfaaa - mfcca);
-               //mfbbc += -s9 * (-mfbbc);
-               //mfbcb += -s9 * (-mfbcb);
-               //mfcbb += -s9 * (-mfcbb);
-               ////5.
-               //mfbcc += -s9 * (-mfbcc);
-               //mfcbc += -s9 * (-mfcbc);
-               //mfccb += -s9 * (-mfccb);
-               ////6.
-               //mfccc += -s9 * (c1o27 * mfaaa - mfccc);
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               LBMReal OxyyMxzz  = 2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               {
-                  LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-                  LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-                  LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-
-                  //relax
-                  mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-                  mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-                  mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               }
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               //////////////////////////////////////////////////////////////////////////////////////
-               //// Cumulants
-               //////////////////////////////////////////////////////////////////////////////////////
-               //LBMReal OxxPyyPzz = 1.;
-               //LBMReal OxyyPxzz  = 2+s9;//1.;
-               //LBMReal OxyyMxzz  = 2+s9;//1.;
-               //LBMReal O4        = 1.;
-               //LBMReal O5        = 1.;
-               //LBMReal O6        = 1.;
-               ////Cum 4.
-               //LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3) * mfabb + 2. * mfbba * mfbab);
-               //LBMReal CUMbcb = mfbcb - ((mfaca + c1o3) * mfbab + 2. * mfbba * mfabb);
-               //LBMReal CUMbbc = mfbbc - ((mfaac + c1o3) * mfbba + 2. * mfbab * mfabb);
-               //LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba)- c1o3 * (mfcaa + mfaca);
-               //LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab)- c1o3 * (mfcaa + mfaac);
-               //LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb)- c1o3 * (mfaac + mfaca);
-               ////Cum 5.
-               //LBMReal CUMbcc = mfbcc - (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) //O(eps^5)
-               //   - c1o3 * (mfbca + mfbac); //O(eps^3)
-               //LBMReal CUMcbc = mfcbc - (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) //O(eps^5)
-               //   - c1o3 * (mfcba + mfabc); //O(eps^3)
-               //LBMReal CUMccb = mfccb - (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) //O(eps^5)
-               //   - c1o3 * (mfacb + mfcab);//O(eps^3)
-               ////Cum 6.
-               //LBMReal CUMccc = mfccc +(-4. *  mfbbb * mfbbb  //O(eps^6)
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca) // O(eps^4)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc) // O(eps^6)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb)) // O(esp^6)
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac) //O(eps^6)
-               //   +  2. * (mfcaa * mfaca * mfaac) //O(eps^6)
-               //   + 16. *  mfbba * mfbab * mfabb) //O(eps^6)
-               //   - c1o3* (mfacc + mfcac + mfcca) //O(eps^2)
-               //   + c1o9* (mfcaa + mfaca + mfaac) //O(eps^2)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)//O(eps^4)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3;//O(eps^4)
-               ////2.
-               //// linear combinations
-               //LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               //LBMReal mxxMyy    = mfcaa - mfaca;
-               //LBMReal mxxMzz         = mfcaa - mfaac;
-               //{
-               //   LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-               //   LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-               //   LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-               //   //relax
-               //   mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-               //   mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-               //   mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               //}
-               //mfabb     += -s9 * (-mfabb);
-               //mfbab     += -s9 * (-mfbab);
-               //mfbba     += -s9 * (-mfbba);
-               //// linear combinations back
-               //mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               //mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-               ////3.
-               //// linear combinations
-               //LBMReal mxxyPyzz = mfcba + mfabc;
-               //LBMReal mxxyMyzz = mfcba - mfabc;
-               //LBMReal mxxzPyyz = mfcab + mfacb;
-               //LBMReal mxxzMyyz = mfcab - mfacb;
-               //LBMReal mxyyPxzz = mfbca + mfbac;
-               //LBMReal mxyyMxzz = mfbca - mfbac;
-               ////relax
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mfbbb)/(abs(mfbbb)+qudricLimit);
-               //mfbbb     += wadjust * (-mfbbb);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxyPyzz)/(abs(mxxyPyzz)+qudricLimit);
-               //mxxyPyzz  += wadjust * (-mxxyPyzz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxyMyzz)/(abs(mxxyMyzz)+qudricLimit);
-               //mxxyMyzz  += wadjust * (-mxxyMyzz);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxxzPyyz)/(abs(mxxzPyyz)+qudricLimit);
-               //mxxzPyyz  += wadjust * (-mxxzPyyz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxxzMyyz)/(abs(mxxzMyyz)+qudricLimit);
-               //mxxzMyyz  += wadjust * (-mxxzMyyz);
-               //wadjust    = OxyyPxzz+(1.-OxyyPxzz)*abs(mxyyPxzz)/(abs(mxyyPxzz)+qudricLimit);
-               //mxyyPxzz  += wadjust * (-mxyyPxzz);
-               //wadjust    = OxyyMxzz+(1.-OxyyMxzz)*abs(mxyyMxzz)/(abs(mxyyMxzz)+qudricLimit);
-               //mxyyMxzz  += wadjust * (-mxyyMxzz);
-               //// linear combinations back
-               //mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               //mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               //mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               //mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-               ////4.
-               //CUMacc += O4 * (-CUMacc);
-               //CUMcac += O4 * (-CUMcac);
-               //CUMcca += O4 * (-CUMcca);
-               //CUMbbc += O4 * (-CUMbbc);
-               //CUMbcb += O4 * (-CUMbcb);
-               //CUMcbb += O4 * (-CUMcbb);
-               ////5.
-               //CUMbcc += O5 * (-CUMbcc);
-               //CUMcbc += O5 * (-CUMcbc);
-               //CUMccb += O5 * (-CUMccb);
-               ////6.
-               //CUMccc += O6 * (-CUMccc);
-               ////back cumulants to central moments
-               ////4.
-               //mfcbb = CUMcbb + ((mfcaa + c1o3) * mfabb + 2. * mfbba * mfbab);
-               //mfbcb = CUMbcb + ((mfaca + c1o3) * mfbab + 2. * mfbba * mfabb);
-               //mfbbc = CUMbbc + ((mfaac + c1o3) * mfbba + 2. * mfbab * mfabb);
-               //mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca);
-               //mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac);
-               //mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca);
-               ////5.
-               //mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac);
-               //mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc);
-               //mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab);
-               ////6.
-               //mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-               //   -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-               //   -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-               //   -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-               //   +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-               //   +  2. * (mfcaa * mfaca * mfaac)
-               //   + 16. *  mfbba * mfbab * mfabb)
-               //   - c1o3* (mfacc + mfcac + mfcca)
-               //   + c1o9* (mfcaa + mfaca + mfaac)
-               //   +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-               //   +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3);
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mfaaa +=c1o216;
-               //mfaab +=c1o54;
-               //mfaac +=c1o216;
-               //mfaba +=c1o54;
-               //mfabb +=c2o27;
-               //mfabc +=c1o54;
-               //mfbaa +=c1o54;
-               //mfbab +=c2o27;
-               //mfbac +=c1o54;
-               //mfbba +=c2o27;
-               //mfbbb +=c8o27;
-               //mfbbc +=c2o27;
-               //mfaca +=c1o216;
-               //mfacb +=c1o54;
-               //mfacc +=c1o216;
-               //mfcaa +=c1o216;
-               //mfcab +=c1o54;
-               //mfcac +=c1o216;
-               //mfcca +=c1o216;
-               //mfccb +=c1o54;
-               //mfccc +=c1o216;
-               //mfbca +=c1o54;
-               //mfbcb +=c2o27;
-               //mfbcc +=c1o54;
-               //mfcba +=c1o54;
-               //mfcbb +=c2o27;
-               //mfcbc +=c1o54;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                     +" dif="+UbSystem::toString(dif)
-                     +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
-               (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,  x3)   = mfcab;
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
-               (*this->localDistributions)(D3Q27System::ET_TW,x1+1,x2,  x3)   = mfcba;
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2+1,x3)   = mfbca;
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,  x3)  = mfcaa;
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2+1,x3)  = mfaca;
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3)  = mfcca;
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,  x3    ) = mfcbb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2+1,x3    ) = mfbcb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3+1  ) = mfbbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3   ) = mfccb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2+1,x3   ) = mfacb;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,  x3+1 ) = mfcbc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3+1 ) = mfabc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2+1,x3+1 ) = mfbcc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3+1 ) = mfbac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1) = mfccc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2+1,x3+1) = mfacc;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,  x3+1) = mfcac;
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3+1) = mfaac;
-
-               (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27CCLB_Geier::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.h
deleted file mode 100644
index 8d2fbea6f8cb48ad25c051d0d1eaab5bb4135e27..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLB_Geier.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//Cascaded Cumulant LBM
-
-#ifndef LBMKernelETD3Q27CCLB_Geier_H
-#define LBMKernelETD3Q27CCLB_Geier_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-
-class LBMKernelETD3Q27CCLB_Geier;
-typedef boost::shared_ptr<LBMKernelETD3Q27CCLB_Geier> LBMKernelETD3Q27CCLB_GeierPtr;
-
-
-class LBMKernelETD3Q27CCLB_Geier :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27CCLB_Geier();
-   LBMKernelETD3Q27CCLB_Geier(int nx1, int nx2, int nx3, int option);
-   ~LBMKernelETD3Q27CCLB_Geier(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-      ar & OxyyMxzz; 
-      ar & option;
-   }
-
-   void collideAll();  
-   void collideAll2(); 
-   void collideAll3();
-   void init();
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal M_zXX, M_zYY, M_zZZ, M_zXY,    M_zXZ,  M_zYZ,
-      M_zXXY,    M_zXYY,    M_zXXZ,    M_zXZZ,   M_zYYZ,  M_zYZZ,  M_zXYZ,
-      M_zXXYY,   M_zXXZZ,   M_zYYZZ,   M_zXXYZ,  M_zXYYZ,  M_zXYZZ,
-      M_zXXYYZ,  M_zXXYZZ,  M_zXYYZZ,  M_zXXYYZZ;
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-      mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-   LBMReal MXXpMYYpMZZ,MXXmMYY, MXXmMZZ,
-      MXXYpMYZZ,MXXZpMYYZ,MXYYpMXZZ,  MXXYmMYZZ,MXXZmMYYZ,MXYYmMXZZ,
-      MXXYYppp,MXXYYpm2p, MXXYYppm2;
-   UbTimer timer;
-
-   LBMReal OxyyMxzz;
-   int option;
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   mu::value_type muX1,muX2,muX3;
-   mu::value_type muDeltaT;
-   mu::value_type muNue;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.cpp
deleted file mode 100644
index 09a24b3d47f4a6d8d66006a558fc52777f8ac48d..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.cpp
+++ /dev/null
@@ -1,1087 +0,0 @@
-#include "LBMKernelETD3Q27CCLBex.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "D3Q27EsoTwist3DSplittedVectorEx.h"
-#include <math.h>
-
-//#define PROOF_CORRECTNESS
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex::LBMKernelETD3Q27CCLBex()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex::LBMKernelETD3Q27CCLBex(int nx1, int nx2, int nx3, int option, Grid3DPtr grid) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3),
-     option(option),
-     grid(grid)
-{
-   this->compressible = false;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex::~LBMKernelETD3Q27CCLBex(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   int tnx1=nx1;
-   int tnx2=nx2;
-   int tnx3=nx3;
-   bX1=block.lock()->getX1();
-   bX2=block.lock()->getX2();
-   bX3=block.lock()->getX3();
-   level = block.lock()->getLevel();
-   if(!grid->getBlock(bX1+1,bX2,bX3,level) && !grid->isPeriodicX1()) tnx1++;
-   if(!grid->getBlock(bX1,bX2+1,bX3,level) && !grid->isPeriodicX2()) tnx2++;
-   if(!grid->getBlock(bX1,bX2,bX3+1,level) && !grid->isPeriodicX3()) tnx3++;
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVectorEx(tnx1, tnx2, tnx3, 0.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27CCLBex::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27CCLBex(nx1, nx2, nx3, option, grid));
-   kernel->setBlock(this->getBlock());
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   if (option == 0)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex>(kernel)->OxyyMxzz = 1.0;
-   }
-   else if (option == 1)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex>(kernel)->OxyyMxzz = 2.0 +(-collFactor);
-   }
-   
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex::setNewDistributions(int x1, int x2, int x3)
-{
-   int gX1 = bX1 * nx1 + x1-1;
-   int gX2 = bX2 * nx2 + x2-1;
-   int gX3 = bX3 * nx3 + x3-1;
-
-   int nbX1 = (gX1 + 1) / nx1;
-   int nbX2 = (gX2 + 1) / nx2;
-   int nbX3 = (gX3 + 1) / nx3;
-
-   lX1 = (gX1 + 1) - nbX1 * nx1;
-   lX2 = (gX2 + 1) - nbX2 * nx2;
-   lX3 = (gX3 + 1) - nbX3 * nx3;
-
-   Block3DPtr nblock = grid->getBlock(nbX1,nbX2,nbX3,level);
-
-   if (nblock)
-   {
-      localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(nblock->getKernel()->getDataSet()->getFdistributions())->getLocalDistributions();
-      nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(nblock->getKernel()->getDataSet()->getFdistributions())->getNonLocalDistributions();
-   }
-   else
-   {
-      localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-      nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-      lX1 = x1;
-      lX2 = x2;
-      lX3 = x3;
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = 0; //ghostLayerWidth;
-   int minX2 = 0; //ghostLayerWidth;
-   int minX3 = 0; //ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1; //-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2; //-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3; //-ghostLayerWidth;
-
-   int maxX1m = bcArrayMaxX1-1;
-   int maxX2m = bcArrayMaxX2-1;
-   int maxX3m = bcArrayMaxX3-1;
-
-   LBMReal mfaaa;
-   LBMReal mfaab;
-   LBMReal mfaac;
-   LBMReal mfaba;
-   LBMReal mfabb;
-   LBMReal mfabc;
-   LBMReal mfbaa;
-   LBMReal mfbab;
-   LBMReal mfbac;
-   LBMReal mfbba;
-   LBMReal mfbbb;
-   LBMReal mfbbc;
-   LBMReal mfaca;
-   LBMReal mfacb;
-   LBMReal mfacc;
-   LBMReal mfcaa;
-   LBMReal mfcab;
-   LBMReal mfcac;
-   LBMReal mfcca;
-   LBMReal mfccb;
-   LBMReal mfccc;
-   LBMReal mfbca;
-   LBMReal mfbcb;
-   LBMReal mfbcc;
-   LBMReal mfcba;
-   LBMReal mfcbb;
-   LBMReal mfcbc;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-               //////////////////////////////////////////////////////////////////////////
-               int x1p = x1 + 1;
-               int x2p = x2 + 1;
-               int x3p = x3 + 1;
-               if (x1 == maxX1m || x2 == maxX2m || x3 == maxX3m)
-               {
-                  setNewDistributions(x1p, x2p, x3p);
-                  mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2p, x3);
-                  mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,lX1,lX2,lX3);
-                  mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2, x3p);
-                  mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,lX1,lX2,lX3);
-                  mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2, x3);
-                  mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,lX1,lX2,lX3);
-                  mfabc = (*this->localDistributions)(D3Q27System::ET_TW, lX1,lX2,lX3);
-                  mfacb = (*this->localDistributions)(D3Q27System::ET_NW,lX1,lX2,lX3);
-                  mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1, x2p, x3p);
-                  mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,lX1,lX2,lX3);
-                  mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1, x2p, x3);
-                  mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,lX1,lX2,lX3);
-                  mfbac = (*this->localDistributions)(D3Q27System::ET_TS,lX1,lX2,lX3);
-                  mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,lX1,lX2,lX3);
-                  mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,lX1,lX2,lX3);
-
-                  setNewDistributions(x1, x2, x3p);
-                  mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,lX1,lX2,lX3);
-                  mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,lX1,lX2,lX3);
-                  mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,lX1,lX2,lX3);
-                  mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,lX1,lX2,lX3);
-
-                  localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-                  nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-                  mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-                  mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-                  mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-                  mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3); 
-                  mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-                  mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-                  mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-                  mfbbb = (*this->zeroDistributions)(x1,x2,x3);
-               }
-               else
-               {
-                  //localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-                  //nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-                  mfcbb = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-                  mfbcb = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3);
-                  mfbbc = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-                  mfccb = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-                  mfacb = (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,x3);
-                  mfcbc = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-                  mfabc = (*this->localDistributions)(D3Q27System::ET_TW, x1p,x2,x3);
-                  mfbcc = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-                  mfbac = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2p,x3);
-                  mfccc = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-                  mfacc = (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,x3);
-                  mfcac = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2p,x3);
-                  mfaac = (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3);
-
-                  mfabb = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,x3);
-                  mfbab = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2p,x3);
-                  mfbba = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3p);
-                  mfaab = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3);
-                  mfcab = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2p,x3 );
-                  mfaba = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,x3p );
-                  mfcba = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3p );
-                  mfbaa = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2p,x3p );
-                  mfbca = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3p );
-                  mfaaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p); 
-                  mfcaa = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2p,x3p);
-                  mfaca = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,x3p);
-                  mfcca = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3p);
-                  
-                  mfbbb = (*this->zeroDistributions)(x1,x2,x3);
-               }
-               LBMReal m0, m1, m2;
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-
-               //forcing 
-               ///////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = static_cast<double>(x1+ix1*bcArrayMaxX1);
-                  muX2 = static_cast<double>(x2+ix2*bcArrayMaxX2);
-                  muX3 = static_cast<double>(x3+ix3*bcArrayMaxX3);
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  vvx += forcingX1*0.5; // X
-                  vvy += forcingX2*0.5; // Y
-                  vvz += forcingX3*0.5; // Z
-               }
-               ///////////////////////////////////////////////////////////////////////////////////////////               
-
-               LBMReal oMdrho;
-               {
-                  oMdrho=mfccc+mfaaa;
-                  m0=mfaca+mfcac;
-                  m1=mfacc+mfcaa;
-                  m2=mfaac+mfcca;
-                  oMdrho+=m0;
-                  m1+=m2;
-                  oMdrho+=m1;
-                  m0=mfbac+mfbca;
-                  m1=mfbaa+mfbcc;
-                  m0+=m1;
-                  m1=mfabc+mfcba;
-                  m2=mfaba+mfcbc;
-                  m1+=m2;
-                  m0+=m1;
-                  m1=mfacb+mfcab;
-                  m2=mfaab+mfccb;
-                  m1+=m2;
-                  m0+=m1;
-                  oMdrho+=m0;
-                  m0=mfabb+mfcbb;
-                  m1=mfbab+mfbcb;
-                  m2=mfbba+mfbbc;
-                  m0+=m1+m2;
-                  m0+=mfbbb; //hat gefehlt
-                  oMdrho = 1. - (oMdrho + m0);
-               }
-               LBMReal vx2;
-               LBMReal vy2;
-               LBMReal vz2;
-
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               //LBMReal s9 = minusomega;
-               //test
-               //s9 = 0.;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               //LBMReal OxyyMxzz  = 1.;//2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               {
-                  LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-                  LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-                  LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-
-                  //relax
-                  mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-                  mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-                  mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               }
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-               
-               ////////////////////////////////////////////////////////////////////////////////////
-               //forcing
-               mfbaa=-mfbaa;
-               mfaba=-mfaba;
-               mfaab=-mfaab;
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                                       +" dif="+UbSystem::toString(dif)
-                                       +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               if (x1 == maxX1m || x2 == maxX2m || x3 == maxX3m)
-               {
-                  setNewDistributions(x1p, x2, x3);
-                  (*this->localDistributions)(D3Q27System::ET_NW,lX1,lX2,lX3) = mfcab;
-                  (*this->localDistributions)(D3Q27System::ET_TW,lX1,lX2,lX3) = mfcba;
-                  (*this->localDistributions)(D3Q27System::ET_TNW,lX1,lX2,lX3) = mfcaa;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_W,lX1,lX2,lX3) = mfcbb;
-
-                  setNewDistributions(x1, x2p, x3);
-                  (*this->localDistributions)(D3Q27System::ET_TS,lX1,lX2,lX3) = mfbca;
-                  (*this->localDistributions)(D3Q27System::ET_TSE,lX1,lX2,lX3) = mfaca;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_S,lX1,lX2,lX3) = mfbcb;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_SE,lX1,lX2,lX3) = mfacb;
-
-                  setNewDistributions(x1p, x2p, x3);
-                  (*this->localDistributions)(D3Q27System::ET_TSW,lX1,lX2,lX3) = mfcca;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_SW,lX1,lX2,lX3) = mfccb;
-
-                  setNewDistributions(x1p, x2, x3p);
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BW,lX1,lX2,lX3) = mfcbc;  
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BNW,lX1,lX2,lX3) = mfcac;
-
-                  setNewDistributions(x1, x2, x3p);
-                  (*this->nonLocalDistributions)(D3Q27System::ET_B,lX1,lX2,lX3) = mfbbc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BE,lX1,lX2,lX3) = mfabc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BN,lX1,lX2,lX3) = mfbac;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BNE,lX1,lX2,lX3) = mfaac;
-
-                  setNewDistributions(x1, x2p, x3p);
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BS,lX1,lX2,lX3) = mfbcc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BSE,lX1,lX2,lX3) = mfacc;
-
-                  setNewDistributions(x1p, x2p, x3p);
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BSW,lX1,lX2,lX3) = mfccc;
-
-                  localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-                  nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-                  (*this->localDistributions)(D3Q27System::ET_E,x1,x2,x3) = mfabb;
-                  (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3) = mfbab;
-                  (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3) = mfbba;
-                  (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3) = mfaab;
-                  (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3) = mfaba;
-                  (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3) = mfbaa;
-                  (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3) = mfaaa;
-
-                  (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               }
-               else
-               {
-                  //localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-                  //nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-                  (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3)    = mfabb;
-                  (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3)    = mfbab;
-                  (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3)    = mfbba;
-                  (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3)   = mfaab;
-                  (*this->localDistributions)(D3Q27System::ET_NW,x1p,x2,  x3)   = mfcab;
-                  (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3)   = mfaba;
-                  (*this->localDistributions)(D3Q27System::ET_TW,x1p,x2,  x3)   = mfcba;
-                  (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3)   = mfbaa;
-                  (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2p,x3)   = mfbca;
-                  (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3)  = mfaaa;
-                  (*this->localDistributions)(D3Q27System::ET_TNW,x1p,x2,  x3)  = mfcaa;
-                  (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2p,x3)  = mfaca;
-                  (*this->localDistributions)(D3Q27System::ET_TSW,x1p,x2p,x3)  = mfcca;
-
-                  (*this->nonLocalDistributions)(D3Q27System::ET_W,x1p,x2,  x3    ) = mfcbb;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2p,x3    ) = mfbcb;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3p  ) = mfbbc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1p,x2p,x3   ) = mfccb;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2p,x3   ) = mfacb;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1p,x2,  x3p ) = mfcbc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3p ) = mfabc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2p,x3p ) = mfbcc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3p ) = mfbac;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1p,x2p,x3p) = mfccc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2p,x3p) = mfacc;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1p,x2,  x3p) = mfcac;
-                  (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3p) = mfaac;
-
-                  (*this->zeroDistributions)(x1,x2,x3) = mfbbb;
-               }
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27CCLBex::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.h
deleted file mode 100644
index 43778df2b5bc70ea4d314fd8446d63fb19caf016..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//Cascaded Cumulant LBM
-
-#ifndef LBMKernelETD3Q27CCLBEX_H
-#define LBMKernelETD3Q27CCLBEX_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-#include "Grid3D.h"
-
-class LBMKernelETD3Q27CCLBex;
-typedef boost::shared_ptr<LBMKernelETD3Q27CCLBex> LBMKernelETD3Q27CCLBexPtr;
-
-
-class LBMKernelETD3Q27CCLBex :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27CCLBex();
-   LBMKernelETD3Q27CCLBex(int nx1, int nx2, int nx3, int option, Grid3DPtr grid);
-   ~LBMKernelETD3Q27CCLBex(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-      ar & OxyyMxzz; 
-   }
-
-   void collideAll();  
-   void init();
-   void setNewDistributions(int x1, int x2, int x3);
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-      mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-
-   UbTimer timer;
-
-   LBMReal OxyyMxzz;
-   int option;
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   mu::value_type muX1,muX2,muX3;
-   mu::value_type muDeltaT;
-   mu::value_type muNue;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-   Grid3DPtr grid;
-   int lX1, lX2, lX3;
-   int bX1;
-   int bX2;
-   int bX3;
-   int level;
-   UbTupleInt3 blockNX;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.cpp
deleted file mode 100644
index ff8bcf2f1031d03ebdec38916d6ed5d27ab7eb2a..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.cpp
+++ /dev/null
@@ -1,1078 +0,0 @@
-#include "LBMKernelETD3Q27CCLBex2.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-
-#include <math.h>
-
-#define PROOF_CORRECTNESS
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex2::LBMKernelETD3Q27CCLBex2()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex2::LBMKernelETD3Q27CCLBex2(int nx1, int nx2, int nx3, int option, Grid3DPtr grid) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3),
-     option(option),
-     grid(grid)
-{
-   this->compressible = false;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CCLBex2::~LBMKernelETD3Q27CCLBex2(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex2::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   int tnx1=nx1;
-   int tnx2=nx2;
-   int tnx3=nx3;
-   bX1=block.lock()->getX1();
-   bX2=block.lock()->getX2();
-   bX3=block.lock()->getX3();
-   level = block.lock()->getLevel();
-   if(!grid->getBlock(bX1+1,bX2,bX3,level) && !grid->isPeriodicX1()) tnx1++;
-   if(!grid->getBlock(bX1,bX2+1,bX3,level) && !grid->isPeriodicX2()) tnx2++;
-   if(!grid->getBlock(bX1,bX2,bX3+1,level) && !grid->isPeriodicX3()) tnx3++;
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSoA(tnx1, tnx2, tnx3, 0.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27CCLBex2::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27CCLBex2(nx1, nx2, nx3, option, grid));
-   kernel->setBlock(this->getBlock());
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex2>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   if (option == 0)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex2>(kernel)->OxyyMxzz = 1.0;
-   }
-   else if (option == 1)
-   {
-      boost::dynamic_pointer_cast<LBMKernelETD3Q27CCLBex2>(kernel)->OxyyMxzz = 2.0 +(-collFactor);
-   }
-   
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex2::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex2::setNewDistributions(int x1, int x2, int x3)
-{
-   int gX1 = bX1 * nx1 + x1-1;
-   int gX2 = bX2 * nx2 + x2-1;
-   int gX3 = bX3 * nx3 + x3-1;
-
-   int nbX1 = (gX1 + 1) / nx1;
-   int nbX2 = (gX2 + 1) / nx2;
-   int nbX3 = (gX3 + 1) / nx3;
-
-   lX1 = (gX1 + 1) - nbX1 * nx1;
-   lX2 = (gX2 + 1) - nbX2 * nx2;
-   lX3 = (gX3 + 1) - nbX3 * nx3;
-
-   Block3DPtr nblock = grid->getBlock(nbX1,nbX2,nbX3,level);
-
-   if (nblock)
-   {
-      d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(nblock->getKernel()->getDataSet()->getFdistributions())->getDistributions();
-   }
-   else
-   {
-      d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-      lX1 = x1;
-      lX2 = x2;
-      lX3 = x3;
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CCLBex2::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-
-   d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-
-   int minX1 = 0; //ghostLayerWidth;
-   int minX2 = 0; //ghostLayerWidth;
-   int minX3 = 0; //ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1; //-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2; //-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3; //-ghostLayerWidth;
-
-   int maxX1m = bcArrayMaxX1-1;
-   int maxX2m = bcArrayMaxX2-1;
-   int maxX3m = bcArrayMaxX3-1;
-
-   LBMReal mfaaa;
-   LBMReal mfaab;
-   LBMReal mfaac;
-   LBMReal mfaba;
-   LBMReal mfabb;
-   LBMReal mfabc;
-   LBMReal mfbaa;
-   LBMReal mfbab;
-   LBMReal mfbac;
-   LBMReal mfbba;
-   LBMReal mfbbb;
-   LBMReal mfbbc;
-   LBMReal mfaca;
-   LBMReal mfacb;
-   LBMReal mfacc;
-   LBMReal mfcaa;
-   LBMReal mfcab;
-   LBMReal mfcac;
-   LBMReal mfcca;
-   LBMReal mfccb;
-   LBMReal mfccc;
-   LBMReal mfbca;
-   LBMReal mfbcb;
-   LBMReal mfbcc;
-   LBMReal mfcba;
-   LBMReal mfcbb;
-   LBMReal mfcbc;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               //E   N  T
-               //c   c  c
-               //////////
-               //W   S  B
-               //a   a  a
-
-               //Rest ist b
-               //////////////////////////////////////////////////////////////////////////
-               int x1p = x1 + 1;
-               int x2p = x2 + 1;
-               int x3p = x3 + 1;
-               if (x1 == maxX1m || x2 == maxX2m || x3 == maxX3m)
-               {
-                  setNewDistributions(x1p, x2p, x3p);
-                  mfaaa = (*d.BSW)(lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2p, x3);
-                  mfaab = (*d.SW)(lX1,lX2,lX3);
-                  mfaac = (*d.TSW)(lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2, x3p);
-                  mfaba = (*d.BW)(lX1,lX2,lX3);
-                  mfaca = (*d.BNW)(lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1p, x2, x3);
-                  mfabb = (*d.W)(lX1,lX2,lX3);
-                  mfabc = (*d.TW)(lX1,lX2,lX3);
-                  mfacb = (*d.NW)(lX1,lX2,lX3);
-                  mfacc = (*d.TNW)(lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1, x2p, x3p);
-                  mfbaa = (*d.BS)(lX1,lX2,lX3);
-                  mfcaa = (*d.BSE)(lX1,lX2,lX3);
-                  
-                  setNewDistributions(x1, x2p, x3);
-                  mfbab = (*d.S)(lX1,lX2,lX3);
-                  mfbac = (*d.TS)(lX1,lX2,lX3);
-                  mfcac = (*d.TSE)(lX1,lX2,lX3);
-                  mfcab = (*d.SE)(lX1,lX2,lX3);
-
-                  setNewDistributions(x1, x2, x3p);
-                  mfbba = (*d.B)(lX1,lX2,lX3);
-                  mfcca = (*d.BNE)(lX1,lX2,lX3);
-                  mfbca = (*d.BN)(lX1,lX2,lX3);
-                  mfcba = (*d.BE)(lX1,lX2,lX3);
-
-                  d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-                  mfbbc = (*d.T)(x1,x2,x3);
-                  mfccb = (*d.NE)(x1,x2,x3);
-                  mfccc = (*d.TNE)(x1,x2,x3);
-                  mfbcb = (*d.N)(x1,x2,x3); 
-                  mfbcc = (*d.TN)(x1,x2,x3);
-                  mfcbb = (*d.E)(x1,x2,x3);
-                  mfcbc = (*d.TE)(x1,x2,x3);
-                  mfbbb = (*d.ZERO)(x1,x2,x3);
-               }
-               else
-               {
-                  //d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-                  mfaaa = (*d.BSW)(x1p,x2p,x3p); 
-                  mfaab = (*d.SW)(x1p,x2p,x3 );
-                  mfaac = (*d.TSW)(x1p,x2p,x3);
-                  mfaba = (*d.BW)(x1p,x2,x3p );
-                  mfabb = (*d.W)(x1p,x2,x3  );
-                  mfabc = (*d.TW)(x1p,x2,x3);
-                  mfbaa = (*d.BS)(x1,x2p,x3p );
-                  mfbab = (*d.S)(x1,x2p,x3  );
-                  mfbac = (*d.TS)(x1,x2p,x3);
-                  mfbba = (*d.B)(x1,x2,x3p  );
-                  mfbbb = (*d.ZERO)(x1,x2,x3);
-                  mfbbc = (*d.T)(x1,x2,x3);
-                  mfaca = (*d.BNW)(x1p,x2,x3p);
-                  mfacb = (*d.NW)(x1p,x2,x3);
-                  mfacc = (*d.TNW)(x1p,x2,x3);
-                  mfcaa = (*d.BSE)(x1,x2p,x3p);
-                  mfcab = (*d.SE)(x1,x2p,x3 );
-                  mfcac = (*d.TSE)(x1,x2p,x3);
-                  mfcca = (*d.BNE)(x1,x2,x3p);
-                  mfccb = (*d.NE)(x1,x2,x3);
-                  mfccc = (*d.TNE)(x1,x2,x3);
-                  mfbca = (*d.BN)(x1,x2,x3p );
-                  mfbcb = (*d.N)(x1,x2,x3); 
-                  mfbcc = (*d.TN)(x1,x2,x3);
-                  mfcba = (*d.BE)(x1,x2,x3p );
-                  mfcbb = (*d.E)(x1,x2,x3);
-                  mfcbc = (*d.TE)(x1,x2,x3);
-               }
-               LBMReal m0, m1, m2;
-
-
-               LBMReal rho=(mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb;
-
-               LBMReal vvx    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfcaa-mfacc) + (mfcca-mfaac))) +
-                  (((mfcba-mfabc) + (mfcbc-mfaba)) + ((mfcab-mfacb) + (mfccb-mfaab))) +
-                  (mfcbb-mfabb));
-               LBMReal vvy    =((((mfccc-mfaaa) + (mfaca-mfcac)) + ((mfacc-mfcaa) + (mfcca-mfaac))) +
-                  (((mfbca-mfbac) + (mfbcc-mfbaa)) + ((mfacb-mfcab) + (mfccb-mfaab))) +
-                  (mfbcb-mfbab));
-               LBMReal vvz    =((((mfccc-mfaaa) + (mfcac-mfaca)) + ((mfacc-mfcaa) + (mfaac-mfcca))) +
-                  (((mfbac-mfbca) + (mfbcc-mfbaa)) + ((mfabc-mfcba) + (mfcbc-mfaba))) +
-                  (mfbbc-mfbba));
-
-               //forcing 
-               ///////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = static_cast<double>(x1+ix1*bcArrayMaxX1);
-                  muX2 = static_cast<double>(x2+ix2*bcArrayMaxX2);
-                  muX3 = static_cast<double>(x3+ix3*bcArrayMaxX3);
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  vvx += forcingX1*0.5; // X
-                  vvy += forcingX2*0.5; // Y
-                  vvz += forcingX3*0.5; // Z
-               }
-               ///////////////////////////////////////////////////////////////////////////////////////////               
-
-               LBMReal oMdrho;
-               {
-                  oMdrho=mfccc+mfaaa;
-                  m0=mfaca+mfcac;
-                  m1=mfacc+mfcaa;
-                  m2=mfaac+mfcca;
-                  oMdrho+=m0;
-                  m1+=m2;
-                  oMdrho+=m1;
-                  m0=mfbac+mfbca;
-                  m1=mfbaa+mfbcc;
-                  m0+=m1;
-                  m1=mfabc+mfcba;
-                  m2=mfaba+mfcbc;
-                  m1+=m2;
-                  m0+=m1;
-                  m1=mfacb+mfcab;
-                  m2=mfaab+mfccb;
-                  m1+=m2;
-                  m0+=m1;
-                  oMdrho+=m0;
-                  m0=mfabb+mfcbb;
-                  m1=mfbab+mfbcb;
-                  m2=mfbba+mfbbc;
-                  m0+=m1+m2;
-                  m0+=mfbbb; //hat gefehlt
-                  oMdrho = 1. - (oMdrho + m0);
-               }
-               LBMReal vx2;
-               LBMReal vy2;
-               LBMReal vz2;
-
-               vx2=vvx*vvx;
-               vy2=vvy*vvy;
-               vz2=vvz*vvz;
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal wadjust;
-               LBMReal qudricLimit = 0.01;
-               //LBMReal s9 = minusomega;
-               //test
-               //s9 = 0.;
-               ////////////////////////////////////////////////////////////////////////////////////
-               //Hin
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36  Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m2    = mfaaa + mfaac;
-               m1    = mfaac - mfaaa;
-               m0    = m2          + mfaab;
-               mfaaa = m0;
-               m0   += c1o36 * oMdrho;   
-               mfaab = m1 -        m0 * vvz;
-               mfaac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfabc;
-               m1    = mfabc  - mfaba;
-               m0    = m2          + mfabb;
-               mfaba = m0;
-               m0   += c1o9 * oMdrho;
-               mfabb = m1 -        m0 * vvz;
-               mfabc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfacc;
-               m1    = mfacc  - mfaca;
-               m0    = m2          + mfacb;
-               mfaca = m0;
-               m0   += c1o36 * oMdrho;
-               mfacb = m1 -        m0 * vvz;
-               mfacc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbac;
-               m1    = mfbac - mfbaa;
-               m0    = m2          + mfbab;
-               mfbaa = m0;
-               m0   += c1o9 * oMdrho;
-               mfbab = m1 -        m0 * vvz;
-               mfbac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbba  + mfbbc;
-               m1    = mfbbc  - mfbba;
-               m0    = m2          + mfbbb;
-               mfbba = m0;
-               m0   += c4o9 * oMdrho;
-               mfbbb = m1 -        m0 * vvz;
-               mfbbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbca  + mfbcc;
-               m1    = mfbcc  - mfbca;
-               m0    = m2          + mfbcb;
-               mfbca = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcb = m1 -        m0 * vvz;
-               mfbcc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcac;
-               m1    = mfcac - mfcaa;
-               m0    = m2          + mfcab;
-               mfcaa = m0;
-               m0   += c1o36 * oMdrho;
-               mfcab = m1 -        m0 * vvz;
-               mfcac = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcba  + mfcbc;
-               m1    = mfcbc  - mfcba;
-               m0    = m2          + mfcbb;
-               mfcba = m0;
-               m0   += c1o9 * oMdrho;
-               mfcbb = m1 -        m0 * vvz;
-               mfcbc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcca  + mfccc;
-               m1    = mfccc  - mfcca;
-               m0    = m2          + mfccb;
-               mfcca = m0;
-               m0   += c1o36 * oMdrho;
-               mfccb = m1 -        m0 * vvz;
-               mfccc = m2 - 2. *   m1 * vvz + vz2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit  1/6, 0, 1/18, 2/3, 0, 2/9, 1/6, 0, 1/18 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m2    = mfaaa + mfaca;
-               m1    = mfaca - mfaaa;
-               m0    = m2          + mfaba;
-               mfaaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfaba = m1 -        m0 * vvy;
-               mfaca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab  + mfacb;
-               m1    = mfacb  - mfaab;
-               m0    = m2          + mfabb;
-               mfaab = m0;
-               mfabb = m1 -        m0 * vvy;
-               mfacb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac  + mfacc;
-               m1    = mfacc  - mfaac;
-               m0    = m2          + mfabc;
-               mfaac = m0;
-               m0   += c1o18 * oMdrho;
-               mfabc = m1 -        m0 * vvy;
-               mfacc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbaa + mfbca;
-               m1    = mfbca - mfbaa;
-               m0    = m2          + mfbba;
-               mfbaa = m0;
-               m0   += c2o3 * oMdrho;
-               mfbba = m1 -        m0 * vvy;
-               mfbca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbab  + mfbcb;
-               m1    = mfbcb  - mfbab;
-               m0    = m2          + mfbbb;
-               mfbab = m0;
-               mfbbb = m1 -        m0 * vvy;
-               mfbcb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfbac  + mfbcc;
-               m1    = mfbcc  - mfbac;
-               m0    = m2          + mfbbc;
-               mfbac = m0;
-               m0   += c2o9 * oMdrho;
-               mfbbc = m1 -        m0 * vvy;
-               mfbcc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcaa + mfcca;
-               m1    = mfcca - mfcaa;
-               m0    = m2          + mfcba;
-               mfcaa = m0;
-               m0   += c1o6 * oMdrho;
-               mfcba = m1 -        m0 * vvy;
-               mfcca = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcab  + mfccb;
-               m1    = mfccb  - mfcab;
-               m0    = m2          + mfcbb;
-               mfcab = m0;
-               mfcbb = m1 -        m0 * vvy;
-               mfccb = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfcac  + mfccc;
-               m1    = mfccc  - mfcac;
-               m0    = m2          + mfcbc;
-               mfcac = m0;
-               m0   += c1o18 * oMdrho;
-               mfcbc = m1 -        m0 * vvy;
-               mfccc = m2 - 2. *   m1 * vvy + vy2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               // mit     1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9            Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m2    = mfaaa + mfcaa;
-               m1    = mfcaa - mfaaa;
-               m0    = m2          + mfbaa;
-               mfaaa = m0;
-               m0   += 1. * oMdrho;
-               mfbaa = m1 -        m0 * vvx;
-               mfcaa = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaba  + mfcba;
-               m1    = mfcba  - mfaba;
-               m0    = m2          + mfbba;
-               mfaba = m0;
-               mfbba = m1 -        m0 * vvx;
-               mfcba = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaca  + mfcca;
-               m1    = mfcca  - mfaca;
-               m0    = m2          + mfbca;
-               mfaca = m0;
-               m0   += c1o3 * oMdrho;
-               mfbca = m1 -        m0 * vvx;
-               mfcca = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaab + mfcab;
-               m1    = mfcab - mfaab;
-               m0    = m2          + mfbab;
-               mfaab = m0;
-               mfbab = m1 -        m0 * vvx;
-               mfcab = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabb  + mfcbb;
-               m1    = mfcbb  - mfabb;
-               m0    = m2          + mfbbb;
-               mfabb = m0;
-               mfbbb = m1 -        m0 * vvx;
-               mfcbb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacb  + mfccb;
-               m1    = mfccb  - mfacb;
-               m0    = m2          + mfbcb;
-               mfacb = m0;
-               mfbcb = m1 -        m0 * vvx;
-               mfccb = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfaac + mfcac;
-               m1    = mfcac - mfaac;
-               m0    = m2          + mfbac;
-               mfaac = m0;
-               m0   += c1o3 * oMdrho;
-               mfbac = m1 -        m0 * vvx;
-               mfcac = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfabc  + mfcbc;
-               m1    = mfcbc  - mfabc;
-               m0    = m2          + mfbbc;
-               mfabc = m0;
-               mfbbc = m1 -        m0 * vvx;
-               mfcbc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m2    = mfacc  + mfccc;
-               m1    = mfccc  - mfacc;
-               m0    = m2          + mfbcc;
-               mfacc = m0;
-               m0   += c1o9 * oMdrho;
-               mfbcc = m1 -        m0 * vvx;
-               mfccc = m2 - 2. *   m1 * vvx + vx2 * m0;
-               ////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Cumulants
-               ////////////////////////////////////////////////////////////////////////////////////
-               LBMReal OxxPyyPzz = 1.;
-               LBMReal OxyyPxzz  = 1.;//-s9;//2+s9;//
-               //LBMReal OxyyMxzz  = 1.;//2+s9;//
-               LBMReal O4        = 1.;
-               LBMReal O5        = 1.;
-               LBMReal O6        = 1.;
-
-               //Cum 4.
-               LBMReal CUMcbb = mfcbb - ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               LBMReal CUMbcb = mfbcb - ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               LBMReal CUMbbc = mfbbc - ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               LBMReal CUMcca = mfcca - (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMcac = mfcac - (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               LBMReal CUMacc = mfacc - (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //Cum 5.
-               LBMReal CUMbcc = (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) - c1o3 * (mfbca + mfbac) * oMdrho;
-               LBMReal CUMcbc = (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) - c1o3 * (mfcba + mfabc) * oMdrho;
-               LBMReal CUMccb = (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) - c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //Cum 6.
-               LBMReal CUMccc = mfccc  +((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) +c1o27*oMdrho;
-
-               //2.
-               // linear combinations
-               LBMReal mxxPyyPzz = mfcaa + mfaca + mfaac;
-               LBMReal mxxMyy    = mfcaa - mfaca;
-               LBMReal mxxMzz         = mfcaa - mfaac;
-
-               {
-                  LBMReal dxux = c1o2 * (s9 *(mxxMyy + mxxMzz) + (mfaaa - mxxPyyPzz));
-                  LBMReal dyuy = dxux - s9 * c3o2 * mxxMyy;
-                  LBMReal dzuz = dxux - s9 * c3o2 * mxxMzz;
-
-                  //relax
-                  mxxPyyPzz += OxxPyyPzz*(mfaaa  - mxxPyyPzz)- 3. * (1. - c1o2 * OxxPyyPzz) * (vx2 * dxux + vy2 * dyuy + vz2 * dzuz);
-                  mxxMyy    += -s9 * (-mxxMyy) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vy2 * dyuy);
-                  mxxMzz    += -s9 * (-mxxMzz) - 3. * (1. + c1o2 * s9) * (vx2 * dxux + vz2 * dzuz);
-               }
-               mfabb     += -s9 * (-mfabb);
-               mfbab     += -s9 * (-mfbab);
-               mfbba     += -s9 * (-mfbba);
-
-               // linear combinations back
-               mfcaa = c1o3 * (       mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaca = c1o3 * (-2. *  mxxMyy +      mxxMzz + mxxPyyPzz);
-               mfaac = c1o3 * (       mxxMyy - 2. * mxxMzz + mxxPyyPzz);
-
-               //3.
-               // linear combinations
-               LBMReal mxxyPyzz = mfcba + mfabc;
-               LBMReal mxxyMyzz = mfcba - mfabc;
-
-               LBMReal mxxzPyyz = mfcab + mfacb;
-               LBMReal mxxzMyyz = mfcab - mfacb;
-
-               LBMReal mxyyPxzz = mfbca + mfbac;
-               LBMReal mxyyMxzz = mfbca - mfbac;
-
-               //relax
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mfbbb)/(fabs(mfbbb)+qudricLimit);
-               mfbbb     += wadjust * (-mfbbb);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxyPyzz)/(fabs(mxxyPyzz)+qudricLimit);
-               mxxyPyzz  += wadjust * (-mxxyPyzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxyMyzz)/(fabs(mxxyMyzz)+qudricLimit);
-               mxxyMyzz  += wadjust * (-mxxyMyzz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxxzPyyz)/(fabs(mxxzPyyz)+qudricLimit);
-               mxxzPyyz  += wadjust * (-mxxzPyyz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxxzMyyz)/(fabs(mxxzMyyz)+qudricLimit);
-               mxxzMyyz  += wadjust * (-mxxzMyyz);
-               wadjust    = OxyyPxzz+(1.-OxyyPxzz)*fabs(mxyyPxzz)/(fabs(mxyyPxzz)+qudricLimit);
-               mxyyPxzz  += wadjust * (-mxyyPxzz);
-               wadjust    = OxyyMxzz+(1.-OxyyMxzz)*fabs(mxyyMxzz)/(fabs(mxyyMxzz)+qudricLimit);
-               mxyyMxzz  += wadjust * (-mxyyMxzz);
-
-               // linear combinations back
-               mfcba = ( mxxyMyzz + mxxyPyzz) * c1o2;
-               mfabc = (-mxxyMyzz + mxxyPyzz) * c1o2;
-               mfcab = ( mxxzMyyz + mxxzPyyz) * c1o2;
-               mfacb = (-mxxzMyyz + mxxzPyyz) * c1o2;
-               mfbca = ( mxyyMxzz + mxyyPxzz) * c1o2;
-               mfbac = (-mxyyMxzz + mxyyPxzz) * c1o2;
-
-               //4.
-               CUMacc += O4 * (-CUMacc);
-               CUMcac += O4 * (-CUMcac);
-               CUMcca += O4 * (-CUMcca);
-
-               CUMbbc += O4 * (-CUMbbc);
-               CUMbcb += O4 * (-CUMbcb);
-               CUMcbb += O4 * (-CUMcbb);
-
-               //5.
-               CUMbcc += O5 * (-CUMbcc);
-               CUMcbc += O5 * (-CUMcbc);
-               CUMccb += O5 * (-CUMccb);
-
-               //6.
-               CUMccc += O6 * (-CUMccc);
-
-               //back cumulants to central moments
-               //4.
-               mfcbb = CUMcbb + ((mfcaa + c1o3 * oMdrho) * mfabb + 2. * mfbba * mfbab);
-               mfbcb = CUMbcb + ((mfaca + c1o3 * oMdrho) * mfbab + 2. * mfbba * mfabb);
-               mfbbc = CUMbbc + ((mfaac + c1o3 * oMdrho) * mfbba + 2. * mfbab * mfabb);
-
-               mfcca = CUMcca + (mfcaa * mfaca + 2. * mfbba * mfbba) + c1o3 * (mfcaa + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfcac = CUMcac + (mfcaa * mfaac + 2. * mfbab * mfbab) + c1o3 * (mfcaa + mfaac) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-               mfacc = CUMacc + (mfaac * mfaca + 2. * mfabb * mfabb) + c1o3 * (mfaac + mfaca) * oMdrho + c1o9*(oMdrho-1)*oMdrho;
-
-               //5.
-               mfbcc = CUMbcc + (mfaac * mfbca + mfaca * mfbac + 4. * mfabb * mfbbb + 2. * (mfbab * mfacb + mfbba * mfabc)) + c1o3 * (mfbca + mfbac) * oMdrho;
-               mfcbc = CUMcbc + (mfaac * mfcba + mfcaa * mfabc + 4. * mfbab * mfbbb + 2. * (mfabb * mfcab + mfbba * mfbac)) + c1o3 * (mfcba + mfabc) * oMdrho;
-               mfccb = CUMccb + (mfcaa * mfacb + mfaca * mfcab + 4. * mfbba * mfbbb + 2. * (mfbab * mfbca + mfabb * mfcba)) + c1o3 * (mfacb + mfcab) * oMdrho;
-
-               //6.
-               mfccc = CUMccc  -((-4. *  mfbbb * mfbbb 
-                  -       (mfcaa * mfacc + mfaca * mfcac + mfaac * mfcca)
-                  -  4. * (mfabb * mfcbb + mfbac * mfbca + mfbba * mfbbc)
-                  -  2. * (mfbca * mfbac + mfcba * mfabc + mfcab * mfacb))
-                  +( 4. * (mfbab * mfbab * mfaca + mfabb * mfabb * mfcaa + mfbba * mfbba * mfaac)
-                  +  2. * (mfcaa * mfaca * mfaac)
-                  + 16. *  mfbba * mfbab * mfabb)
-                  - c1o3* (mfacc + mfcac + mfcca) * oMdrho  -c1o9*oMdrho*oMdrho
-                  - c1o9* (mfcaa + mfaca + mfaac) * oMdrho*(1.-2.* oMdrho)- c1o27* oMdrho * oMdrho*(-2.* oMdrho)
-                  +( 2. * (mfbab * mfbab + mfabb * mfabb + mfbba * mfbba)
-                  +       (mfaac * mfaca + mfaac * mfcaa + mfaca * mfcaa)) * c2o3*oMdrho) -c1o27*oMdrho;
-               
-               ////////////////////////////////////////////////////////////////////////////////////
-               //forcing
-               mfbaa=-mfbaa;
-               mfaba=-mfaba;
-               mfaab=-mfaab;
-               //////////////////////////////////////////////////////////////////////////////////////
-
-               ////////////////////////////////////////////////////////////////////////////////////
-               //back
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1, 0, 1/3, 0, 0, 0, 1/3, 0, 1/9   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Z - Dir
-               m0 =  mfaac * c1o2 +      mfaab * (vvz - c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfaac        - 2. * mfaab *  vvz         +  mfaaa                * (1. - vz2)              - 1. * oMdrho * vz2;
-               m2 =  mfaac * c1o2 +      mfaab * (vvz + c1o2) + (mfaaa + 1. * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaaa = m0;
-               mfaab = m1;
-               mfaac = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfabc * c1o2 +      mfabb * (vvz - c1o2) + mfaba * (     vz2 - vvz) * c1o2;
-               m1 = -mfabc        - 2. * mfabb *  vvz         + mfaba * (1. - vz2);
-               m2 =  mfabc * c1o2 +      mfabb * (vvz + c1o2) + mfaba * (     vz2 + vvz) * c1o2;
-               mfaba = m0;
-               mfabb = m1;
-               mfabc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfacb * (vvz - c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfacc        - 2. * mfacb *  vvz         +  mfaca                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfacc * c1o2 +      mfacb * (vvz + c1o2) + (mfaca + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfaca = m0;
-               mfacb = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbac * c1o2 +      mfbab * (vvz - c1o2) + mfbaa * (     vz2 - vvz) * c1o2;
-               m1 = -mfbac        - 2. * mfbab *  vvz         + mfbaa * (1. - vz2);
-               m2 =  mfbac * c1o2 +      mfbab * (vvz + c1o2) + mfbaa * (     vz2 + vvz) * c1o2;
-               mfbaa = m0;
-               mfbab = m1;
-               mfbac = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbbc * c1o2 +      mfbbb * (vvz - c1o2) + mfbba * (     vz2 - vvz) * c1o2;
-               m1 = -mfbbc        - 2. * mfbbb *  vvz         + mfbba * (1. - vz2);
-               m2 =  mfbbc * c1o2 +      mfbbb * (vvz + c1o2) + mfbba * (     vz2 + vvz) * c1o2;
-               mfbba = m0;
-               mfbbb = m1;
-               mfbbc = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbcb * (vvz - c1o2) + mfbca * (     vz2 - vvz) * c1o2;
-               m1 = -mfbcc        - 2. * mfbcb *  vvz         + mfbca * (1. - vz2);
-               m2 =  mfbcc * c1o2 +      mfbcb * (vvz + c1o2) + mfbca * (     vz2 + vvz) * c1o2;
-               mfbca = m0;
-               mfbcb = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfcab * (vvz - c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfcac        - 2. * mfcab *  vvz         +  mfcaa                  * (1. - vz2)              - c1o3 * oMdrho * vz2;
-               m2 =  mfcac * c1o2 +      mfcab * (vvz + c1o2) + (mfcaa + c1o3 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcaa = m0;
-               mfcab = m1;
-               mfcac = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfcbb * (vvz - c1o2) + mfcba * (     vz2 - vvz) * c1o2;
-               m1 = -mfcbc        - 2. * mfcbb *  vvz         + mfcba * (1. - vz2);
-               m2 =  mfcbc * c1o2 +      mfcbb * (vvz + c1o2) + mfcba * (     vz2 + vvz) * c1o2;
-               mfcba = m0;
-               mfcbb = m1;
-               mfcbc = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfccb * (vvz - c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 - vvz) * c1o2;
-               m1 = -mfccc        - 2. * mfccb *  vvz         +  mfcca                  * (1. - vz2)              - c1o9 * oMdrho * vz2;
-               m2 =  mfccc * c1o2 +      mfccb * (vvz + c1o2) + (mfcca + c1o9 * oMdrho) * (     vz2 + vvz) * c1o2;
-               mfcca = m0;
-               mfccb = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/6, 2/3, 1/6, 0, 0, 0, 1/18, 2/9, 1/18   Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // Y - Dir
-               m0 =  mfaca * c1o2 +      mfaba * (vvy - c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfaca        - 2. * mfaba *  vvy         +  mfaaa                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfaca * c1o2 +      mfaba * (vvy + c1o2) + (mfaaa + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaaa = m0;
-               mfaba = m1;
-               mfaca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacb * c1o2 +      mfabb * (vvy - c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacb        - 2. * mfabb *  vvy         +  mfaab                  * (1. - vy2)              - c2o3 * oMdrho * vy2;
-               m2 =  mfacb * c1o2 +      mfabb * (vvy + c1o2) + (mfaab + c2o3 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaab = m0;
-               mfabb = m1;
-               mfacb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfacc * c1o2 +      mfabc * (vvy - c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfacc        - 2. * mfabc *  vvy         +  mfaac                  * (1. - vy2)              - c1o6 * oMdrho * vy2;
-               m2 =  mfacc * c1o2 +      mfabc * (vvy + c1o2) + (mfaac + c1o6 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfaac = m0;
-               mfabc = m1;
-               mfacc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfbca * c1o2 +      mfbba * (vvy - c1o2) + mfbaa * (     vy2 - vvy) * c1o2;
-               m1 = -mfbca        - 2. * mfbba *  vvy         + mfbaa * (1. - vy2);
-               m2 =  mfbca * c1o2 +      mfbba * (vvy + c1o2) + mfbaa * (     vy2 + vvy) * c1o2;
-               mfbaa = m0;
-               mfbba = m1;
-               mfbca = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcb * c1o2 +      mfbbb * (vvy - c1o2) + mfbab * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcb        - 2. * mfbbb *  vvy         + mfbab * (1. - vy2);
-               m2 =  mfbcb * c1o2 +      mfbbb * (vvy + c1o2) + mfbab * (     vy2 + vvy) * c1o2;
-               mfbab = m0;
-               mfbbb = m1;
-               mfbcb = m2;
-               /////////b//////////////////////////////////////////////////////////////////////////
-               m0 =  mfbcc * c1o2 +      mfbbc * (vvy - c1o2) + mfbac * (     vy2 - vvy) * c1o2;
-               m1 = -mfbcc        - 2. * mfbbc *  vvy         + mfbac * (1. - vy2);
-               m2 =  mfbcc * c1o2 +      mfbbc * (vvy + c1o2) + mfbac * (     vy2 + vvy) * c1o2;
-               mfbac = m0;
-               mfbbc = m1;
-               mfbcc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfcba * (vvy - c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfcca        - 2. * mfcba *  vvy         +  mfcaa                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfcca * c1o2 +      mfcba * (vvy + c1o2) + (mfcaa + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcaa = m0;
-               mfcba = m1;
-               mfcca = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfcbb * (vvy - c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccb        - 2. * mfcbb *  vvy         +  mfcab                  * (1. - vy2)              - c2o9 * oMdrho * vy2;
-               m2 =  mfccb * c1o2 +      mfcbb * (vvy + c1o2) + (mfcab + c2o9 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcab = m0;
-               mfcbb = m1;
-               mfccb = m2;
-               /////////c//////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfcbc * (vvy - c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 - vvy) * c1o2;
-               m1 = -mfccc        - 2. * mfcbc *  vvy         +  mfcac                   * (1. - vy2)              - c1o18 * oMdrho * vy2;
-               m2 =  mfccc * c1o2 +      mfcbc * (vvy + c1o2) + (mfcac + c1o18 * oMdrho) * (     vy2 + vvy) * c1o2;
-               mfcac = m0;
-               mfcbc = m1;
-               mfccc = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               //mit 1/36, 1/9, 1/36, 1/9, 4/9, 1/9, 1/36, 1/9, 1/36 Konditionieren
-               ////////////////////////////////////////////////////////////////////////////////////
-               // X - Dir
-               m0 =  mfcaa * c1o2 +      mfbaa * (vvx - c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcaa        - 2. * mfbaa *  vvx         +  mfaaa                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcaa * c1o2 +      mfbaa * (vvx + c1o2) + (mfaaa + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaaa = m0;
-               mfbaa = m1;
-               mfcaa = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcba * c1o2 +      mfbba * (vvx - c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcba        - 2. * mfbba *  vvx         +  mfaba                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcba * c1o2 +      mfbba * (vvx + c1o2) + (mfaba + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaba = m0;
-               mfbba = m1;
-               mfcba = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcca * c1o2 +      mfbca * (vvx - c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcca        - 2. * mfbca *  vvx         +  mfaca                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcca * c1o2 +      mfbca * (vvx + c1o2) + (mfaca + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaca = m0;
-               mfbca = m1;
-               mfcca = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcab * c1o2 +      mfbab * (vvx - c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcab        - 2. * mfbab *  vvx         +  mfaab                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcab * c1o2 +      mfbab * (vvx + c1o2) + (mfaab + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaab = m0;
-               mfbab = m1;
-               mfcab = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbb * c1o2 +      mfbbb * (vvx - c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbb        - 2. * mfbbb *  vvx         +  mfabb                  * (1. - vx2)              - c4o9 * oMdrho * vx2;
-               m2 =  mfcbb * c1o2 +      mfbbb * (vvx + c1o2) + (mfabb + c4o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabb = m0;
-               mfbbb = m1;
-               mfcbb = m2;
-               ///////////b////////////////////////////////////////////////////////////////////////
-               m0 =  mfccb * c1o2 +      mfbcb * (vvx - c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccb        - 2. * mfbcb *  vvx         +  mfacb                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfccb * c1o2 +      mfbcb * (vvx + c1o2) + (mfacb + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacb = m0;
-               mfbcb = m1;
-               mfccb = m2;
-               ////////////////////////////////////////////////////////////////////////////////////
-               ////////////////////////////////////////////////////////////////////////////////////
-               m0 =  mfcac * c1o2 +      mfbac * (vvx - c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcac        - 2. * mfbac *  vvx         +  mfaac                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfcac * c1o2 +      mfbac * (vvx + c1o2) + (mfaac + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfaac = m0;
-               mfbac = m1;
-               mfcac = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfcbc * c1o2 +      mfbbc * (vvx - c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfcbc        - 2. * mfbbc *  vvx         +  mfabc                  * (1. - vx2)              - c1o9 * oMdrho * vx2;
-               m2 =  mfcbc * c1o2 +      mfbbc * (vvx + c1o2) + (mfabc + c1o9 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfabc = m0;
-               mfbbc = m1;
-               mfcbc = m2;
-               ///////////c////////////////////////////////////////////////////////////////////////
-               m0 =  mfccc * c1o2 +      mfbcc * (vvx - c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 - vvx) * c1o2;
-               m1 = -mfccc        - 2. * mfbcc *  vvx         +  mfacc                   * (1. - vx2)              - c1o36 * oMdrho * vx2;
-               m2 =  mfccc * c1o2 +      mfbcc * (vvx + c1o2) + (mfacc + c1o36 * oMdrho) * (     vx2 + vvx) * c1o2;
-               mfacc = m0;
-               mfbcc = m1;
-               mfccc = m2;
-
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-#ifdef  PROOF_CORRECTNESS
-               LBMReal rho_post = (mfaaa+mfaac+mfaca+mfcaa+mfacc+mfcac+mfccc+mfcca)
-                  +(mfaab+mfacb+mfcab+mfccb)+(mfaba+mfabc+mfcba+mfcbc)+(mfbaa+mfbac+mfbca+mfbcc)
-                  +(mfabb+mfcbb)+(mfbab+mfbcb)+(mfbba+mfbbc)+mfbbb; 
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho="+UbSystem::toString(rho)+", rho_post="+UbSystem::toString(rho_post)
-                                       +" dif="+UbSystem::toString(dif)
-                                       +" rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27CCLB::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-#endif
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               if (x1 == maxX1m || x2 == maxX2m || x3 == maxX3m)
-               {
-                  setNewDistributions(x1p, x2, x3);
-                  (*d.NW)(lX1,lX2,lX3) = mfcab;
-                  (*d.TW)(lX1,lX2,lX3) = mfcba;
-                  (*d.TNW)(lX1,lX2,lX3) = mfcaa;
-                  (*d.W)(lX1,lX2,lX3) = mfcbb;
-
-                  setNewDistributions(x1, x2p, x3);
-                  (*d.TS)(lX1,lX2,lX3) = mfbca;
-                  (*d.TSE)(lX1,lX2,lX3) = mfaca;
-                  (*d.S)(lX1,lX2,lX3) = mfbcb;
-                  (*d.SE)(lX1,lX2,lX3) = mfacb;
-
-                  setNewDistributions(x1p, x2p, x3);
-                  (*d.TSW)(lX1,lX2,lX3) = mfcca;
-                  (*d.SW)(lX1,lX2,lX3) = mfccb;
-
-                  setNewDistributions(x1p, x2, x3p);
-                  (*d.BW)(lX1,lX2,lX3) = mfcbc;  
-                  (*d.BNW)(lX1,lX2,lX3) = mfcac;
-
-                  setNewDistributions(x1, x2, x3p);
-                  (*d.B)(lX1,lX2,lX3) = mfbbc;
-                  (*d.BE)(lX1,lX2,lX3) = mfabc;
-                  (*d.BN)(lX1,lX2,lX3) = mfbac;
-                  (*d.BNE)(lX1,lX2,lX3) = mfaac;
-
-                  setNewDistributions(x1, x2p, x3p);
-                  (*d.BS)(lX1,lX2,lX3) = mfbcc;
-                  (*d.BSE)(lX1,lX2,lX3) = mfacc;
-
-                  setNewDistributions(x1p, x2p, x3p);
-                  (*d.BSW)(lX1,lX2,lX3) = mfccc;
-
-                  d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-                  (*d.E)(x1,x2,x3) = mfabb;
-                  (*d.N)(x1,x2,x3) = mfbab;
-                  (*d.T)(x1,x2,x3) = mfbba;
-                  (*d.NE)(x1,x2,x3) = mfaab;
-                  (*d.TE)(x1,x2,x3) = mfaba;
-                  (*d.TN)(x1,x2,x3) = mfbaa;
-                  (*d.TNE)(x1,x2,x3) = mfaaa;
-
-                  (*d.ZERO)(x1,x2,x3) = mfbbb;
-               }
-               else
-               {
-                  //d = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSoA>(dataSet->getFdistributions())->getDistributions();
-                  (*d.E)(x1,  x2,  x3)    = mfabb;
-                  (*d.N)(x1,  x2,  x3)    = mfbab;
-                  (*d.T)(x1,  x2,  x3)    = mfbba;
-                  (*d.NE)(x1,  x2,  x3)   = mfaab;
-                  (*d.NW)(x1p,x2,  x3)   = mfcab;
-                  (*d.TE)(x1,  x2,  x3)   = mfaba;
-                  (*d.TW)(x1p,x2,  x3)   = mfcba;
-                  (*d.TN)(x1,  x2,  x3)   = mfbaa;
-                  (*d.TS)(x1,  x2p,x3)   = mfbca;
-                  (*d.TNE)(x1,  x2,  x3)  = mfaaa;
-                  (*d.TNW)(x1p,x2,  x3)  = mfcaa;
-                  (*d.TSE)(x1,  x2p,x3)  = mfaca;
-                  (*d.TSW)(x1p,x2p,x3)  = mfcca;
-
-                  (*d.W)(x1p,x2,  x3    ) = mfcbb;
-                  (*d.S)(x1,  x2p,x3    ) = mfbcb;
-                  (*d.B)(x1,  x2,  x3p  ) = mfbbc;
-                  (*d.SW)(x1p,x2p,x3   ) = mfccb;
-                  (*d.SE)(x1,  x2p,x3   ) = mfacb;
-                  (*d.BW)(x1p,x2,  x3p ) = mfcbc;
-                  (*d.BE)(x1,  x2,  x3p ) = mfabc;
-                  (*d.BS)(x1,  x2p,x3p ) = mfbcc;
-                  (*d.BN)(x1,  x2,  x3p ) = mfbac;
-                  (*d.BSW)(x1p,x2p,x3p) = mfccc;
-                  (*d.BSE)(x1,  x2p,x3p) = mfacc;
-                  (*d.BNW)(x1p,x2,  x3p) = mfcac;
-                  (*d.BNE)(x1,  x2,  x3p) = mfaac;
-
-                  (*d.ZERO)(x1,x2,x3) = mfbbb;
-               }
-               //////////////////////////////////////////////////////////////////////////
-
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27CCLBex2::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.h
deleted file mode 100644
index 1cb2896a63eb985925b1456045a7f2ae41fdd7c0..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CCLBex2.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//Cascaded Cumulant LBM
-
-#ifndef LBMKernelETD3Q27CCLBEX2_H
-#define LBMKernelETD3Q27CCLBEX2_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-#include "Grid3D.h"
-#include "D3Q27EsoTwist3DSoA.h"
-
-class LBMKernelETD3Q27CCLBex2;
-typedef boost::shared_ptr<LBMKernelETD3Q27CCLBex2> LBMKernelETD3Q27CCLBex2Ptr;
-
-
-class LBMKernelETD3Q27CCLBex2 :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27CCLBex2();
-   LBMKernelETD3Q27CCLBex2(int nx1, int nx2, int nx3, int option, Grid3DPtr grid);
-   ~LBMKernelETD3Q27CCLBex2(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-      ar & OxyyMxzz; 
-   }
-
-   void collideAll();  
-   void init();
-   void setNewDistributions(int x1, int x2, int x3);
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-      mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-
-   UbTimer timer;
-
-   LBMReal OxyyMxzz;
-   int option;
-
-   Distributions d;
-
-   mu::value_type muX1,muX2,muX3;
-   mu::value_type muDeltaT;
-   mu::value_type muNue;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-   Grid3DPtr grid;
-   int lX1, lX2, lX3;
-   int bX1;
-   int bX2;
-   int bX3;
-   int level;
-   UbTupleInt3 blockNX;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.cpp
deleted file mode 100644
index 7207b249d3cf7b499434a2b9ea2a28c2159f0454..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.cpp
+++ /dev/null
@@ -1,515 +0,0 @@
-#include "LBMKernelETD3Q27Cascaded.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "D3Q27EsoTwist3DSplittedVector.h"
-
-
-//BOOST_CLASS_EXPORT(LBMKernelETD3Q27Cascaded)
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27Cascaded::LBMKernelETD3Q27Cascaded()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27Cascaded::LBMKernelETD3Q27Cascaded(int nx1, int nx2, int nx3) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3)
-{
-   this->compressible = true;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27Cascaded::~LBMKernelETD3Q27Cascaded(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27Cascaded::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+2, nx2+2, nx3+2, -999.0));
-   dataSet->setFdistributions(d);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27Cascaded::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27Cascaded(nx1, nx2, nx3));
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27Cascaded>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setWithForcing(withForcing);
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27Cascaded::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27Cascaded::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   if (withForcing)
-   {
-      muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-      muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-      muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-
-      muDeltaT = deltaT;
-
-      muForcingX1.DefineVar("dx",&muDeltaT);
-      muForcingX2.DefineVar("dx",&muDeltaT);
-      muForcingX3.DefineVar("dx",&muDeltaT);
-
-      muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-      muForcingX1.DefineVar("nue",&muNue);
-      muForcingX2.DefineVar("nue",&muNue);
-      muForcingX3.DefineVar("nue",&muNue);
-
-      LBMReal forcingX1 = 0;
-      LBMReal forcingX2 = 0;
-      LBMReal forcingX3 = 0;
-   }
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0; //MXXpMYYpMZZ bulk viscosity
-   w7=-1.0;//s9; //ORDER 4 Isotropic
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0; // ORDER 6 Isotropic
-   w1=s9;
-   // wenn es mal an den Ecken nicht gut aussieht -2.0-s9 probieren
-   w3=-1.0;//-2.0-s9;//-1.0;//MXXYpMYZZ
-   w4=-1.0;//-2.0-s9;//-1.0;//MXXYmMYZZ
-   w5=-1.0;//-2.0-s9;//-1.0;//MYXZ
-   w6=-1.0; //MXXYYpm2p
-   w8=-1.0; //M_zXXYZ 
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-   
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               f[ZERO] = (*this->zeroDistributions)(x1,x2,x3);
-
-               f[E] = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               f[N] = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3);  
-               f[T] = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               f[NE] = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               f[NW] = (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,x3);
-               f[TE] = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               f[TW] = (*this->localDistributions)(D3Q27System::ET_TW, x1+1,x2,x3);
-               f[TN] = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               f[TS] = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2+1,x3);
-               f[TNE] = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               f[TNW] = (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,x3);
-               f[TSE] = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2+1,x3);
-               f[TSW] = (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3);
-
-               f[W ] = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,x3  );
-               f[S ] = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2+1,x3  );
-               f[B ] = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3+1  );
-               f[SW] = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3 );
-               f[SE] = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2+1,x3 );
-               f[BW] = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,x3+1 );
-               f[BE] = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3+1 );
-               f[BS] = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2+1,x3+1 );
-               f[BN] = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3+1 );
-               f[BSW] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1);
-               f[BSE] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2+1,x3+1);
-               f[BNW] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,x3+1);
-               f[BNE] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3+1);
-               //////////////////////////////////////////////////////////////////////////
-
-
-               //////////////////////////////////////////////////////////////////////////
-               //compute collision
-               //////////////////////////////////////////////////////////////////////////
-               rho = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-
-               vx = f[E] - f[W] + f[NE] - f[SW] + f[SE] - f[NW] + f[TE] - f[BW]
-               + f[BE] - f[TW] + f[TNE] - f[TSW] + f[TSE] - f[TNW] + f[BNE] - f[BSW]
-               + f[BSE] - f[BNW]; 
-
-               vy = f[N] - f[S] + f[NE] - f[SW] - f[SE] + f[NW] + f[TN] - f[BS] + f[BN]
-               - f[TS] + f[TNE] - f[TSW] - f[TSE] + f[TNW] + f[BNE] - f[BSW] - f[BSE] 
-               + f[BNW]; 
-
-               vz = f[T] - f[B] + f[TE] - f[BW] - f[BE] + f[TW] + f[TN] - f[BS] - f[BN] 
-               + f[TS] + f[TNE] + f[TSW] + f[TSE] + f[TNW] - f[BNE] - f[BSW] - f[BSE] 
-               - f[BNW];
-
-               vx/=rho;
-               vy/=rho;
-               vz/=rho;
-                  
-               durchrho=1.0/rho;
-
-               //forcing 
-               /////////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  muX1 = static_cast<double>(x1+ix1*bcArrayMaxX1);
-                  muX2 = static_cast<double>(x2+ix2*bcArrayMaxX2);
-                  muX3 = static_cast<double>(x3+ix3*bcArrayMaxX3);
-
-                  forcingX1 = muForcingX1.Eval();
-                  forcingX2 = muForcingX2.Eval();
-                  forcingX3 = muForcingX3.Eval();
-
-                  //mu100 += forcingX1; 
-                  vx += forcingX1*0.5; // X
-                  //mu010 += forcingX2; 
-                  vy += forcingX2*0.5; // Y
-                  //mu001 += forcingX3; 
-                  vz += forcingX3*0.5; // Z
-               }
-               /////////////////////////////////////////////////////////////////////////////////////////////
-
-
-               M_zXX=0.0;     M_zYY=0.0;     M_zZZ=0.0;     M_zXY=0.0;    M_zXZ=0.0;  M_zYZ=0.0;
-               M_zXXY=0.0;    M_zXYY=0.0;    M_zXXZ=0.0;    M_zXZZ=0.0;   M_zYYZ=0.0;  M_zYZZ=0.0;  M_zXYZ=0.0;
-               M_zXXYY=0.0;   M_zXXZZ=0.0;   M_zYYZZ=0.0;   M_zXXYZ=0.0;  M_zXYYZ=0.0;  M_zXYZZ=0.0;
-               M_zXXYYZ=0.0;  M_zXXYZZ=0.0;  M_zXYYZZ=0.0;  M_zXXYYZZ=0.0;
-
-               vx_sq=vx*vx;
-               vy_sq=vy*vy;
-               vz_sq=vz*vz;
-               vx_vy=vx*vy;
-               vx_vz=vx*vz;
-               vy_vz=vy*vz;
-               vx_vy_vz=vx_vy*vz;
-
-               mu200=(f[E]+f[W]+f[NE]+f[SW]+f[SE]+f[NW]+f[TE]+f[BW]+f[BE]+f[TW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu020=(f[N]+f[S]+f[NE]+f[SW]+f[SE]+f[NW]+f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu002=(f[T]+f[B]+f[TE]+f[BW]+f[BE]+f[TW]+f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu110=(f[NE]-f[SE]+f[SW]-f[NW]+f[TNE]-f[TSE]+f[BNE]-f[BSE]+f[TSW]-f[TNW]+f[BSW]-f[BNW])*durchrho;
-               mu101=(f[TE]+f[BW]-f[BE]-f[TW]+f[TNE]-f[BNE]+f[TSE]-f[BSE]-f[TNW]+f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu011=(f[TN]+f[BS]-f[BN]-f[TS]+f[TNE]-f[BNE]-f[TSE]+f[BSE]+f[TNW]-f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu210=(f[NE]-f[SW]-f[SE]+f[NW]+f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu120=(f[NE]-f[SW]+f[SE]-f[NW]+f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu102=(f[TE]-f[BW]+f[BE]-f[TW]+f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu111=(f[TNE]-f[BNE]-f[TSE]+f[BSE]-f[TNW]+f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu201=(f[TE]-f[BW]-f[BE]+f[TW]+f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu021=(f[TN]-f[BS]-f[BN]+f[TS]+f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu012=(f[TN]-f[BS]+f[BN]-f[TS]+f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu220=(f[NE]+f[SW]+f[SE]+f[NW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu121=(f[TNE]-f[BNE]+f[TSE]-f[BSE]-f[TNW]+f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu202=(f[TE]+f[BW]+f[BE]+f[TW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu211=(f[TNE]-f[BNE]-f[TSE]+f[BSE]+f[TNW]-f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu112=(f[TNE]+f[BNE]-f[TSE]-f[BSE]-f[TNW]-f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu022=(f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu221=(f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu122=(f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu212=(f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu222=(f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu000=1.0;
-               mu100=vx;
-               mu010=vy; 
-               mu001=vz;
-
-               M_zYZ= -vy_vz  +mu011 ;
-               M_zZZ= -vz_sq  +mu002 ; 
-               M_zYY= -vy_sq  +mu020 ;
-               M_zXX= -vx_sq  +mu200 ;
-               M_zXY= -vx_vy  +mu110 ;          
-               M_zXZ =-vx_vz  +mu101 ;
-
-               M_zYYZ=mu021-(mu020*vz + 2.0*vy*M_zYZ);          
-               M_zYZZ=mu012-(vy*mu002 + 2.0*vz*M_zYZ);
-               M_zXZZ=mu102-(vx*mu002 + 2.0*vz*M_zXZ);
-               M_zXXZ=mu201-(mu200*vz + 2.0*vx*M_zXZ );
-               M_zXXY=mu210-(mu200*vy + 2.0*vx*M_zXY );
-               M_zXYY=mu120-(vx*mu020 + 2.0*vy*M_zXY);
-               M_zXYZ=mu111-(vx_vy_vz + vx*M_zYZ + vy*M_zXZ + vz*M_zXY);
-
-               M_zXYYZ=mu121-(vz*mu120+ 2.0*vx_vy*M_zYZ+vx*M_zYYZ+vy_sq*M_zXZ+2.0*vy*M_zXYZ); 
-               M_zXYZZ=mu112-(vy*mu102+ 2.0*vx_vz*M_zYZ+vx*M_zYZZ+vz_sq*M_zXY+2.0*vz*M_zXYZ);
-               M_zXXYZ=mu211-(vz*mu210+ 2.0*vx_vy*M_zXZ+vy*M_zXXZ+vx_sq*M_zYZ+2.0*vx*M_zXYZ); 
-
-
-               M_zXXYY=mu220-( vx_sq*mu020+ 4.0*vx_vy*M_zXY + 2.0*vx*M_zXYY + vy_sq*M_zXX + 2.0*vy*M_zXXY); 
-               M_zYYZZ=mu022-( vy_sq*mu002+ 4.0*vy_vz*M_zYZ + 2.0*vy*M_zYZZ + vz_sq*M_zYY + 2.0*vz*M_zYYZ);
-               M_zXXZZ=mu202-( vx_sq*mu002+ 4.0*vx_vz*M_zXZ + 2.0*vx*M_zXZZ + vz_sq*M_zXX + 2.0*vz*M_zXXZ); 
-
-               M_zXXYYZ=mu221-(vz*mu220+
-                  2.0*vx_sq*vy*M_zYZ  + vx_sq*M_zYYZ + 2.0*vx*vy_sq*M_zXZ  +4.0*vx_vy*M_zXYZ+ 
-                  2.0*vx*M_zXYYZ  +    vy_sq*M_zXXZ  + 2.0*vy*M_zXXYZ);
-               M_zXYYZZ=mu122-(vx*mu022 
-                  + 2.0*vy_sq*vz*M_zXZ + vy_sq*M_zXZZ + 
-                  2.0*vy*vz_sq*M_zXY + 4.0*vy_vz*M_zXYZ + 2.0*vy*M_zXYZZ +vz_sq*M_zXYY + 2.0*vz*M_zXYYZ);
-               M_zXXYZZ=mu212-(vy*mu202
-                  + 2.0*vx_sq*vz*M_zYZ +vx_sq*M_zYZZ  + 2.0*vx*vz_sq*M_zXY + 4.0*vx_vz*M_zXYZ 
-                  + 2.0*vx*M_zXYZZ  + vz_sq*M_zXXY +  2.0*vz*M_zXXYZ);
-
-               M_zXXYYZZ=mu222-(vx_sq*mu022 
-                  + 4.0* vx*vy_sq*vz*M_zXZ   + 
-                  2.0* vx*vy_sq*M_zXZZ + 4.0* vx_vy*vz_sq*M_zXY+ 
-                  8.0* vx_vy_vz*M_zXYZ + 4.0* vx_vy*M_zXYZZ + 
-                  2.0* vx*vz_sq*M_zXYY + 4.0* vx_vz*M_zXYYZ + 2.0*vx*M_zXYYZZ + 
-                  vy_sq*vz_sq*M_zXX + 2.0* vy_sq*vz*M_zXXZ  + 
-                  vy_sq*M_zXXZZ     + 2.0* vy*vz_sq*M_zXXY  + 4.0*vy_vz*M_zXXYZ + 
-                  2.0* vy*M_zXXYZZ + vz_sq*M_zXXYY +2.0* vz*M_zXXYYZ);
-
-               ////////lin kombi bilden:
-               MXXpMYYpMZZ = M_zXX + M_zYY + M_zZZ;
-               MXXmMYY = M_zXX - M_zYY;
-               MXXmMZZ = M_zXX - M_zZZ;
-
-               MXXYpMYZZ  =  M_zXXY+M_zYZZ;
-               MXXYmMYZZ  =  M_zXXY-M_zYZZ;
-               MXXZpMYYZ  =  M_zXXZ+M_zYYZ;
-               MXXZmMYYZ  =  M_zXXZ-M_zYYZ;
-               MXYYpMXZZ  =  M_zXYY+M_zXZZ;
-               MXYYmMXZZ  =  M_zXYY-M_zXZZ;
-
-               MXXYYppp  = M_zXXYY + M_zXXZZ + M_zYYZZ;
-               MXXYYpm2p = M_zXXYY - 2.0*M_zXXZZ + M_zYYZZ;
-               MXXYYppm2 = M_zXXYY + M_zXXZZ - 2.0*M_zYYZZ;
-
-
-               //relaxation: 
-               MXXpMYYpMZZ -= w2*(1.0-MXXpMYYpMZZ);
-               MXXmMYY +=     w1*(    MXXmMYY); 
-               MXXmMZZ +=     w1*(    MXXmMZZ); 
-
-               MXXYpMYZZ  +=  w3*(MXXYpMYZZ); 
-               MXXYmMYZZ  +=  w4*(MXXYmMYZZ); 
-               MXXZpMYYZ  +=  w3*(MXXZpMYYZ); 
-               MXXZmMYYZ  +=  w4*(MXXZmMYYZ); 
-               MXYYpMXZZ  +=  w3*(MXYYpMXZZ); 
-               MXYYmMXZZ  +=  w4*(MXYYmMXZZ); 
-
-               MXXYYppp  -= w7*(c1o3 -MXXYYppp );
-               MXXYYpm2p += w6*(MXXYYpm2p);
-               MXXYYppm2 += w6*(MXXYYppm2);
-
-
-               M_zXXYYZZ-=w10*(c1o27-M_zXXYYZZ);
-               M_zXZ+=w1*(  M_zXZ    );
-               M_zYZ+=w1*(  M_zYZ    );
-               M_zXY+=w1*(  M_zXY    );
-
-               M_zXYZ+=w5*(  M_zXYZ   );
-
-               M_zXYYZ+=w8*(  M_zXYYZ  );
-               M_zXYZZ+=w8*(  M_zXYZZ  );
-               M_zXXYZ+=w8*(  M_zXXYZ  );
-
-               M_zXXYYZ+=w9*( M_zXXYYZ );
-               M_zXXYZZ+=w9*( M_zXXYZZ );
-               M_zXYYZZ+=w9*( M_zXYYZZ );
-
-               ////////von Lin Kombis zurueck:
-               M_zXX = c1o3 *MXXmMYY + c1o3 *MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-               M_zYY = -c2o3* MXXmMYY+ c1o3* MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-               M_zZZ = c1o3   * MXXmMYY -c2o3 *MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-
-               M_zXXY = (MXXYmMYZZ + MXXYpMYZZ)*0.5; 
-               M_zYZZ = 0.5*(-MXXYmMYZZ + MXXYpMYZZ); 
-               M_zXYY =(MXYYmMXZZ + MXYYpMXZZ)*0.5; 
-               M_zXZZ = 0.5*(-MXYYmMXZZ + MXYYpMXZZ); 
-               M_zXXZ = (MXXZmMYYZ + MXXZpMYYZ)*0.5; 
-               M_zYYZ = 0.5*(-MXXZmMYYZ + MXXZpMYYZ);
-
-               M_zXXYY =  c1o3* MXXYYpm2p + c1o3* MXXYYppm2 +  0.33333333*MXXYYppp; 
-               M_zXXZZ = -c1o3* MXXYYpm2p + c1o3* MXXYYppp; 
-               M_zYYZZ = -c1o3* MXXYYppm2 + c1o3* MXXYYppp;
-
-               //forcing 
-               /////////////////////////////////////////////////////////////////////////////////////////////
-               if (withForcing)
-               {
-                  mu100 += forcingX1*0.5; 
-                  vx += forcingX1*0.5; // X
-                  mu010 += forcingX2*0.5; 
-                  vy += forcingX2*0.5; // Y
-                  mu001 += forcingX3*0.5; 
-                  vz += forcingX3*0.5; // Z
-                  vx_sq=vx*vx;
-                  vy_sq=vy*vy;
-                  vz_sq=vz*vz;
-                  vx_vy=vx*vy;
-                  vx_vz=vx*vz;
-                  vy_vz=vy*vz;
-                  vx_vy_vz=vx_vy*vz;
-               }
-               /////////////////////////////////////////////////////////////////////////////////////////////
-                  
-               mu011=  vy_vz + M_zYZ;
-               mu002= vz_sq + M_zZZ; 
-               mu020= vy_sq + M_zYY ;
-               mu200=   vx_sq + M_zXX;
-               mu110= vx_vy+ M_zXY;          
-               mu101 =vx_vz + M_zXZ;
-
-               mu021=mu020*vz + 2.0*vy*M_zYZ  + M_zYYZ;          
-               mu012=vy*mu002 + 2.0*vz*M_zYZ + M_zYZZ;
-               mu102=vx*mu002 + 2.0*vz*M_zXZ + M_zXZZ;
-               mu112=vy*mu102 + 2.0*vx_vz*M_zYZ+vx*M_zYZZ+vz_sq*M_zXY+2.0*vz*M_zXYZ+M_zXYZZ;
-
-               mu201=mu200*vz + 2.0*vx*M_zXZ  + M_zXXZ;
-               mu210=mu200*vy + 2.0*vx*M_zXY  + M_zXXY;
-               mu211=vz*mu210 + 2.0*vx_vy*M_zXZ+vy*M_zXXZ+vx_sq*M_zYZ+2.0*vx*M_zXYZ+M_zXXYZ; 
-
-               mu120=vx*mu020 + 2.0*vy*M_zXY + M_zXYY;
-               mu121=vz*mu120 + 2.0*vx_vy*M_zYZ+vx*M_zYYZ+vy_sq*M_zXZ+2.0*vy*M_zXYZ+ M_zXYYZ; 
-
-               mu111=vx_vy_vz + vx*M_zYZ + vy*M_zXZ + vz*M_zXY+M_zXYZ;
-
-               mu220=vx_sq*mu020 + 4.0*vx_vy*M_zXY + 2.0*vx*M_zXYY  + vy_sq*M_zXX + 2.0*vy*M_zXXY +  M_zXXYY; 
-
-               mu221=vz*mu220 + 2.0*vx_sq*vy*M_zYZ  + vx_sq*M_zYYZ + 2.0*vx*vy_sq*M_zXZ  +4.0*vx_vy*M_zXYZ+ 
-                  2.0*vx*M_zXYYZ  +    vy_sq*M_zXXZ  + 2.0*vy*M_zXXYZ  + M_zXXYYZ;
-
-               mu022= vy_sq*mu002 + 4.0*vy_vz*M_zYZ  +2.0*vy*M_zYZZ+ vz_sq*M_zYY+ 2.0*vz*M_zYYZ +  M_zYYZZ;
-
-               mu122=vx*mu022 + 2.0*vy_sq*vz*M_zXZ + vy_sq*M_zXZZ + 
-                  2.0*vy*vz_sq*M_zXY + 4.0*vy_vz*M_zXYZ + 2.0*vy*M_zXYZZ +vz_sq*M_zXYY + 2.0*vz*M_zXYYZ + M_zXYYZZ;
-
-               mu202= vx_sq*mu002 + 4.0*vx_vz*M_zXZ+ 2.0*vx*M_zXZZ + vz_sq*M_zXX+ 2.0*vz*M_zXXZ + M_zXXZZ; 
-
-               mu212=vy*mu202 + 2.0*vx_sq*vz*M_zYZ +vx_sq*M_zYZZ  + 2.0*vx*vz_sq*M_zXY + 4.0*vx_vz*M_zXYZ 
-                  + 2.0*vx*M_zXYZZ  + vz_sq*M_zXXY +  2.0*vz*M_zXXYZ + M_zXXYZZ;
-
-               mu222=vx_sq*mu022 
-                  + 4.0* vx*vy_sq*vz*M_zXZ   + 
-                  2.0* vx*vy_sq*M_zXZZ + 4.0* vx_vy*vz_sq*M_zXY+ 
-                  8.0* vx_vy_vz*M_zXYZ + 4.0* vx_vy*M_zXYZZ + 
-                  2.0* vx*vz_sq*M_zXYY + 4.0* vx_vz*M_zXYYZ + 2.0*vx*M_zXYYZZ + 
-                  vy_sq*vz_sq*M_zXX + 2.0* vy_sq*vz*M_zXXZ  + 
-                  vy_sq*M_zXXZZ     + 2.0* vy*vz_sq*M_zXXY  + 4.0*vy_vz*M_zXXYZ + 
-                  2.0* vy*M_zXXYZZ + vz_sq*M_zXXYY +2.0* vz*M_zXXYYZ + M_zXXYYZZ;
-
-               f[E] =0.5* (mu200 -  mu220 + mu222 - mu202 - mu120 + mu122 - mu102 +mu100) *(rho);
-               f[W] =0.5* (mu200 - mu220 + mu222 - mu202 + mu120 - mu122 + mu102 -mu100)*  (rho);
-               f[N] =0.5* (-mu210 - mu220 + mu222 + mu212 + mu020 - mu022 - mu012 +mu010)* (rho);
-               f[S] =0.5* (mu210 -  mu220 + mu222 - mu212 + mu020 - mu022 + mu012 -mu010)* (rho);
-               f[T] =0.5* (mu221 +  mu222 - mu201 - mu202 - mu021 - mu022 + mu002 +mu001)* (rho);
-               f[B] =0.5* (-mu221 + mu222 + mu201  - mu202 + mu021 - mu022 + mu002-mu001)* (rho);
-               f[NE] =0.25*( mu210  + mu220- mu222 - mu212 + mu110+ mu120- mu122 -mu112)*  (rho); 
-               f[SW] =0.25*(-mu210 + mu220- mu222 + mu212 + mu110- mu120+ mu122 -mu112)*  (rho); 
-               f[SE] =0.25*(-mu210 + mu220- mu222 + mu212 - mu110+ mu120- mu122 +mu112)*  (rho); 
-               f[NW] =0.25*( mu210  + mu220- mu222 - mu212 - mu110- mu120+ mu122 + mu112)* (rho); 
-               f[TE]=0.25*(-mu221 - mu222 + mu201 + mu202 - mu121 - mu122 + mu101 + mu102)*(rho); 
-               f[BW]=0.25*( mu221  -mu222 - mu201 + mu202 - mu121 + mu122 + mu101 - mu102)*(rho);
-
-               f[BE]=0.25*(mu221 - mu222 - mu201 + mu202 + mu121 - mu122 - mu101 +mu102)*  (rho);
-               f[TW]=0.25*(-mu221 - mu222 + mu201 + mu202 + mu121 + mu122 - mu101 -mu102)* (rho); 
-               f[TN]=0.25*(-mu221 - mu222 - mu211 - mu212 + mu021 + mu022 + mu011+mu012)*  (rho);
-               f[BS]=0.25*( mu221 - mu222 - mu211 + mu212 - mu021 + mu022 + mu011 - mu012)*(rho);
-               f[BN]=0.25*( mu221 - mu222 + mu211 - mu212 - mu021 + mu022 - mu011 + mu012)*(rho);
-               f[TS]=0.25*(-mu221 - mu222 + mu211 + mu212 + mu021 + mu022 - mu011 -mu012)* (rho); 
-               f[ZERO]=     (-mu200 + mu220 - mu222 + mu202 - mu020 + mu022 - mu002 + mu000)*(rho);
-               f[TNE]=0.125*( mu221 + mu222 + mu211 + mu212 + mu121 + mu122 + mu111 + mu112)*  (rho); 
-               f[BNE]=0.125*(-mu221 + mu222 -mu211 + mu212 -mu121 + mu122 -mu111 + mu112)*     (rho);
-               f[TSE]=0.125*( mu221 + mu222 - mu211 - mu212 + mu121 + mu122 - mu111 - mu112)*  (rho); 
-               f[BSE]=0.125*(-mu221 + mu222 +mu211 - mu212 -mu121 + mu122 +mu111 - mu112)*     (rho); 
-               f[TNW]=0.125*( mu221 + mu222 + mu211 + mu212 - mu121 - mu122 - mu111 - mu112)*  (rho); 
-               f[BNW]=0.125*(-mu221 + mu222 -mu211 + mu212 +mu121 - mu122 +mu111 - mu112)*     (rho); 
-               f[TSW]=0.125*( mu221 + mu222 - mu211 - mu212 - mu121 - mu122 + mu111 + mu112)*  (rho); 
-               f[BSW]=0.125*(-mu221 + mu222+mu211 - mu212+mu121 - mu122-mu111 + mu112)*        (rho);
-               //////////////////////////////////////////////////////////////////////////
-               //proof correctness
-               //////////////////////////////////////////////////////////////////////////
-               LBMReal rho_post = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-               //LBMReal dif = fabs(rho - rho_post);
-               LBMReal dif = rho - rho_post;
-#ifdef SINGLEPRECISION
-               if(dif > 10.0E-7 || dif < -10.0E-7)
-#else
-               if(dif > 10.0E-15 || dif < -10.0E-15)
-#endif
-               {
-                  UB_THROW(UbException(UB_EXARGS,"rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3)));
-                  //UBLOG(logERROR,"LBMKernelETD3Q27Cascaded::collideAll(): rho is not correct for node "+UbSystem::toString(x1)+","+UbSystem::toString(x2)+","+UbSystem::toString(x3));
-                  //exit(EXIT_FAILURE);
-               }
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[D3Q27System::INV_E];
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[D3Q27System::INV_N];
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[D3Q27System::INV_T];
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[D3Q27System::INV_NE];
-               (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,  x3) = f[D3Q27System::INV_NW];
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[D3Q27System::INV_TE];
-               (*this->localDistributions)(D3Q27System::ET_TW,x1+1,x2,  x3) = f[D3Q27System::INV_TW];
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[D3Q27System::INV_TN];
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2+1,x3) = f[D3Q27System::INV_TS];
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[D3Q27System::INV_TNE];
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,  x3) = f[D3Q27System::INV_TNW];
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2+1,x3) = f[D3Q27System::INV_TSE];
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3) = f[D3Q27System::INV_TSW];
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,  x3    ) = f[D3Q27System::INV_W ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2+1,x3    ) = f[D3Q27System::INV_S ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3+1  ) = f[D3Q27System::INV_B ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3   ) = f[D3Q27System::INV_SW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2+1,x3   ) = f[D3Q27System::INV_SE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,  x3+1 ) = f[D3Q27System::INV_BW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3+1 ) = f[D3Q27System::INV_BE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2+1,x3+1 ) = f[D3Q27System::INV_BS];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3+1 ) = f[D3Q27System::INV_BN];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1) = f[D3Q27System::INV_BSW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2+1,x3+1) = f[D3Q27System::INV_BSE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,  x3+1) = f[D3Q27System::INV_BNW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3+1) = f[D3Q27System::INV_BNE];
-
-               (*this->zeroDistributions)(x1,x2,x3) = f[D3Q27System::ZERO];
-               //////////////////////////////////////////////////////////////////////////
-               
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27Cascaded::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.h
deleted file mode 100644
index 1305ca669ddadabc5f0581e097a45db94233fc48..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27Cascaded.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef LBMKERNELETD3Q27CASCADED_H
-#define LBMKERNELETD3Q27CASCADED_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-
-class LBMKernelETD3Q27Cascaded;
-typedef boost::shared_ptr<LBMKernelETD3Q27Cascaded> LBMKernelETD3Q27CascadedPtr;
-
-
-class LBMKernelETD3Q27Cascaded :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27Cascaded();
-   LBMKernelETD3Q27Cascaded(int nx1, int nx2, int nx3);
-   ~LBMKernelETD3Q27Cascaded(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-   }
-   
-   void collideAll();   
-   void init();
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal M_zXX, M_zYY, M_zZZ, M_zXY,    M_zXZ,  M_zYZ,
-          M_zXXY,    M_zXYY,    M_zXXZ,    M_zXZZ,   M_zYYZ,  M_zYZZ,  M_zXYZ,
-          M_zXXYY,   M_zXXZZ,   M_zYYZZ,   M_zXXYZ,  M_zXYYZ,  M_zXYZZ,
-          M_zXXYYZ,  M_zXXYZZ,  M_zXYYZZ,  M_zXXYYZZ;
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-           mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-   LBMReal MXXpMYYpMZZ,MXXmMYY, MXXmMZZ,
-            MXXYpMYZZ,MXXZpMYYZ,MXYYpMXZZ,  MXXYmMYZZ,MXXZmMYYZ,MXYYmMXZZ,
-            MXXYYppp,MXXYYpm2p, MXXYYppm2;
-   UbTimer timer;
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   mu::value_type muX1,muX2,muX3;
-   mu::value_type muDeltaT;
-   mu::value_type muNue;
-   LBMReal forcingX1;
-   LBMReal forcingX2;
-   LBMReal forcingX3;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.cpp b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.cpp
deleted file mode 100644
index 35f4ddd39d1b815a653fbdcf120601c6a47b83af..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.cpp
+++ /dev/null
@@ -1,499 +0,0 @@
-#include "LBMKernelETD3Q27CascadedTI.h"
-#include "D3Q27System.h"
-#include "D3Q27NoSlipBCAdapter.h"
-#include "D3Q27DensityBCAdapter.h"
-#include "D3Q27VelocityBCAdapter.h"
-#include "D3Q27InterpolationProcessor.h"
-#include "D3Q27EsoTwist3DSplittedVector.h"
-
-
-//BOOST_CLASS_EXPORT(LBMKernelETD3Q27CascadedVorticity)
-
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CascadedTI::LBMKernelETD3Q27CascadedTI()
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CascadedTI::LBMKernelETD3Q27CascadedTI(int nx1, int nx2, int nx3) 
-   : LBMKernelETD3Q27(nx1, nx2, nx3)
-{
-   this->compressible = true;
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernelETD3Q27CascadedTI::~LBMKernelETD3Q27CascadedTI(void)
-{
-
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CascadedTI::init()
-{
-   //DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+ghostLayerWitdh*2, nx2+ghostLayerWitdh*2, nx3+ghostLayerWitdh*2, -999.0));
-   DistributionArray3DPtr d(new D3Q27EsoTwist3DSplittedVector(nx1+2, nx2+2, nx3+2, -999.0));
-   dataSet->setFdistributions(d);
-   //TODO move averageValues to another place
-   //averageValues = AverageValuesArray3DPtr(new AverageValuesArray3D(nx1+1, nx2+1, nx3+1, 4, 0.0));
-   //dataSet->setAverageValues(averageValues);
-}
-//////////////////////////////////////////////////////////////////////////
-LBMKernel3DPtr LBMKernelETD3Q27CascadedTI::clone()
-{
-   LBMKernel3DPtr kernel(new LBMKernelETD3Q27CascadedTI(nx1, nx2, nx3));
-   boost::dynamic_pointer_cast<LBMKernelETD3Q27CascadedTI>(kernel)->init();
-   kernel->setCollisionFactor(this->collFactor);
-   kernel->setBCProcessor(bcProcessor->clone(kernel));
-   kernel->setForcingX1(muForcingX1);
-   kernel->setForcingX2(muForcingX2);
-   kernel->setForcingX3(muForcingX3);
-   kernel->setIndex(ix1, ix2, ix3);
-   kernel->setDeltaT(deltaT);
-   return kernel;
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CascadedTI::calculate()
-{
-   timer.resetAndStart();
-   collideAll();
-   timer.stop();
-}
-//////////////////////////////////////////////////////////////////////////
-void LBMKernelETD3Q27CascadedTI::collideAll()
-{
-   using namespace D3Q27System;
-
-   //initializing of forcing stuff 
-   mu::value_type muX1,muX2,muX3;
-   muForcingX1.DefineVar("x1",&muX1); muForcingX1.DefineVar("x2",&muX2); muForcingX1.DefineVar("x3",&muX3);
-   muForcingX2.DefineVar("x1",&muX1); muForcingX2.DefineVar("x2",&muX2); muForcingX2.DefineVar("x3",&muX3);
-   muForcingX3.DefineVar("x1",&muX1); muForcingX3.DefineVar("x2",&muX2); muForcingX3.DefineVar("x3",&muX3);
-   
-   mu::value_type muDeltaT = deltaT;
-
-   muForcingX1.DefineVar("dx",&muDeltaT);
-   muForcingX2.DefineVar("dx",&muDeltaT);
-   muForcingX3.DefineVar("dx",&muDeltaT);
-
-   mu::value_type muNue = (1.0/3.0)*(1.0/collFactor - 1.0/2.0);
-
-   muForcingX1.DefineVar("nue",&muNue);
-   muForcingX2.DefineVar("nue",&muNue);
-   muForcingX3.DefineVar("nue",&muNue);
-
-   LBMReal forcingX1 = 0;
-   LBMReal forcingX2 = 0;
-   LBMReal forcingX3 = 0;
-   /////////////////////////////////////
-
-   s9 = - collFactor;
-   c1o27=1.0/27.0;
-   c2o3=2.0/3.0;
-   w2=-1.0;//s9;//-1.0;
-   w7=-1.0;//s9;
-   w9=-1.0;
-   w10=-1.0;//s9;//-1.0;
-   w1=s9;
-   w3=-1.0;
-   w4=-1.0;
-   w5=-1.0;
-   w6=-1.0;//s9;
-   w8=-1.0;//s9;
-
-   localDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getLocalDistributions();
-   nonLocalDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getNonLocalDistributions();
-   zeroDistributions = boost::dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(dataSet->getFdistributions())->getZeroDistributions();
-
-   BCArray3D<D3Q27BoundaryCondition>& bcArray = boost::dynamic_pointer_cast<D3Q27ETBCProcessor>(this->getBCProcessor())->getBCArray();
-   D3Q27BoundaryConditionPtr bcPtr;
-
-   const int bcArrayMaxX1 = (int)bcArray.getNX1();
-   const int bcArrayMaxX2 = (int)bcArray.getNX2();
-   const int bcArrayMaxX3 = (int)bcArray.getNX3();
-   
-   int minX1 = ghostLayerWidth;
-   int minX2 = ghostLayerWidth;
-   int minX3 = ghostLayerWidth;
-   int maxX1 = bcArrayMaxX1-ghostLayerWidth;
-   int maxX2 = bcArrayMaxX2-ghostLayerWidth;
-   int maxX3 = bcArrayMaxX3-ghostLayerWidth;
-
-   for(int x3 = minX3; x3 < maxX3; x3++)
-   {
-      for(int x2 = minX2; x2 < maxX2; x2++)
-      {
-         for(int x1 = minX1; x1 < maxX1; x1++)
-         {
-            if(!bcArray.isSolid(x1,x2,x3) && !bcArray.isUndefined(x1,x2,x3))
-            {
-               //////////////////////////////////////////////////////////////////////////
-               //read distribution
-               ////////////////////////////////////////////////////////////////////////////
-               f[ZERO] = (*this->zeroDistributions)(x1,x2,x3);
-
-               f[E] = (*this->localDistributions)(D3Q27System::ET_E, x1,x2,x3);
-               f[N] = (*this->localDistributions)(D3Q27System::ET_N,x1,x2,x3);  
-               f[T] = (*this->localDistributions)(D3Q27System::ET_T,x1,x2,x3);
-               f[NE] = (*this->localDistributions)(D3Q27System::ET_NE,x1,x2,x3);
-               f[NW] = (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,x3);
-               f[TE] = (*this->localDistributions)(D3Q27System::ET_TE,x1,x2,x3);
-               f[TW] = (*this->localDistributions)(D3Q27System::ET_TW, x1+1,x2,x3);
-               f[TN] = (*this->localDistributions)(D3Q27System::ET_TN,x1,x2,x3);
-               f[TS] = (*this->localDistributions)(D3Q27System::ET_TS,x1,x2+1,x3);
-               f[TNE] = (*this->localDistributions)(D3Q27System::ET_TNE,x1,x2,x3);
-               f[TNW] = (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,x3);
-               f[TSE] = (*this->localDistributions)(D3Q27System::ET_TSE,x1,x2+1,x3);
-               f[TSW] = (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3);
-
-               f[W ] = (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,x3  );
-               f[S ] = (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,x2+1,x3  );
-               f[B ] = (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,x2,x3+1  );
-               f[SW] = (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3 );
-               f[SE] = (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,x2+1,x3 );
-               f[BW] = (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,x3+1 );
-               f[BE] = (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,x2,x3+1 );
-               f[BS] = (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,x2+1,x3+1 );
-               f[BN] = (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,x2,x3+1 );
-               f[BSW] = (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1);
-               f[BSE] = (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,x2+1,x3+1);
-               f[BNW] = (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,x3+1);
-               f[BNE] = (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,x2,x3+1);
-               //////////////////////////////////////////////////////////////////////////
-
-
-               //////////////////////////////////////////////////////////////////////////
-               //compute collision
-               //////////////////////////////////////////////////////////////////////////
-               rho = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-
-               vx = f[E] - f[W] + f[NE] - f[SW] + f[SE] - f[NW] + f[TE] - f[BW]
-               + f[BE] - f[TW] + f[TNE] - f[TSW] + f[TSE] - f[TNW] + f[BNE] - f[BSW]
-               + f[BSE] - f[BNW]; 
-
-               vy = f[N] - f[S] + f[NE] - f[SW] - f[SE] + f[NW] + f[TN] - f[BS] + f[BN]
-               - f[TS] + f[TNE] - f[TSW] - f[TSE] + f[TNW] + f[BNE] - f[BSW] - f[BSE] 
-               + f[BNW]; 
-
-               vz = f[T] - f[B] + f[TE] - f[BW] - f[BE] + f[TW] + f[TN] - f[BS] - f[BN] 
-               + f[TS] + f[TNE] + f[TSW] + f[TSE] + f[TNW] - f[BNE] - f[BSW] - f[BSE] 
-               - f[BNW];
-
-               vx/=rho;
-               vy/=rho;
-               vz/=rho;
-                  
-               durchrho=1.0/rho;
-
-               //forcing 
-               /////////////////////////////////////////////////////////////////////////////////////////////
-               muX1 = static_cast<double>(x1+ix1*bcArrayMaxX1);
-               muX2 = static_cast<double>(x2+ix2*bcArrayMaxX2);
-               muX3 = static_cast<double>(x3+ix3*bcArrayMaxX3);
-
-               forcingX1 = muForcingX1.Eval();
-               forcingX2 = muForcingX2.Eval();
-               forcingX3 = muForcingX3.Eval();
-
-               //mu100 += forcingX1; 
-               vx += forcingX1*0.5; // X
-               //mu010 += forcingX2; 
-               vy += forcingX2*0.5; // Y
-               //mu001 += forcingX3; 
-               vz += forcingX3*0.5; // Z
-               //////////////////////////////////////////////////////////////////////////
-
-               M_zXX=0.0;     M_zYY=0.0;     M_zZZ=0.0;     M_zXY=0.0;    M_zXZ=0.0;  M_zYZ=0.0;
-               M_zXXY=0.0;    M_zXYY=0.0;    M_zXXZ=0.0;    M_zXZZ=0.0;   M_zYYZ=0.0;  M_zYZZ=0.0;  M_zXYZ=0.0;
-               M_zXXYY=0.0;   M_zXXZZ=0.0;   M_zYYZZ=0.0;   M_zXXYZ=0.0;  M_zXYYZ=0.0;  M_zXYZZ=0.0;
-               M_zXXYYZ=0.0;  M_zXXYZZ=0.0;  M_zXYYZZ=0.0;  M_zXXYYZZ=0.0;
-
-               vx_sq=vx*vx;
-               vy_sq=vy*vy;
-               vz_sq=vz*vz;
-               vx_vy=vx*vy;
-               vx_vz=vx*vz;
-               vy_vz=vy*vz;
-               vx_vy_vz=vx_vy*vz;
-
-               mu200=(f[E]+f[W]+f[NE]+f[SW]+f[SE]+f[NW]+f[TE]+f[BW]+f[BE]+f[TW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu020=(f[N]+f[S]+f[NE]+f[SW]+f[SE]+f[NW]+f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu002=(f[T]+f[B]+f[TE]+f[BW]+f[BE]+f[TW]+f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu110=(f[NE]-f[SE]+f[SW]-f[NW]+f[TNE]-f[TSE]+f[BNE]-f[BSE]+f[TSW]-f[TNW]+f[BSW]-f[BNW])*durchrho;
-               mu101=(f[TE]+f[BW]-f[BE]-f[TW]+f[TNE]-f[BNE]+f[TSE]-f[BSE]-f[TNW]+f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu011=(f[TN]+f[BS]-f[BN]-f[TS]+f[TNE]-f[BNE]-f[TSE]+f[BSE]+f[TNW]-f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu210=(f[NE]-f[SW]-f[SE]+f[NW]+f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu120=(f[NE]-f[SW]+f[SE]-f[NW]+f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu102=(f[TE]-f[BW]+f[BE]-f[TW]+f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu111=(f[TNE]-f[BNE]-f[TSE]+f[BSE]-f[TNW]+f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu201=(f[TE]-f[BW]-f[BE]+f[TW]+f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu021=(f[TN]-f[BS]-f[BN]+f[TS]+f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu012=(f[TN]-f[BS]+f[BN]-f[TS]+f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu220=(f[NE]+f[SW]+f[SE]+f[NW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu121=(f[TNE]-f[BNE]+f[TSE]-f[BSE]-f[TNW]+f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu202=(f[TE]+f[BW]+f[BE]+f[TW]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu211=(f[TNE]-f[BNE]-f[TSE]+f[BSE]+f[TNW]-f[BNW]-f[TSW]+f[BSW])*durchrho;
-               mu112=(f[TNE]+f[BNE]-f[TSE]-f[BSE]-f[TNW]-f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu022=(f[TN]+f[BS]+f[BN]+f[TS]+f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu221=(f[TNE]-f[BNE]+f[TSE]-f[BSE]+f[TNW]-f[BNW]+f[TSW]-f[BSW])*durchrho;
-               mu122=(f[TNE]-f[TNW]+f[BNE]-f[BNW]+f[TSE]-f[TSW]+f[BSE]-f[BSW])*durchrho;
-               mu212=(f[TNE]+f[BNE]-f[TSE]-f[BSE]+f[TNW]+f[BNW]-f[TSW]-f[BSW])*durchrho;
-               mu222=(f[TNE]+f[BNE]+f[TSE]+f[BSE]+f[TNW]+f[BNW]+f[TSW]+f[BSW])*durchrho;
-               mu000=1.0;
-               mu100=vx;
-               mu010=vy; 
-               mu001=vz;
-
-               M_zYZ= -vy_vz  +mu011 ;
-               M_zZZ= -vz_sq  +mu002 ; 
-               M_zYY= -vy_sq  +mu020 ;
-               M_zXX= -vx_sq  +mu200 ;
-               M_zXY= -vx_vy  +mu110 ;          
-               M_zXZ =-vx_vz  +mu101 ;
-
-               M_zYYZ=mu021-(mu020*vz + 2.0*vy*M_zYZ);          
-               M_zYZZ=mu012-(vy*mu002 + 2.0*vz*M_zYZ);
-               M_zXZZ=mu102-(vx*mu002 + 2.0*vz*M_zXZ);
-               M_zXXZ=mu201-(mu200*vz + 2.0*vx*M_zXZ );
-               M_zXXY=mu210-(mu200*vy + 2.0*vx*M_zXY );
-               M_zXYY=mu120-(vx*mu020 + 2.0*vy*M_zXY);
-               M_zXYZ=mu111-(vx_vy_vz + vx*M_zYZ + vy*M_zXZ + vz*M_zXY);
-
-               M_zXYYZ=mu121-(vz*mu120+ 2.0*vx_vy*M_zYZ+vx*M_zYYZ+vy_sq*M_zXZ+2.0*vy*M_zXYZ); 
-               M_zXYZZ=mu112-(vy*mu102+ 2.0*vx_vz*M_zYZ+vx*M_zYZZ+vz_sq*M_zXY+2.0*vz*M_zXYZ);
-               M_zXXYZ=mu211-(vz*mu210+ 2.0*vx_vy*M_zXZ+vy*M_zXXZ+vx_sq*M_zYZ+2.0*vx*M_zXYZ); 
-
-
-               M_zXXYY=mu220-( vx_sq*mu020+ 4.0*vx_vy*M_zXY + 2.0*vx*M_zXYY + vy_sq*M_zXX + 2.0*vy*M_zXXY); 
-               M_zYYZZ=mu022-( vy_sq*mu002+ 4.0*vy_vz*M_zYZ + 2.0*vy*M_zYZZ + vz_sq*M_zYY + 2.0*vz*M_zYYZ);
-               M_zXXZZ=mu202-( vx_sq*mu002+ 4.0*vx_vz*M_zXZ + 2.0*vx*M_zXZZ + vz_sq*M_zXX + 2.0*vz*M_zXXZ); 
-
-               M_zXXYYZ=mu221-(vz*mu220+
-                  2.0*vx_sq*vy*M_zYZ  + vx_sq*M_zYYZ + 2.0*vx*vy_sq*M_zXZ  +4.0*vx_vy*M_zXYZ+ 
-                  2.0*vx*M_zXYYZ  +    vy_sq*M_zXXZ  + 2.0*vy*M_zXXYZ);
-               M_zXYYZZ=mu122-(vx*mu022 
-                  + 2.0*vy_sq*vz*M_zXZ + vy_sq*M_zXZZ + 
-                  2.0*vy*vz_sq*M_zXY + 4.0*vy_vz*M_zXYZ + 2.0*vy*M_zXYZZ +vz_sq*M_zXYY + 2.0*vz*M_zXYYZ);
-               M_zXXYZZ=mu212-(vy*mu202
-                  + 2.0*vx_sq*vz*M_zYZ +vx_sq*M_zYZZ  + 2.0*vx*vz_sq*M_zXY + 4.0*vx_vz*M_zXYZ 
-                  + 2.0*vx*M_zXYZZ  + vz_sq*M_zXXY +  2.0*vz*M_zXXYZ);
-
-               M_zXXYYZZ=mu222-(vx_sq*mu022 
-                  + 4.0* vx*vy_sq*vz*M_zXZ   + 
-                  2.0* vx*vy_sq*M_zXZZ + 4.0* vx_vy*vz_sq*M_zXY+ 
-                  8.0* vx_vy_vz*M_zXYZ + 4.0* vx_vy*M_zXYZZ + 
-                  2.0* vx*vz_sq*M_zXYY + 4.0* vx_vz*M_zXYYZ + 2.0*vx*M_zXYYZZ + 
-                  vy_sq*vz_sq*M_zXX + 2.0* vy_sq*vz*M_zXXZ  + 
-                  vy_sq*M_zXXZZ     + 2.0* vy*vz_sq*M_zXXY  + 4.0*vy_vz*M_zXXYZ + 
-                  2.0* vy*M_zXXYZZ + vz_sq*M_zXXYY +2.0* vz*M_zXXYYZ);
-
-               ////////lin kombi bilden:
-               MXXpMYYpMZZ = M_zXX + M_zYY + M_zZZ;
-               MXXmMYY = M_zXX - M_zYY;
-               MXXmMZZ = M_zXX - M_zZZ;
-
-               MXXYpMYZZ  =  M_zXXY+M_zYZZ;
-               MXXYmMYZZ  =  M_zXXY-M_zYZZ;
-               MXXZpMYYZ  =  M_zXXZ+M_zYYZ;
-               MXXZmMYYZ  =  M_zXXZ-M_zYYZ;
-               MXYYpMXZZ  =  M_zXYY+M_zXZZ;
-               MXYYmMXZZ  =  M_zXYY-M_zXZZ;
-
-               MXXYYppp  = M_zXXYY + M_zXXZZ + M_zYYZZ;
-               MXXYYpm2p = M_zXXYY - 2.0*M_zXXZZ + M_zYYZZ;
-               MXXYYppm2 = M_zXXYY + M_zXXZZ - 2.0*M_zYYZZ;
-
-
-               //relaxation: 
-               MXXpMYYpMZZ -= w2*(1.0-MXXpMYYpMZZ);
-               MXXmMYY +=     w1*(    MXXmMYY); 
-               MXXmMZZ +=     w1*(    MXXmMZZ); 
-
-               MXXYpMYZZ  +=  w3*(MXXYpMYZZ); 
-               MXXYmMYZZ  +=  w4*(MXXYmMYZZ); 
-               MXXZpMYYZ  +=  w3*(MXXZpMYYZ); 
-               MXXZmMYYZ  +=  w4*(MXXZmMYYZ); 
-               MXYYpMXZZ  +=  w3*(MXYYpMXZZ); 
-               MXYYmMXZZ  +=  w4*(MXYYmMXZZ); 
-
-               MXXYYppp  -= w7*(c1o3 -MXXYYppp );
-               MXXYYpm2p += w6*(MXXYYpm2p);
-               MXXYYppm2 += w6*(MXXYYppm2);
-
-
-               M_zXXYYZZ-=w10*(c1o27-M_zXXYYZZ);
-               M_zXZ+=w1*(  M_zXZ    );
-               M_zYZ+=w1*(  M_zYZ    );
-               M_zXY+=w1*(  M_zXY    );
-
-               M_zXYZ+=w5*(  M_zXYZ   );
-
-               M_zXYYZ+=w8*(  M_zXYYZ  );
-               M_zXYZZ+=w8*(  M_zXYZZ  );
-               M_zXXYZ+=w8*(  M_zXXYZ  );
-
-               M_zXXYYZ+=w9*( M_zXXYYZ );
-               M_zXXYZZ+=w9*( M_zXXYZZ );
-               M_zXYYZZ+=w9*( M_zXYYZZ );
-
-               ////////von Lin Kombis zurueck:
-               M_zXX = c1o3 *MXXmMYY + c1o3 *MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-               M_zYY = -c2o3* MXXmMYY+ c1o3* MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-               M_zZZ = c1o3   * MXXmMYY -c2o3 *MXXmMZZ +  c1o3* MXXpMYYpMZZ; 
-
-               M_zXXY = (MXXYmMYZZ + MXXYpMYZZ)*0.5; 
-               M_zYZZ = 0.5*(-MXXYmMYZZ + MXXYpMYZZ); 
-               M_zXYY =(MXYYmMXZZ + MXYYpMXZZ)*0.5; 
-               M_zXZZ = 0.5*(-MXYYmMXZZ + MXYYpMXZZ); 
-               M_zXXZ = (MXXZmMYYZ + MXXZpMYYZ)*0.5; 
-               M_zYYZ = 0.5*(-MXXZmMYYZ + MXXZpMYYZ);
-
-               M_zXXYY =  c1o3* MXXYYpm2p + c1o3* MXXYYppm2 +  0.33333333*MXXYYppp; 
-               M_zXXZZ = -c1o3* MXXYYpm2p + c1o3* MXXYYppp; 
-               M_zYYZZ = -c1o3* MXXYYppm2 + c1o3* MXXYYppp;
-
-               //forcing 
-               /////////////////////////////////////////////////////////////////////////////////////////////
-               mu100 += forcingX1*0.5; 
-               vx += forcingX1*0.5; // X
-               mu010 += forcingX2*0.5; 
-               vy += forcingX2*0.5; // Y
-               mu001 += forcingX3*0.5; 
-               vz += forcingX3*0.5; // Z
-               vx_sq=vx*vx;
-               vy_sq=vy*vy;
-               vz_sq=vz*vz;
-               vx_vy=vx*vy;
-               vx_vz=vx*vz;
-               vy_vz=vy*vz;
-               vx_vy_vz=vx_vy*vz;
-               /////////////////////////////////////////////////////////////////////////////////////////////
-                  
-               mu011=  vy_vz + M_zYZ;
-               mu002= vz_sq + M_zZZ; 
-               mu020= vy_sq + M_zYY ;
-               mu200=   vx_sq + M_zXX;
-               mu110= vx_vy+ M_zXY;          
-               mu101 =vx_vz + M_zXZ;
-
-               mu021=mu020*vz + 2.0*vy*M_zYZ  + M_zYYZ;          
-               mu012=vy*mu002 + 2.0*vz*M_zYZ + M_zYZZ;
-               mu102=vx*mu002 + 2.0*vz*M_zXZ + M_zXZZ;
-               mu112=vy*mu102 + 2.0*vx_vz*M_zYZ+vx*M_zYZZ+vz_sq*M_zXY+2.0*vz*M_zXYZ+M_zXYZZ;
-
-               mu201=mu200*vz + 2.0*vx*M_zXZ  + M_zXXZ;
-               mu210=mu200*vy + 2.0*vx*M_zXY  + M_zXXY;
-               mu211=vz*mu210 + 2.0*vx_vy*M_zXZ+vy*M_zXXZ+vx_sq*M_zYZ+2.0*vx*M_zXYZ+M_zXXYZ; 
-
-               mu120=vx*mu020 + 2.0*vy*M_zXY + M_zXYY;
-               mu121=vz*mu120 + 2.0*vx_vy*M_zYZ+vx*M_zYYZ+vy_sq*M_zXZ+2.0*vy*M_zXYZ+ M_zXYYZ; 
-
-               mu111=vx_vy_vz + vx*M_zYZ + vy*M_zXZ + vz*M_zXY+M_zXYZ;
-
-               mu220=vx_sq*mu020 + 4.0*vx_vy*M_zXY + 2.0*vx*M_zXYY  + vy_sq*M_zXX + 2.0*vy*M_zXXY +  M_zXXYY; 
-
-               mu221=vz*mu220 + 2.0*vx_sq*vy*M_zYZ  + vx_sq*M_zYYZ + 2.0*vx*vy_sq*M_zXZ  +4.0*vx_vy*M_zXYZ+ 
-                  2.0*vx*M_zXYYZ  +    vy_sq*M_zXXZ  + 2.0*vy*M_zXXYZ  + M_zXXYYZ;
-
-               mu022= vy_sq*mu002 + 4.0*vy_vz*M_zYZ  +2.0*vy*M_zYZZ+ vz_sq*M_zYY+ 2.0*vz*M_zYYZ +  M_zYYZZ;
-
-               mu122=vx*mu022 + 2.0*vy_sq*vz*M_zXZ + vy_sq*M_zXZZ + 
-                  2.0*vy*vz_sq*M_zXY + 4.0*vy_vz*M_zXYZ + 2.0*vy*M_zXYZZ +vz_sq*M_zXYY + 2.0*vz*M_zXYYZ + M_zXYYZZ;
-
-               mu202= vx_sq*mu002 + 4.0*vx_vz*M_zXZ+ 2.0*vx*M_zXZZ + vz_sq*M_zXX+ 2.0*vz*M_zXXZ + M_zXXZZ; 
-
-               mu212=vy*mu202 + 2.0*vx_sq*vz*M_zYZ +vx_sq*M_zYZZ  + 2.0*vx*vz_sq*M_zXY + 4.0*vx_vz*M_zXYZ 
-                  + 2.0*vx*M_zXYZZ  + vz_sq*M_zXXY +  2.0*vz*M_zXXYZ + M_zXXYZZ;
-
-               mu222=vx_sq*mu022 
-                  + 4.0* vx*vy_sq*vz*M_zXZ   + 
-                  2.0* vx*vy_sq*M_zXZZ + 4.0* vx_vy*vz_sq*M_zXY+ 
-                  8.0* vx_vy_vz*M_zXYZ + 4.0* vx_vy*M_zXYZZ + 
-                  2.0* vx*vz_sq*M_zXYY + 4.0* vx_vz*M_zXYYZ + 2.0*vx*M_zXYYZZ + 
-                  vy_sq*vz_sq*M_zXX + 2.0* vy_sq*vz*M_zXXZ  + 
-                  vy_sq*M_zXXZZ     + 2.0* vy*vz_sq*M_zXXY  + 4.0*vy_vz*M_zXXYZ + 
-                  2.0* vy*M_zXXYZZ + vz_sq*M_zXXYY +2.0* vz*M_zXXYYZ + M_zXXYYZZ;
-
-               f[E] =0.5* (mu200 -  mu220 + mu222 - mu202 - mu120 + mu122 - mu102 +mu100) *(rho);
-               f[W] =0.5* (mu200 - mu220 + mu222 - mu202 + mu120 - mu122 + mu102 -mu100)*  (rho);
-               f[N] =0.5* (-mu210 - mu220 + mu222 + mu212 + mu020 - mu022 - mu012 +mu010)* (rho);
-               f[S] =0.5* (mu210 -  mu220 + mu222 - mu212 + mu020 - mu022 + mu012 -mu010)* (rho);
-               f[T] =0.5* (mu221 +  mu222 - mu201 - mu202 - mu021 - mu022 + mu002 +mu001)* (rho);
-               f[B] =0.5* (-mu221 + mu222 + mu201  - mu202 + mu021 - mu022 + mu002-mu001)* (rho);
-               f[NE] =0.25*( mu210  + mu220- mu222 - mu212 + mu110+ mu120- mu122 -mu112)*  (rho); 
-               f[SW] =0.25*(-mu210 + mu220- mu222 + mu212 + mu110- mu120+ mu122 -mu112)*  (rho); 
-               f[SE] =0.25*(-mu210 + mu220- mu222 + mu212 - mu110+ mu120- mu122 +mu112)*  (rho); 
-               f[NW] =0.25*( mu210  + mu220- mu222 - mu212 - mu110- mu120+ mu122 + mu112)* (rho); 
-               f[TE]=0.25*(-mu221 - mu222 + mu201 + mu202 - mu121 - mu122 + mu101 + mu102)*(rho); 
-               f[BW]=0.25*( mu221  -mu222 - mu201 + mu202 - mu121 + mu122 + mu101 - mu102)*(rho);
-
-               f[BE]=0.25*(mu221 - mu222 - mu201 + mu202 + mu121 - mu122 - mu101 +mu102)*  (rho);
-               f[TW]=0.25*(-mu221 - mu222 + mu201 + mu202 + mu121 + mu122 - mu101 -mu102)* (rho); 
-               f[TN]=0.25*(-mu221 - mu222 - mu211 - mu212 + mu021 + mu022 + mu011+mu012)*  (rho);
-               f[BS]=0.25*( mu221 - mu222 - mu211 + mu212 - mu021 + mu022 + mu011 - mu012)*(rho);
-               f[BN]=0.25*( mu221 - mu222 + mu211 - mu212 - mu021 + mu022 - mu011 + mu012)*(rho);
-               f[TS]=0.25*(-mu221 - mu222 + mu211 + mu212 + mu021 + mu022 - mu011 -mu012)* (rho); 
-               f[ZERO]=     (-mu200 + mu220 - mu222 + mu202 - mu020 + mu022 - mu002 + mu000)*(rho);
-               f[TNE]=0.125*( mu221 + mu222 + mu211 + mu212 + mu121 + mu122 + mu111 + mu112)*  (rho); 
-               f[BNE]=0.125*(-mu221 + mu222 -mu211 + mu212 -mu121 + mu122 -mu111 + mu112)*     (rho);
-               f[TSE]=0.125*( mu221 + mu222 - mu211 - mu212 + mu121 + mu122 - mu111 - mu112)*  (rho); 
-               f[BSE]=0.125*(-mu221 + mu222 +mu211 - mu212 -mu121 + mu122 +mu111 - mu112)*     (rho); 
-               f[TNW]=0.125*( mu221 + mu222 + mu211 + mu212 - mu121 - mu122 - mu111 - mu112)*  (rho); 
-               f[BNW]=0.125*(-mu221 + mu222 -mu211 + mu212 +mu121 - mu122 +mu111 - mu112)*     (rho); 
-               f[TSW]=0.125*( mu221 + mu222 - mu211 - mu212 - mu121 - mu122 + mu111 + mu112)*  (rho); 
-               f[BSW]=0.125*(-mu221 + mu222+mu211 - mu212+mu121 - mu122-mu111 + mu112)*        (rho);
-
-//#ifdef _DEBUG
-               LBMReal rho_post = f[ZERO] + f[E] + f[W] + f[N] + f[S] + f[T] + f[B] 
-               + f[NE] + f[SW] + f[SE] + f[NW] + f[TE] + f[BW] + f[BE]
-               + f[TW] + f[TN] + f[BS] + f[BN] + f[TS] + f[TNE] + f[TSW]
-               + f[TSE] + f[TNW] + f[BNE] + f[BSW] + f[BSE] + f[BNW];
-               LBMReal dif = fabs(rho - rho_post);
-               assert(dif < 10.0E-15);
-//#endif  
-
-               //////////////////////////////////////////////////////////////////////////
-               //write distribution
-               //////////////////////////////////////////////////////////////////////////
-               (*this->localDistributions)(D3Q27System::ET_E,x1,  x2,  x3) = f[D3Q27System::INV_E];
-               (*this->localDistributions)(D3Q27System::ET_N,x1,  x2,  x3) = f[D3Q27System::INV_N];
-               (*this->localDistributions)(D3Q27System::ET_T,x1,  x2,  x3) = f[D3Q27System::INV_T];
-               (*this->localDistributions)(D3Q27System::ET_NE,x1,  x2,  x3) = f[D3Q27System::INV_NE];
-               (*this->localDistributions)(D3Q27System::ET_NW,x1+1,x2,  x3) = f[D3Q27System::INV_NW];
-               (*this->localDistributions)(D3Q27System::ET_TE,x1,  x2,  x3) = f[D3Q27System::INV_TE];
-               (*this->localDistributions)(D3Q27System::ET_TW,x1+1,x2,  x3) = f[D3Q27System::INV_TW];
-               (*this->localDistributions)(D3Q27System::ET_TN,x1,  x2,  x3) = f[D3Q27System::INV_TN];
-               (*this->localDistributions)(D3Q27System::ET_TS,x1,  x2+1,x3) = f[D3Q27System::INV_TS];
-               (*this->localDistributions)(D3Q27System::ET_TNE,x1,  x2,  x3) = f[D3Q27System::INV_TNE];
-               (*this->localDistributions)(D3Q27System::ET_TNW,x1+1,x2,  x3) = f[D3Q27System::INV_TNW];
-               (*this->localDistributions)(D3Q27System::ET_TSE,x1,  x2+1,x3) = f[D3Q27System::INV_TSE];
-               (*this->localDistributions)(D3Q27System::ET_TSW,x1+1,x2+1,x3) = f[D3Q27System::INV_TSW];
-
-               (*this->nonLocalDistributions)(D3Q27System::ET_W,x1+1,x2,  x3    ) = f[D3Q27System::INV_W ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_S,x1,  x2+1,x3    ) = f[D3Q27System::INV_S ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_B,x1,  x2,  x3+1  ) = f[D3Q27System::INV_B ];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SW,x1+1,x2+1,x3   ) = f[D3Q27System::INV_SW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_SE,x1,  x2+1,x3   ) = f[D3Q27System::INV_SE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BW,x1+1,x2,  x3+1 ) = f[D3Q27System::INV_BW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BE,x1,  x2,  x3+1 ) = f[D3Q27System::INV_BE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BS,x1,  x2+1,x3+1 ) = f[D3Q27System::INV_BS];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BN,x1,  x2,  x3+1 ) = f[D3Q27System::INV_BN];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSW,x1+1,x2+1,x3+1) = f[D3Q27System::INV_BSW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BSE,x1,  x2+1,x3+1) = f[D3Q27System::INV_BSE];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNW,x1+1,x2,  x3+1) = f[D3Q27System::INV_BNW];
-               (*this->nonLocalDistributions)(D3Q27System::ET_BNE,x1,  x2,  x3+1) = f[D3Q27System::INV_BNE];
-
-               (*this->zeroDistributions)(x1,x2,x3) = f[D3Q27System::ZERO];
-               //////////////////////////////////////////////////////////////////////////
-               
-            }
-         }
-      }
-   }
-}
-//////////////////////////////////////////////////////////////////////////
-double LBMKernelETD3Q27CascadedTI::getCallculationTime()
-{
-   //return timer.getDuration();
-   return timer.getTotalTime();
-}
diff --git a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.h b/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.h
deleted file mode 100644
index f87e225f2b09723a117cd43bf8983a461fc570a9..0000000000000000000000000000000000000000
--- a/source/VirtualFluidsCore/LBM/LBMKernelETD3Q27CascadedTI.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef LBMKernelETD3Q27CascadedTI_H
-#define LBMKernelETD3Q27CascadedTI_H
-
-#include "LBMKernelETD3Q27.h"
-#include "D3Q27ETBCProcessor.h"
-#include "D3Q27System.h"
-#include <boost/serialization/export.hpp>
-#include "basics/utilities/UbTiming.h"
-#include "basics/container/CbArray4D.h"
-#include "basics/container/CbArray3D.h"
-
-class LBMKernelETD3Q27CascadedTI;
-typedef boost::shared_ptr<LBMKernelETD3Q27CascadedTI> LBMKernelETD3Q27CascadedTiPtr;
-
-//Kernel with turbulent intensity 
-
-class LBMKernelETD3Q27CascadedTI :  public LBMKernelETD3Q27
-{
-public:
-   LBMKernelETD3Q27CascadedTI();
-   LBMKernelETD3Q27CascadedTI(int nx1, int nx2, int nx3);
-   ~LBMKernelETD3Q27CascadedTI(void);
-   void calculate();
-   LBMKernel3DPtr clone();
-   double getCallculationTime();
-
-protected:
-   friend class boost::serialization::access;
-   template<class Archive>
-   void serialize(Archive & ar, const unsigned int version)
-   {
-      ar & boost::serialization::base_object<LBMKernelETD3Q27>(*this);
-      //ar & averageValues;
-   }
-   
-   void collideAll();   
-   void init();
-   LBMReal f[D3Q27System::ENDF+1];
-   LBMReal rho, vx, vy, vz, durchrho;
-   LBMReal w1,w2,w3,w4,w5,w6,w7,w8,w9,w10;
-   LBMReal s9,c1o27,c2o3;
-
-   LBMReal M_zXX, M_zYY, M_zZZ, M_zXY,    M_zXZ,  M_zYZ,
-          M_zXXY,    M_zXYY,    M_zXXZ,    M_zXZZ,   M_zYYZ,  M_zYZZ,  M_zXYZ,
-          M_zXXYY,   M_zXXZZ,   M_zYYZZ,   M_zXXYZ,  M_zXYYZ,  M_zXYZZ,
-          M_zXXYYZ,  M_zXXYZZ,  M_zXYYZZ,  M_zXXYYZZ;
-   LBMReal mu200, mu020, mu002,mu110, mu101,mu011,mu210,mu120,mu102,mu111, 
-           mu201,mu021,mu012,mu220,mu121,mu202,mu211,mu112,mu022,mu221,mu122,mu212,mu222,mu000,mu100,mu010,mu001;
-   LBMReal vx_sq, vy_sq, vz_sq, vx_vy, vx_vz, vy_vz, vx_vy_vz;
-   LBMReal MXXpMYYpMZZ,MXXmMYY, MXXmMZZ,
-            MXXYpMYZZ,MXXZpMYYZ,MXYYpMXZZ,  MXXYmMYZZ,MXXZmMYYZ,MXYYmMXZZ,
-            MXXYYppp,MXXYYpm2p, MXXYYppm2;
-   UbTimer timer;
-
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr localDistributions;
-   CbArray4D<LBMReal,IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributions;
-   CbArray3D<LBMReal,IndexerX3X2X1>::CbArray3DPtr   zeroDistributions;
-
-   //AverageValuesArray3DPtr averageValues;
-   //int averageCount;
-};
-
-#endif
diff --git a/source/VirtualFluidsCore/Visitors/BoundaryConditionBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/BoundaryConditionBlockVisitor.cpp
index c2fcaa55d7261cba09e63477266ff1feb928d352..6f07701e2ac8c86bfda428df402e08aaab88800c 100644
--- a/source/VirtualFluidsCore/Visitors/BoundaryConditionBlockVisitor.cpp
+++ b/source/VirtualFluidsCore/Visitors/BoundaryConditionBlockVisitor.cpp
@@ -42,6 +42,11 @@ void BoundaryConditionBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
       int nsCount = 0;
       int sCount = 0;
 
+      if (velocity) velocity->clearData();
+      if (density) density->clearData();
+      if (noSlip)  noSlip->clearData();
+      if (slip)    slip->clearData();
+
       EsoTwist3DPtr distributions = boost::dynamic_pointer_cast<EsoTwist3D>(kernel->getDataSet()->getFdistributions());
 
       for (int x3 = minX3; x3 < maxX3; x3++)
diff --git a/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..06b3ba7454994ced12bcdc184159cc5801ac5042
--- /dev/null
+++ b/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.cpp
@@ -0,0 +1,73 @@
+#include "CheckRatioBlockVisitor.h"
+#include "Grid3DSystem.h"
+
+CheckRatioBlockVisitor::CheckRatioBlockVisitor(int levelDepth/*shut be maxGridLevel*/, bool includeNotActiveBlocks)
+   : Block3DVisitor(0, Grid3DSystem::MAXLEVEL)
+   , levelDepth(levelDepth)
+   , includeNotActiveBlocks(includeNotActiveBlocks)
+   , state(true)
+{
+}
+//////////////////////////////////////////////////////////////////////////
+void CheckRatioBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
+{
+   int ix1, ix2, ix3, level;
+   ix1 = block->getX1();
+   ix2 = block->getX2();
+   ix3 = block->getX3();
+   level = block->getLevel();
+
+   int nix1, nix2, nix3, nlev;
+   int neighix1, neighix2, neighix3, neighlev;
+   std::vector<Block3DPtr> neighbors;
+   grid->getAllNeighbors(ix1, ix2, ix3, level, this->levelDepth, neighbors);
+   bool hasAdded = false;
+   for (size_t i = 0; i<neighbors.size(); i++)
+   {
+      if ((neighbors[i]->isActive()||includeNotActiveBlocks)
+         &&neighbors[i]->getLevel()>level)
+      {
+         neighix1 = neighbors[i]->getX1();
+         neighix2 = neighbors[i]->getX2();
+         neighix3 = neighbors[i]->getX3();
+         neighlev = neighbors[i]->getLevel();
+         nix1 = neighix1>>1;
+         nix2 = neighix2>>1;
+         nix3 = neighix3>>1;
+         nlev = neighlev-1;
+
+         if (nlev!=level)
+         {
+            //throw UbException(UB_EXARGS, "OverlapBlockVisitor::adaptBlock - leveldifferenz passt nicht, block: "+block->toString());
+            //grid->expandBlock(ix1, ix2, ix3, level);
+            state = state&&false;
+            falseBlock = block;
+
+         }
+         else
+         {
+            state = state&&true;
+         }
+
+         //UBLOG(logINFO, "OverlapBlockVisitor::state= "<<state);
+
+
+      }
+   }
+}
+//////////////////////////////////////////////////////////////////////////
+bool CheckRatioBlockVisitor::getState()
+{
+   return state;
+}
+//////////////////////////////////////////////////////////////////////////
+void CheckRatioBlockVisitor::resetState()
+{
+   state = true;
+}
+//////////////////////////////////////////////////////////////////////////
+std::string CheckRatioBlockVisitor::getStateString()
+{
+   return falseBlock->toString();
+}
+//////////////////////////////////////////////////////////////////////////
diff --git a/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.h b/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..eceb912f4799caaebff1a8ac2583264172a2e2fb
--- /dev/null
+++ b/source/VirtualFluidsCore/Visitors/CheckRatioBlockVisitor.h
@@ -0,0 +1,29 @@
+#ifndef CheckRatioBlockVisitor_H
+#define CheckRatioBlockVisitor_H
+
+#include "Block3DVisitor.h"
+
+class CheckRatioBlockVisitor : public Block3DVisitor
+{
+public:
+   CheckRatioBlockVisitor(int levelDepth, bool includeNotActiveBlocks = true);
+
+   virtual ~CheckRatioBlockVisitor() {}
+
+   bool getState();
+   void resetState();
+   std::string getStateString();
+
+   void visit(Grid3DPtr grid, Block3DPtr block);
+
+protected:
+
+private:
+   int  levelDepth;
+   bool includeNotActiveBlocks;
+   bool state;
+   Block3DPtr falseBlock;
+};
+
+#endif //OverlapBlockVisitor_H
+
diff --git a/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.cpp b/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.cpp
index e0b8fae8ce89a796184f549c14b40e40b6157f4c..986c0c422fcfd9ea61b3ba123a9e2dd9b7d108ef 100644
--- a/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.cpp
+++ b/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.cpp
@@ -2,9 +2,6 @@
 #include <D3Q27System.h>
 #include <Communicator.h>
 #include <StringUtil.hpp>
-#include <basics/transmitter/TbTransmitterMpi.h>
-#include <basics/transmitter/TbTransmitterMpiPoolEx.h>
-#include <FNV/fnv.h>
 #include <string>
 
 #ifdef VF_FETOL
@@ -14,6 +11,8 @@
 
 unsigned CreateTransmittersHelper::vKey = 0;
 
+using namespace std;
+
 //////////////////////////////////////////////////////////////////////////
 CreateTransmittersHelper::CreateTransmittersHelper()
 {
@@ -57,8 +56,8 @@ void CreateTransmittersHelper::createTransmitters(Block3DPtr sblock, Block3DPtr
 #endif
       )
    {
-      unsigned int sendPoolKey = generatePoolKey(srcRank, srcLevel, tgtRank, tgtLevel);
-      unsigned int receivePoolKey = generatePoolKey(tgtRank, tgtLevel, srcRank, srcLevel);
+      string sendPoolKey = generatePoolKey(srcRank, srcLevel, tgtRank, tgtLevel);
+      string receivePoolKey = generatePoolKey(tgtRank, tgtLevel, srcRank, srcLevel);
 
       TbCbVectorMpiPool <LBMReal>::MpiPoolPtr sendPool = TbCbVectorMpiPool <LBMReal>::getTbCbVectorMpiPool(sendPoolKey   );
       TbCbVectorMpiPool <LBMReal>::MpiPoolPtr recvPool = TbCbVectorMpiPool <LBMReal>::getTbCbVectorMpiPool(receivePoolKey);
@@ -128,7 +127,7 @@ int CreateTransmittersHelper::generateMPITag(int srcLevel, int tgtLevel)
    }
 }
 //////////////////////////////////////////////////////////////////////////
-unsigned int CreateTransmittersHelper::generatePoolKey(int srcRank, int srcLevel, int tgtRank, int tgtLevel)
+string CreateTransmittersHelper::generatePoolKey(int srcRank, int srcLevel, int tgtRank, int tgtLevel)
 {
    std::string str;
    str = StringUtil::toString<int>(srcLevel);
@@ -139,16 +138,13 @@ unsigned int CreateTransmittersHelper::generatePoolKey(int srcRank, int srcLevel
    str += "#";
    str += StringUtil::toString<int>(tgtRank);
 
-   //unsigned int key = Utilities::RSHash(str); //by more as 900 000 elements is collision
-   unsigned int key = FNV::fnv1a(str);
-
-   return key;
+   return str;
 }
 //////////////////////////////////////////////////////////////////////////
-unsigned int CreateTransmittersHelper::generateVectorKey(int x1, int x2, int x3,/*int id,*/ int dir, IBlock ib)
+string CreateTransmittersHelper::generateVectorKey(int x1, int x2, int x3, int dir, IBlock ib)
 {
    std::string str;
-   //str += StringUtil::toString<int>(id);
+
    str += StringUtil::toString<int>(x1);
    str += "#";
    str += StringUtil::toString<int>(x2);
@@ -159,14 +155,7 @@ unsigned int CreateTransmittersHelper::generateVectorKey(int x1, int x2, int x3,
    str += "#";
    str += StringUtil::toString<int>(ib);
 
-   unsigned int key = Utilities::RSHash(str);
-   //unsigned int key = FNV::fnv1a(str);
-
-   return key;
-
-   //return str;
-   //vKey++;
-   //return vKey;
+   return str;
 }
 
 
diff --git a/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.h b/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.h
index ff59207619e584b987ebdeda4ad8b6a87515f7e9..ad02aa30ac9e39c72533b229ff412744f850d769 100644
--- a/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.h
+++ b/source/VirtualFluidsCore/Visitors/CreateTransmittersHelper.h
@@ -27,8 +27,8 @@ public:
                                  TransmitterPtr& sender, TransmitterPtr& receiver, CommunicatorPtr comm, TransmitterType tType);
 protected:
 private:
-   unsigned int generatePoolKey(int srcRank, int srcLevel, int tgtRank, int tgtLevel);
-   unsigned int  generateVectorKey(int x1, int x2, int x3,/*int id,*/ int dir, IBlock ib);
+   std::string generatePoolKey(int srcRank, int srcLevel, int tgtRank, int tgtLevel);
+   std::string  generateVectorKey(int x1, int x2, int x3,/*int id,*/ int dir, IBlock ib);
    int generateMPITag(int srcLevel, int tgtLevel);
    static unsigned int vKey;
 };
diff --git a/source/VirtualFluidsCore/Visitors/D3Q27SetUndefinedNodesBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/D3Q27SetUndefinedNodesBlockVisitor.cpp
index 9caf47d6aa64e41da49e2fc499176458230b2b33..e2e7039d8e3fc2e18ea52e0c13db7c48d7f098ed 100644
--- a/source/VirtualFluidsCore/Visitors/D3Q27SetUndefinedNodesBlockVisitor.cpp
+++ b/source/VirtualFluidsCore/Visitors/D3Q27SetUndefinedNodesBlockVisitor.cpp
@@ -632,7 +632,17 @@ void D3Q27SetUndefinedNodesBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
    if(block->hasInterpolationFlagCF())
    {
       if(block->hasInterpolationFlagFC()) 
+      {
+         for (int i = D3Q27System::E; i <= D3Q27System::TS; i++)
+         {
+             UBLOG(logINFO, "FC in dir="<<i<<" "<<block->hasInterpolationFlagFC(i));
+         }
+         for (int i = D3Q27System::E; i<=D3Q27System::TS; i++)
+         {
+            UBLOG(logINFO, "CF in dir="<<i<<" "<<block->hasInterpolationFlagCF(i));
+         }
          throw UbException(UB_EXARGS, "block "+block->toString()+" has CF and FC");
+      }
 
       minX1 = gl;
       minX2 = gl;
diff --git a/source/VirtualFluidsCore/Visitors/OverlapBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/OverlapBlockVisitor.cpp
index b11a42bdb05ae448e4a0e3b93bd37cd0ae9bd90e..aa47bcb523077f9335e6a6c3da67f9187792e9f1 100644
--- a/source/VirtualFluidsCore/Visitors/OverlapBlockVisitor.cpp
+++ b/source/VirtualFluidsCore/Visitors/OverlapBlockVisitor.cpp
@@ -39,6 +39,7 @@ void OverlapBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
          {
             throw UbException(UB_EXARGS, "OverlapBlockVisitor::adaptBlock - leveldifferenz passt nicht, block: " + block->toString());
          }
+
          Block3DPtr newBlock = grid->getBlock(nix1,nix2,nix3,nlev);
          if(!newBlock)
          {
@@ -49,7 +50,6 @@ void OverlapBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
       }
    }
 }
-
 //////////////////////////////////////////////////////////////////////////
 std::string OverlapBlockVisitor::getSpecificDescription()
 {
diff --git a/source/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
index d8c294f172908da696a2aaf1f71ad60f3d2c8e4f..89038d92d5a62c57be3cadce261d38c7fd703798 100644
--- a/source/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
+++ b/source/VirtualFluidsCore/Visitors/SetInterpolationDirsBlockVisitor.cpp
@@ -123,11 +123,26 @@ void SetInterpolationDirsBlockVisitor::visit(Grid3DPtr grid, Block3DPtr block)
    }
 }
 //////////////////////////////////////////////////////////////////////////
+//void SetInterpolationDirsBlockVisitor::checkFlagDir(Grid3DPtr grid, int dir1, int dir2, bool &flagDirection, int ix1, int ix2, int ix3, int level)
+//{
+//   Block3DPtr block1 = grid->getNeighborBlock(dir1, ix1, ix2, ix3, level);
+//   Block3DPtr block2 = grid->getNeighborBlock(dir2, ix1, ix2, ix3, level);
+//   if (!((block1 && block2)  ||  (!block1 && !block2)))
+//      flagDirection = false;
+//   else
+//      flagDirection = true;
+//}
+
 void SetInterpolationDirsBlockVisitor::checkFlagDir(Grid3DPtr grid, int dir1, int dir2, bool &flagDirection, int ix1, int ix2, int ix3, int level)
 {
    Block3DPtr block1 = grid->getNeighborBlock(dir1, ix1, ix2, ix3, level);
    Block3DPtr block2 = grid->getNeighborBlock(dir2, ix1, ix2, ix3, level);
-   if (!((block1 && block2)  ||  (!block1 && !block2)))
+
+   Block3DPtr pblock = grid->getSuperBlock(ix1,ix2,ix3,level);
+   Block3DPtr pblock1 = grid->getNeighborBlock(dir1, pblock);
+   Block3DPtr pblock2 = grid->getNeighborBlock(dir2, pblock);
+
+   if (!((block1 && block2)||(!block1 && !block2)) || !((pblock1 && pblock2)||(!pblock1 && !pblock2)))
       flagDirection = false;
    else
       flagDirection = true;
diff --git a/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp b/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..060bd6e0aedebef6c9c4579573372bcbbfbdfad6
--- /dev/null
+++ b/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.cpp
@@ -0,0 +1,52 @@
+#include "SpongeLayerBlockVisitor.h"
+#include "Grid3DSystem.h"
+#include "LBMSystem.h"
+
+using namespace std;
+
+SpongeLayerBlockVisitor::SpongeLayerBlockVisitor( GbCuboid3DPtr boundingBox ) : Block3DVisitor(0, Grid3DSystem::MAXLEVEL), boundingBox(boundingBox)
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+SpongeLayerBlockVisitor::~SpongeLayerBlockVisitor()
+{
+
+}
+//////////////////////////////////////////////////////////////////////////
+void SpongeLayerBlockVisitor::visit( Grid3DPtr grid, Block3DPtr block )
+{
+   double minX1,minX2,minX3,maxX1,maxX2,maxX3;
+   int gridRank = grid->getRank();
+
+   int minInitLevel = grid->getCoarsestInitializedLevel();
+   int maxInitLevel = grid->getFinestInitializedLevel();
+
+   double numSolids = 0.0;
+   double numFluids = 0.0;
+   for (int level = minInitLevel; level<=maxInitLevel; level++)
+   {
+      vector<Block3DPtr> blockVector;
+      grid->getBlocks(level, gridRank, blockVector);
+      BOOST_FOREACH(Block3DPtr block, blockVector)
+      {
+         UbTupleDouble3 org = grid->getBlockWorldCoordinates(block);
+         UbTupleDouble3 blockLengths = grid->getBlockLengths(block);
+
+         minX1 = val<1>(org);
+         minX2 = val<2>(org);
+         minX3 = val<3>(org);
+         maxX1 = val<1>(org)+val<1>(blockLengths);
+         maxX2 = val<2>(org)+val<2>(blockLengths);
+         maxX3 = val<3>(org)+val<3>(blockLengths);
+
+         if (boundingBox->isCellInsideGbObject3D(minX1,minX2,minX3,maxX1,maxX2,maxX3))
+         {
+            LBMKernel3DPtr kernel = block->getKernel();
+            kernel->setCollisionFactor(kernel->getCollisionFactor()*0.5);
+         }
+      }
+   }
+}
+
+
diff --git a/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.h b/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.h
new file mode 100644
index 0000000000000000000000000000000000000000..29039cb038f034b215cd52c22cdf303ec7b8c551
--- /dev/null
+++ b/source/VirtualFluidsCore/Visitors/SpongeLayerBlockVisitor.h
@@ -0,0 +1,23 @@
+#ifndef SpongeLayerBlockVisitor_h__
+#define SpongeLayerBlockVisitor_h__
+
+#include "Block3DVisitor.h"
+#include "LBMKernel3D.h"
+#include <numerics/geometry3d/GbCuboid3D.h>
+
+//! \brief Set sponge layer for all kernels of grid
+//! \details This visitor is useful if you need to set or reset sponge layer in kernels (e.g. after restart because sponge layer is not serializable). 
+//! \author K. Kutscher
+
+class SpongeLayerBlockVisitor : public Block3DVisitor
+{
+public:
+   SpongeLayerBlockVisitor(GbCuboid3DPtr boundingBox);
+   virtual ~SpongeLayerBlockVisitor();
+   virtual void visit(Grid3DPtr grid, Block3DPtr block);
+protected:
+private:
+   GbCuboid3DPtr boundingBox;
+};
+
+#endif // SetSpongeLayerBlockVisitor_h__