From bfe97b895e54dd600237c5747b110bd589356b05 Mon Sep 17 00:00:00 2001
From: kutscher <kutscher@irmb.tu-bs.de>
Date: Wed, 17 Feb 2021 18:53:14 +0100
Subject: [PATCH] add two distribution connector

---
 ...> TwoDistributionsFullDirectConnector.cpp} | 110 +++++--------
 ... => TwoDistributionsFullDirectConnector.h} | 149 +++++-------------
 ...> TwoDistributionsFullVectorConnector.cpp} |  43 ++++-
 ... => TwoDistributionsFullVectorConnector.h} |  45 +++++-
 .../Visitors/SetConnectorsBlockVisitor.cpp    |  12 +-
 5 files changed, 158 insertions(+), 201 deletions(-)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThixotropyFullDirectConnector.cpp => TwoDistributionsFullDirectConnector.cpp} (63%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThixotropyFullDirectConnector.h => TwoDistributionsFullDirectConnector.h} (67%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThixotropyFullVectorConnector.cpp => TwoDistributionsFullVectorConnector.cpp} (84%)
 rename src/cpu/VirtualFluidsCore/Connectors/{ThixotropyFullVectorConnector.h => TwoDistributionsFullVectorConnector.h} (80%)

diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.cpp
similarity index 63%
rename from src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.cpp
rename to src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.cpp
index 39561bd81..51d1e1a54 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.cpp
@@ -1,4 +1,37 @@
-#include "ThixotropyFullDirectConnector.h"
+//=======================================================================================
+// ____          ____    __    ______     __________   __      __       __        __
+// \    \       |    |  |  |  |   _   \  |___    ___| |  |    |  |     /  \      |  |
+//  \    \      |    |  |  |  |  |_)   |     |  |     |  |    |  |    /    \     |  |
+//   \    \     |    |  |  |  |   _   /      |  |     |  |    |  |   /  /\  \    |  |
+//    \    \    |    |  |  |  |  | \  \      |  |     |   \__/   |  /  ____  \   |  |____
+//     \    \   |    |  |__|  |__|  \__\     |__|      \________/  /__/    \__\  |_______|
+//      \    \  |    |   ________________________________________________________________
+//       \    \ |    |  |  ______________________________________________________________|
+//        \    \|    |  |  |         __          __     __     __     ______      _______
+//         \         |  |  |_____   |  |        |  |   |  |   |  |   |   _  \    /  _____)
+//          \        |  |   _____|  |  |        |  |   |  |   |  |   |  | \  \   \_______
+//           \       |  |  |        |  |_____   |   \_/   |   |  |   |  |_/  /    _____  |
+//            \ _____|  |__|        |________|   \_______/    |__|   |______/    (_______/
+//
+//  This file is part of VirtualFluids. VirtualFluids is free software: you can
+//  redistribute it and/or modify it under the terms of the GNU General Public
+//  License as published by the Free Software Foundation, either version 3 of
+//  the License, or (at your option) any later version.
+//
+//  VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
+//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+//  for more details.
+//
+//  You should have received a copy of the GNU General Public License along
+//  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
+//
+//! \file TwoDistributionsFullDirectConnector.cpp
+//! \ingroup Connectors
+//! \author Konstantin Kutscher
+//=======================================================================================
+
+#include "TwoDistributionsFullDirectConnector.h"
 #include "LBMKernel.h"
 #include "D3Q27EsoTwist3DSplittedVector.h"
 #include "DataSet3D.h"
@@ -7,14 +40,14 @@
 
 using namespace std;
 
-ThixotropyFullDirectConnector::ThixotropyFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir)
+TwoDistributionsFullDirectConnector::TwoDistributionsFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir)
 	: LocalBlock3DConnector(from, to, sendDir)
 
 {
 
 }
 //////////////////////////////////////////////////////////////////////////
-void ThixotropyFullDirectConnector::init()
+void TwoDistributionsFullDirectConnector::init()
 {
 	maxX1 = (int)this->from.lock()->getKernel()->getDataSet()->getFdistributions()->getNX1() - 1;
 	maxX2 = (int)this->from.lock()->getKernel()->getDataSet()->getFdistributions()->getNX2() - 1;
@@ -24,31 +57,9 @@ void ThixotropyFullDirectConnector::init()
 	fTo = dynamicPointerCast<EsoTwist3D>(to.lock()->getKernel()->getDataSet()->getFdistributions());
 	hFrom = dynamicPointerCast<EsoTwist3D>(from.lock()->getKernel()->getDataSet()->getHdistributions());
 	hTo = dynamicPointerCast<EsoTwist3D>(to.lock()->getKernel()->getDataSet()->getHdistributions());
-
-	//celltypematrixFrom = from.lock()->getKernel()->getBCProcessor()->getCellsTypeArray();
-	//fillVolumeMatrixFrom = from.lock()->getKernel()->getBCProcessor()->getFillVolumeArray();
-	//normalMatrixFrom = from.lock()->getKernel()->getBCProcessor()->getNormalArray();
-	//changeInConcMatrixFrom = from.lock()->getKernel()->getBCProcessor()->getChangeInConcentrationArray();
-	//deltaVolumeMatrixFrom = from.lock()->getKernel()->getBCProcessor()->getChangeInVolumeArray();
-
-	//celltypematrixTo = to.lock()->getKernel()->getBCProcessor()->getCellsTypeArray();
-	//fillVolumeMatrixTo = to.lock()->getKernel()->getBCProcessor()->getFillVolumeArray();
-	//normalMatrixTo = to.lock()->getKernel()->getBCProcessor()->getNormalArray();
-	//changeInConcMatrixTo = to.lock()->getKernel()->getBCProcessor()->getChangeInConcentrationArray();
-	//deltaVolumeMatrixTo = to.lock()->getKernel()->getBCProcessor()->getChangeInVolumeArray();
-
-	//bcArrayFrom = from.lock()->getKernel()->getBCProcessor()->getBCArray();
-	//bcArrayTo = to.lock()->getKernel()->getBCProcessor()->getBCArray();
-
-	//bcArrayReactiveFrom = from.lock()->getKernel()->getBCProcessor()->getBCArrayReactive();
-	//bcArrayReactiveTo = to.lock()->getKernel()->getBCProcessor()->getBCArrayReactive();
-
-	// 	maxX1 = (int)this->from.lock()->getKernel()->getBCProcessor()->getCellsTypeArray()->getNX1()/* - 1*/;
-	// 	maxX2 = (int)this->from.lock()->getKernel()->getBCProcessor()->getCellsTypeArray()->getNX2()/* - 1*/;
-	// 	maxX3 = (int)this->from.lock()->getKernel()->getBCProcessor()->getCellsTypeArray()->getNX3()/* - 1*/;
 }
 //////////////////////////////////////////////////////////////////////////
-void ThixotropyFullDirectConnector::sendVectors()
+void TwoDistributionsFullDirectConnector::sendVectors()
 {
 	localDistributionsFromf = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getLocalDistributions();
 	nonLocalDistributionsFromf = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getNonLocalDistributions();
@@ -66,8 +77,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 	nonLocalDistributionsToh = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->hTo)->getNonLocalDistributions();
 	zeroDistributionsToh = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->hTo)->getZeroDistributions();
 
-	//bool con = /*(from.lock()->getGlobalID()==11) &&*/ (to.lock()->getGlobalID() == 1);
-
 	//EAST
 	if (sendDir == D3Q27System::E)
 	{
@@ -76,7 +85,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x2 = 1; x2 < maxX2; x2++)
 			{
 				exchangeData(maxX1 - 1, x2, x3, 0, x2, x3);
-				//exchangeDataforCells(maxX1 - 1, x2, x3, 0, x2, x3);
 			}
 		}
 	}
@@ -88,7 +96,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x2 = 1; x2 < maxX2; x2++)
 			{
 				exchangeData(1, x2, x3, maxX1, x2, x3);
-				//exchangeDataforCells(1, x2, x3, maxX1, x2, x3);
 			}
 		}
 	}
@@ -100,7 +107,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x1 = 1; x1 < maxX1; x1++)
 			{
 				exchangeData(x1, maxX2 - 1, x3, x1, 0, x3);
-				//exchangeDataforCells(x1, maxX2 - 1, x3, x1, 0, x3);
 			}
 		}
 	}
@@ -112,7 +118,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x1 = 1; x1 < maxX1; x1++)
 			{
 				exchangeData(x1, 1, x3, x1, maxX2, x3);
-				//exchangeDataforCells(x1, 1, x3, x1, maxX2, x3);
 			}
 		}
 	}
@@ -125,7 +130,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x1 = 1; x1 < maxX1; x1++)
 			{
 				exchangeData(x1, x2, maxX3 - 1, x1, x2, 0);
-				//exchangeDataforCells(x1, x2, maxX3 - 1, x1, x2, 0);
 			}
 		}
 	}
@@ -137,7 +141,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 			for (int x1 = 1; x1 < maxX1; x1++)
 			{
 				exchangeData(x1, x2, 1, x1, x2, maxX3);
-				//exchangeDataforCells(x1, x2, 1, x1, x2, maxX3);
 			}
 		}
 	}
@@ -147,8 +150,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 		for (int x3 = 1; x3 < maxX3; x3++)
 		{
 			exchangeData(maxX1 - 1, maxX2 - 1, x3, 0, 0, x3);
-			//exchangeDataforCells(maxX1 - 1, maxX2 - 1, x3, 0, 0, x3);
-
 		}
 	}
 	//NORTHWEST
@@ -157,7 +158,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 		for (int x3 = 1; x3 < maxX3; x3++)
 		{
 			exchangeData(1, maxX2 - 1, x3, maxX1, 0, x3);
-			//exchangeDataforCells(1, maxX2 - 1, x3, maxX1, 0, x3);
 		}
 	}
 	//SOUTHWEST
@@ -166,8 +166,6 @@ void ThixotropyFullDirectConnector::sendVectors()
 		for (int x3 = 1; x3 < maxX3; x3++)
 		{
 			exchangeData(1, 1, x3, maxX1, maxX2, x3);
-			//exchangeDataforCells(1, 1, x3, maxX1, maxX2, x3);
-
 		}
 	}
 	//SOUTHEAST
@@ -176,115 +174,81 @@ void ThixotropyFullDirectConnector::sendVectors()
 		for (int x3 = 1; x3 < maxX3; x3++)
 		{
 			exchangeData(maxX1 - 1, 1, x3, 0, maxX2, x3);
-			//exchangeDataforCells(maxX1 - 1, 1, x3, 0, maxX2, x3);
-
 		}
 	}
 	else if (sendDir == D3Q27System::TE)
 		for (int x2 = 1; x2 < maxX2; x2++)
 		{
 			exchangeData(maxX1 - 1, x2, maxX3 - 1, 0, x2, 0);
-			//exchangeDataforCells(maxX1 - 1, x2, maxX3 - 1, 0, x2, 0);
-
 		}
 	else if (sendDir == D3Q27System::BW)
 		for (int x2 = 1; x2 < maxX2; x2++)
 		{
 			exchangeData(1, x2, 1, maxX1, x2, maxX3);
-			//exchangeDataforCells(1, x2, 1, maxX1, x2, maxX3);
-
 		}
 	else if (sendDir == D3Q27System::BE)
 		for (int x2 = 1; x2 < maxX2; x2++)
 		{
 			exchangeData(maxX1 - 1, x2, 1, 0, x2, maxX3);
-			//exchangeDataforCells(maxX1 - 1, x2, 1, 0, x2, maxX3);
-
 		}
 	else if (sendDir == D3Q27System::TW)
 		for (int x2 = 1; x2 < maxX2; x2++)
 		{
 			exchangeData(1, x2, maxX3 - 1, maxX1, x2, 0);
-			//exchangeDataforCells(1, x2, maxX3 - 1, maxX1, x2, 0);
-
 		}
 	else if (sendDir == D3Q27System::TN)
 		for (int x1 = 1; x1 < maxX1; x1++)
 		{
 			exchangeData(x1, maxX2 - 1, maxX3 - 1, x1, 0, 0);
-			//exchangeDataforCells(x1, maxX2 - 1, maxX3 - 1, x1, 0, 0);
-
 		}
 	else if (sendDir == D3Q27System::BS)
 		for (int x1 = 1; x1 < maxX1; x1++)
 		{
 			exchangeData(x1, 1, 1, x1, maxX2, maxX3);
-			//exchangeDataforCells(x1, 1, 1, x1, maxX2, maxX3);
-
 		}
 	else if (sendDir == D3Q27System::BN)
 		for (int x1 = 1; x1 < maxX1; x1++)
 		{
 			exchangeData(x1, maxX2 - 1, 1, x1, 0, maxX3);
-			//exchangeDataforCells(x1, maxX2 - 1, 1, x1, 0, maxX3);
-
 		}
 
 	else if (sendDir == D3Q27System::TS)
 		for (int x1 = 1; x1 < maxX1; x1++)
 		{
 			exchangeData(x1, 1, maxX3 - 1, x1, maxX2, 0);
-			//exchangeDataforCells(x1, 1, maxX3 - 1, x1, maxX2, 0);
-
 		}
 
 	else if (sendDir == D3Q27System::TSW)
 	{
 		exchangeData(1, 1, maxX3 - 1, maxX1, maxX2, 0);
-		//exchangeDataforCells(1, 1, maxX3 - 1, maxX1, maxX2, 0);
-
 	}
 	else if (sendDir == D3Q27System::TSE)
 	{
 		exchangeData(maxX1 - 1, 1, maxX3 - 1, 0, maxX2, 0);
-		//exchangeDataforCells(maxX1 - 1, 1, maxX3 - 1, 0, maxX2, 0);
-
 	}
 	else if (sendDir == D3Q27System::TNW)
 	{
 		exchangeData(1, maxX2 - 1, maxX3 - 1, maxX1, 0, 0);
-		//exchangeDataforCells(1, maxX2 - 1, maxX3 - 1, maxX1, 0, 0);
-
 	}
 	else if (sendDir == D3Q27System::TNE)
 	{
 		exchangeData(maxX1 - 1, maxX2 - 1, maxX3 - 1, 0, 0, 0);
-		//exchangeDataforCells(maxX1 - 1, maxX2 - 1, maxX3 - 1, 0, 0, 0);
-
 	}
 	else if (sendDir == D3Q27System::BSW)
 	{
 		exchangeData(1, 1, 1, maxX1, maxX2, maxX3);
-		//exchangeDataforCells(1, 1, 1, maxX1, maxX2, maxX3);
-
 	}
 	else if (sendDir == D3Q27System::BSE)
 	{
 		exchangeData(maxX1 - 1, 1, 1, 0, maxX2, maxX3);
-		//exchangeDataforCells(maxX1 - 1, 1, 1, 0, maxX2, maxX3);
-
 	}
 	else if (sendDir == D3Q27System::BNW)
 	{
 		exchangeData(1, maxX2 - 1, 1, maxX1, 0, maxX3);
-		//exchangeDataforCells(1, maxX2 - 1, 1, maxX1, 0, maxX3);
-
 	}
 	else if (sendDir == D3Q27System::BNE)
 	{
 		exchangeData(maxX1 - 1, maxX2 - 1, 1, 0, 0, maxX3);
-		//exchangeDataforCells(maxX1 - 1, maxX2 - 1, 1, 0, 0, maxX3);
-
 	}
 	else UB_THROW(UbException(UB_EXARGS, "unknown dir"));
 }
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.h b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.h
similarity index 67%
rename from src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.h
rename to src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.h
index 1fecd5d0a..20c8e2a75 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullDirectConnector.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullDirectConnector.h
@@ -1,12 +1,38 @@
-/**
-* @file ThixotropyFullDirectConnector.h
-* @brief Connector send and receive full distribution in shared memory
-*
-* @author Hussein Alihussein
-* @date 28.11.2018
-*/
-#ifndef ThixotropyFullDirectConnector_H
-#define ThixotropyFullDirectConnector_H
+//=======================================================================================
+// ____          ____    __    ______     __________   __      __       __        __
+// \    \       |    |  |  |  |   _   \  |___    ___| |  |    |  |     /  \      |  |
+//  \    \      |    |  |  |  |  |_)   |     |  |     |  |    |  |    /    \     |  |
+//   \    \     |    |  |  |  |   _   /      |  |     |  |    |  |   /  /\  \    |  |
+//    \    \    |    |  |  |  |  | \  \      |  |     |   \__/   |  /  ____  \   |  |____
+//     \    \   |    |  |__|  |__|  \__\     |__|      \________/  /__/    \__\  |_______|
+//      \    \  |    |   ________________________________________________________________
+//       \    \ |    |  |  ______________________________________________________________|
+//        \    \|    |  |  |         __          __     __     __     ______      _______
+//         \         |  |  |_____   |  |        |  |   |  |   |  |   |   _  \    /  _____)
+//          \        |  |   _____|  |  |        |  |   |  |   |  |   |  | \  \   \_______
+//           \       |  |  |        |  |_____   |   \_/   |   |  |   |  |_/  /    _____  |
+//            \ _____|  |__|        |________|   \_______/    |__|   |______/    (_______/
+//
+//  This file is part of VirtualFluids. VirtualFluids is free software: you can
+//  redistribute it and/or modify it under the terms of the GNU General Public
+//  License as published by the Free Software Foundation, either version 3 of
+//  the License, or (at your option) any later version.
+//
+//  VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
+//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+//  for more details.
+//
+//  You should have received a copy of the GNU General Public License along
+//  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
+//
+//! \file TwoDistributionsFullDirectConnector.h
+//! \ingroup Connectors
+//! \author Konstantin Kutscher
+//=======================================================================================
+
+#ifndef TwoDistributionsFullDirectConnector_H
+#define TwoDistributionsFullDirectConnector_H
 
 #include "LocalBlock3DConnector.h"
 #include "Block3D.h"
@@ -19,38 +45,22 @@ class EsoTwist3D;
 
 //! \brief   Exchange data between blocks. 
 //! \details Connector send and receive full distributions between two blocks in shared memory.
-//! \author  Hussein Alihussein
 
-class ThixotropyFullDirectConnector : public LocalBlock3DConnector
+class TwoDistributionsFullDirectConnector : public LocalBlock3DConnector
 {
 public:
-	ThixotropyFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir);
+	TwoDistributionsFullDirectConnector(SPtr<Block3D> from, SPtr<Block3D> to, int sendDir);
 	void init();
 	void sendVectors();
 	//void sendCellVectors();
 
 protected:
 	inline void exchangeData(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To);
-	//inline void exchangeDataforCells(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To);
-	//void ExchangeDatabcArray(SPtr<BCArray3D> bcArrayFrom, SPtr<BCArray3D> bcArrayTo, int x1From, int x2From, int x3From, int x1To, int x2To, int x3To);
-	//void ExchangeDatabcArrayReactive(BCArray3DReactivePtr bcArrayFrom, BCArray3DReactivePtr bcArrayTo, int x1From, int x2From, int x3From, int x1To, int x2To, int x3To);
 private:
 	int maxX1;
 	int maxX2;
 	int maxX3;
 
-	//CbArray3D<int>::CbArray3DPtr celltypematrixFrom;
-	//CbArray3D<double>::CbArray3DPtr fillVolumeMatrixFrom;
-	//CbArray4D<LBMReal, IndexerX4X3X2X1>::CbArray4DPtr normalMatrixFrom;
-	//CbArray3D<double>::CbArray3DPtr changeInConcMatrixFrom;
-	//CbArray3D<double>::CbArray3DPtr deltaVolumeMatrixFrom;
-
-	//CbArray3D<int>::CbArray3DPtr celltypematrixTo;
-	//CbArray3D<double>::CbArray3DPtr fillVolumeMatrixTo;
-	//CbArray4D<LBMReal, IndexerX4X3X2X1>::CbArray4DPtr normalMatrixTo;
-	//CbArray3D<double>::CbArray3DPtr changeInConcMatrixTo;
-	//CbArray3D<double>::CbArray3DPtr deltaVolumeMatrixTo;
-
 	CbArray4D <LBMReal, IndexerX4X3X2X1>::CbArray4DPtr localDistributionsFromf;
 	CbArray4D <LBMReal, IndexerX4X3X2X1>::CbArray4DPtr nonLocalDistributionsFromf;
 	CbArray3D <LBMReal, IndexerX3X2X1>::CbArray3DPtr   zeroDistributionsFromf;
@@ -69,17 +79,9 @@ private:
 
 	SPtr<EsoTwist3D>  fFrom, hFrom;
 	SPtr<EsoTwist3D>  fTo, hTo;
-
-	//BCArray3DPtr bcArrayFrom;
-	//BCArray3DPtr bcArrayTo;
-
-	//BCArray3DReactivePtr bcArrayReactiveFrom;
-	//BCArray3DReactivePtr bcArrayReactiveTo;
 };
-
-
 //////////////////////////////////////////////////////////////////////////
-inline void ThixotropyFullDirectConnector::exchangeData(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
+inline void TwoDistributionsFullDirectConnector::exchangeData(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
 {
 
 
@@ -144,79 +146,4 @@ inline void ThixotropyFullDirectConnector::exchangeData(int x1From, int x2From,
 
 	(*this->zeroDistributionsToh)(x1To, x2To, x3To) = (*this->zeroDistributionsFromh)(x1From, x2From, x3From);
 }
-//////////////////////////////////////////////////////////////////////////
-//inline void ThixotropyFullDirectConnector::exchangeDataforCells(int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
-//{
-//	//(*this->celltypematrixTo)( x1To, x2To, x3To) = (*this->celltypematrixFrom)( x1From, x2From, x3From);
-//
-//	(*this->celltypematrixTo)(x1To, x2To, x3To) = (*this->celltypematrixFrom)(x1From, x2From, x3From);
-//	(*this->fillVolumeMatrixTo)(x1To, x2To, x3To) = (*this->fillVolumeMatrixFrom)(x1From, x2From, x3From);
-//	(*this->changeInConcMatrixTo)(x1To, x2To, x3To) = (*this->changeInConcMatrixFrom)(x1From, x2From, x3From);
-//	(*this->deltaVolumeMatrixTo)(x1To, x2To, x3To) = (*this->deltaVolumeMatrixFrom)(x1From, x2From, x3From);
-//
-//	(*this->normalMatrixTo)(0, x1To, x2To, x3To) = (*this->normalMatrixFrom)(0, x1From, x2From, x3From);
-//	(*this->normalMatrixTo)(1, x1To, x2To, x3To) = (*this->normalMatrixFrom)(1, x1From, x2From, x3From);
-//	(*this->normalMatrixTo)(2, x1To, x2To, x3To) = (*this->normalMatrixFrom)(2, x1From, x2From, x3From);
-//	//bcArrayTo->bcindexmatrix(x1To, x2To, x3To) = bcArrayFrom->bcindexmatrix(x1From, x2From, x3From);
-//	ExchangeDatabcArray(bcArrayFrom, bcArrayTo, x1From, x2From, x3From, x1To, x2To, x3To);
-//	ExchangeDatabcArrayReactive(bcArrayReactiveFrom, bcArrayReactiveTo, x1From, x2From, x3From, x1To, x2To, x3To);
-//}
-////////////////////////////////////////////////////////////////////////////
-//inline void ThixotropyFullDirectConnector::ExchangeDatabcArray(BCArray3DPtr bcArrayFrom, BCArray3DPtr bcArrayTo, int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
-//{
-//	if (bcArrayFrom->isFluid(x1From, x2From, x3From))
-//	{
-//		if (bcArrayFrom->hasBC(x1From, x2From, x3From))
-//		{
-//			BoundaryConditionsPtr bc = bcArrayFrom->getBC(x1From, x2From, x3From);
-//
-//			bcArrayTo->setBC(x1To, x2To, x3To, bc);
-//
-//		}
-//		else if (bcArrayFrom->isFluidWithoutBC(x1From, x2From, x3From))
-//		{
-//			bcArrayTo->setFluid(x1To, x2To, x3To);
-//		}
-//	}
-//	else if (bcArrayFrom->isSolid(x1From, x2From, x3From))
-//	{
-//		bcArrayTo->setSolid(x1To, x2To, x3To);
-//	}
-//	else
-//	{
-//		bcArrayTo->setUndefined(x1To, x2To, x3To);
-//	}
-//
-//}
-////////////////////////////////////////////////////////////////////////////
-//inline void ThixotropyFullDirectConnector::ExchangeDatabcArrayReactive(BCArray3DReactivePtr bcArrayFrom, BCArray3DReactivePtr bcArrayTo, int x1From, int x2From, int x3From, int x1To, int x2To, int x3To)
-//{
-//	if (bcArrayFrom->isFluid(x1From, x2From, x3From))
-//	{
-//		if (bcArrayFrom->hasBC(x1From, x2From, x3From))
-//		{
-//			BoundaryConditionsPtr bc = bcArrayFrom->getBC(x1From, x2From, x3From);
-//
-//			bcArrayTo->setBC(x1To, x2To, x3To, bc);
-//
-//		}
-//		else if (bcArrayFrom->isFluidWithoutBC(x1From, x2From, x3From))
-//		{
-//			bcArrayTo->setFluid(x1To, x2To, x3To);
-//		}
-//	}
-//	else if (bcArrayFrom->isSolid(x1From, x2From, x3From))
-//	{
-//		bcArrayTo->setSolid(x1To, x2To, x3To);
-//	}
-//	else if (bcArrayFrom->isReactiveSolid(x1From, x2From, x3From))
-//	{
-//		bcArrayTo->setReactiveSolidType1(x1To, x2To, x3To);
-//	}
-//	else
-//	{
-//		bcArrayTo->setUndefined(x1To, x2To, x3To);
-//	}
-//
-//}
 #endif
\ No newline at end of file
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
similarity index 84%
rename from src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.cpp
rename to src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
index 9d4cb41aa..c34462be0 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.cpp
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.cpp
@@ -1,4 +1,37 @@
-#include "ThixotropyFullVectorConnector.h"
+//=======================================================================================
+// ____          ____    __    ______     __________   __      __       __        __
+// \    \       |    |  |  |  |   _   \  |___    ___| |  |    |  |     /  \      |  |
+//  \    \      |    |  |  |  |  |_)   |     |  |     |  |    |  |    /    \     |  |
+//   \    \     |    |  |  |  |   _   /      |  |     |  |    |  |   /  /\  \    |  |
+//    \    \    |    |  |  |  |  | \  \      |  |     |   \__/   |  /  ____  \   |  |____
+//     \    \   |    |  |__|  |__|  \__\     |__|      \________/  /__/    \__\  |_______|
+//      \    \  |    |   ________________________________________________________________
+//       \    \ |    |  |  ______________________________________________________________|
+//        \    \|    |  |  |         __          __     __     __     ______      _______
+//         \         |  |  |_____   |  |        |  |   |  |   |  |   |   _  \    /  _____)
+//          \        |  |   _____|  |  |        |  |   |  |   |  |   |  | \  \   \_______
+//           \       |  |  |        |  |_____   |   \_/   |   |  |   |  |_/  /    _____  |
+//            \ _____|  |__|        |________|   \_______/    |__|   |______/    (_______/
+//
+//  This file is part of VirtualFluids. VirtualFluids is free software: you can
+//  redistribute it and/or modify it under the terms of the GNU General Public
+//  License as published by the Free Software Foundation, either version 3 of
+//  the License, or (at your option) any later version.
+//
+//  VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
+//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+//  for more details.
+//
+//  You should have received a copy of the GNU General Public License along
+//  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
+//
+//! \file TwoDistributionsFullVectorConnector.cpp
+//! \ingroup Connectors
+//! \author Konstantin Kutscher
+//=======================================================================================
+
+#include "TwoDistributionsFullVectorConnector.h"
 #include "D3Q27EsoTwist3DSplittedVector.h"
 #include "LBMKernel.h"
 #include "Block3D.h"
@@ -7,7 +40,7 @@
 #include "DataSet3D.h"
 
 //////////////////////////////////////////////////////////////////////////
-ThixotropyFullVectorConnector::ThixotropyFullVectorConnector(SPtr<Block3D> block
+TwoDistributionsFullVectorConnector::TwoDistributionsFullVectorConnector(SPtr<Block3D> block
    , VectorTransmitterPtr sender
    , VectorTransmitterPtr receiver
    , int sendDir)
@@ -18,7 +51,7 @@ ThixotropyFullVectorConnector::ThixotropyFullVectorConnector(SPtr<Block3D> block
 
 }
 //////////////////////////////////////////////////////////////////////////
-void ThixotropyFullVectorConnector::init()
+void TwoDistributionsFullVectorConnector::init()
 {
    maxX1 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX1() - 1;
    maxX2 = (int)block.lock()->getKernel()->getDataSet()->getFdistributions()->getNX2() - 1;
@@ -66,7 +99,7 @@ void ThixotropyFullVectorConnector::init()
    }
 }
 //////////////////////////////////////////////////////////////////////////
-void ThixotropyFullVectorConnector::fillSendVectors()
+void TwoDistributionsFullVectorConnector::fillSendVectors()
 {
    localDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fDis)->getLocalDistributions();
    nonLocalDistributions = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fDis)->getNonLocalDistributions();
@@ -257,7 +290,7 @@ void ThixotropyFullVectorConnector::fillSendVectors()
    else UB_THROW(UbException(UB_EXARGS, "unknown dir"));
 }
 ////////////////////////////////////////////////////////////////////////
-void ThixotropyFullVectorConnector::distributeReceiveVectors()
+void TwoDistributionsFullVectorConnector::distributeReceiveVectors()
 {
    /*e.g. connector sendet nach EAST --> empfaengt daten aus WEST ;-)*/
 
diff --git a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.h b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.h
similarity index 80%
rename from src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.h
rename to src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.h
index 0b2bd66b9..27093e04e 100644
--- a/src/cpu/VirtualFluidsCore/Connectors/ThixotropyFullVectorConnector.h
+++ b/src/cpu/VirtualFluidsCore/Connectors/TwoDistributionsFullVectorConnector.h
@@ -1,5 +1,38 @@
-#ifndef ThixotropyFullVectorConnector_H
-#define ThixotropyFullVectorConnector_H
+//=======================================================================================
+// ____          ____    __    ______     __________   __      __       __        __
+// \    \       |    |  |  |  |   _   \  |___    ___| |  |    |  |     /  \      |  |
+//  \    \      |    |  |  |  |  |_)   |     |  |     |  |    |  |    /    \     |  |
+//   \    \     |    |  |  |  |   _   /      |  |     |  |    |  |   /  /\  \    |  |
+//    \    \    |    |  |  |  |  | \  \      |  |     |   \__/   |  /  ____  \   |  |____
+//     \    \   |    |  |__|  |__|  \__\     |__|      \________/  /__/    \__\  |_______|
+//      \    \  |    |   ________________________________________________________________
+//       \    \ |    |  |  ______________________________________________________________|
+//        \    \|    |  |  |         __          __     __     __     ______      _______
+//         \         |  |  |_____   |  |        |  |   |  |   |  |   |   _  \    /  _____)
+//          \        |  |   _____|  |  |        |  |   |  |   |  |   |  | \  \   \_______
+//           \       |  |  |        |  |_____   |   \_/   |   |  |   |  |_/  /    _____  |
+//            \ _____|  |__|        |________|   \_______/    |__|   |______/    (_______/
+//
+//  This file is part of VirtualFluids. VirtualFluids is free software: you can
+//  redistribute it and/or modify it under the terms of the GNU General Public
+//  License as published by the Free Software Foundation, either version 3 of
+//  the License, or (at your option) any later version.
+//
+//  VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
+//  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+//  for more details.
+//
+//  You should have received a copy of the GNU General Public License along
+//  with VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
+//
+//! \file TwoDistributionsFullVectorConnector.h
+//! \ingroup Connectors
+//! \author Konstantin Kutscher
+//=======================================================================================
+
+#ifndef TwoDistributionsFullVectorConnector_H
+#define TwoDistributionsFullVectorConnector_H
 
 #include <vector>
 
@@ -18,10 +51,10 @@ class Block3D;
 //der vector wird via transmitter uebertragen
 //transmitter kann ein lokal, MPI, RCG, CTL oder was auch immer fuer ein
 //transmitter sein, der von Transmitter abgeleitet ist ;-)
-class ThixotropyFullVectorConnector : public RemoteBlock3DConnector
+class TwoDistributionsFullVectorConnector : public RemoteBlock3DConnector
 {
 public:
-   ThixotropyFullVectorConnector(SPtr<Block3D> block
+   TwoDistributionsFullVectorConnector(SPtr<Block3D> block
       , VectorTransmitterPtr sender
       , VectorTransmitterPtr receiver
       , int sendDir);
@@ -55,7 +88,7 @@ private:
 };
 
 //////////////////////////////////////////////////////////////////////////
-inline void ThixotropyFullVectorConnector::fillData(vector_type& sdata, int& index, int x1, int x2, int x3)
+inline void TwoDistributionsFullVectorConnector::fillData(vector_type& sdata, int& index, int x1, int x2, int x3)
 {
    sdata[index++] = (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3);
    sdata[index++] = (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3);
@@ -120,7 +153,7 @@ inline void ThixotropyFullVectorConnector::fillData(vector_type& sdata, int& ind
 
 }
 //////////////////////////////////////////////////////////////////////////
-inline void ThixotropyFullVectorConnector::distributeData(vector_type& rdata, int& index, int x1, int x2, int x3)
+inline void TwoDistributionsFullVectorConnector::distributeData(vector_type& rdata, int& index, int x1, int x2, int x3)
 {
    (*this->localDistributions)(D3Q27System::ET_E, x1, x2, x3) = rdata[index++];
    (*this->localDistributions)(D3Q27System::ET_N, x1, x2, x3) = rdata[index++];
diff --git a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.cpp b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.cpp
index c5a2bdebc..9d63bdbd2 100644
--- a/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.cpp
+++ b/src/cpu/VirtualFluidsCore/Visitors/SetConnectorsBlockVisitor.cpp
@@ -36,8 +36,8 @@
 #include "D3Q27ETFullVectorConnector.h"
 #include "D3Q27ETCFOffVectorConnector.h"
 #include "D3Q27ETFCOffVectorConnector.h"
-#include "ThixotropyFullDirectConnector.h"
-#include "ThixotropyFullVectorConnector.h"
+#include "TwoDistributionsFullDirectConnector.h"
+#include "TwoDistributionsFullVectorConnector.h"
 #include "Grid3DSystem.h"
 #include <basics/transmitter/TbTransmitterLocal.h>
 
@@ -100,8 +100,8 @@ void SetConnectorsBlockVisitor::setSameLevelConnectors(SPtr<Grid3D> grid, SPtr<B
 				if(blockRank == neighBlockRank && neighBlock->isActive())
 				{
 					SPtr<Block3DConnector> connector;
-               connector = SPtr<Block3DConnector>(new D3Q27ETFullDirectConnector( block, neighBlock, dir));
-					//connector = SPtr<Block3DConnector>(new ThixotropyFullDirectConnector( block, neighBlock, dir));
+                    //connector = SPtr<Block3DConnector>(new D3Q27ETFullDirectConnector( block, neighBlock, dir));
+					connector = SPtr<Block3DConnector>(new TwoDistributionsFullDirectConnector( block, neighBlock, dir));
 					block->setConnector(connector);
 				}
 				else if(blockRank != neighBlockRank && neighBlock->isActive())
@@ -134,8 +134,8 @@ void SetConnectorsBlockVisitor::setRemoteConnectors(SPtr<Block3D> sblock, SPtr<B
 
 
 	SPtr<Block3DConnector> connector;
-	connector = SPtr<Block3DConnector>(new D3Q27ETFullVectorConnector(sblock, sender, receiver, dir));
-	//connector = SPtr<Block3DConnector>(new ThixotropyFullVectorConnector(sblock, sender, receiver, dir));
+	//connector = SPtr<Block3DConnector>(new D3Q27ETFullVectorConnector(sblock, sender, receiver, dir));
+	connector = SPtr<Block3DConnector>(new TwoDistributionsFullVectorConnector(sblock, sender, receiver, dir));
 	sblock->setConnector(connector);
    UBLOG(logDEBUG5, "D3Q27SetConnectorsBlockVisitor::setRemoteConnectors() - end");
 }
-- 
GitLab