diff --git a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp index 508fcbae380490ada4d4433351975c14916e5c0d..08ad53dadd8f2446cc08f946e1f5e18ee7fea013 100644 --- a/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp +++ b/src/cpu/VirtualFluidsCore/BoundaryConditions/SlipBCAlgorithm.cpp @@ -33,7 +33,7 @@ void SlipBCAlgorithm::applyBC() calcMacrosFct(f, drho, vx1, vx2, vx3); calcFeqFct(feq, drho, vx1, vx2, vx3); - UbTupleFloat3 normale = bcPtr->getNormalVector(); + UbTupleDouble3 normale = bcPtr->getNormalVector(); LBMReal amp = vx1*val<1>(normale)+vx2*val<2>(normale)+vx3*val<3>(normale); vx1 = vx1 - amp * val<1>(normale); //normale zeigt von struktur weg! diff --git a/src/cpu/VirtualFluidsCore/Connectors/Block3DConnector.h b/src/cpu/VirtualFluidsCore/Connectors/Block3DConnector.h index da0013de07d3d16a285cf5c375aeed18a2522c19..1e95c026ffcd72196d15d5c6af794c9c71bd8787 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/Block3DConnector.h +++ b/src/cpu/VirtualFluidsCore/Connectors/Block3DConnector.h @@ -1,9 +1,36 @@ -// _ ___ __ __________ _ __ -// | | / (_)____/ /___ ______ _/ / ____/ /_ __(_)___/ /____ -// | | / / / ___/ __/ / / / __ `/ / /_ / / / / / / __ / ___/ -// | |/ / / / / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__ ) -// |___/_/_/ \__/\__,_/\__,_/_/_/ /_/\__,_/_/\__,_/____/ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ // +// 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 Block3DConnector.h +//! \ingroup Connectors +//! \author Konstantin Kutscher +//======================================================================================= + #ifndef BLOCK2DCONNECTOR_H #define BLOCK2DCONNECTOR_H @@ -14,43 +41,27 @@ #include <PointerDefinitions.h> - +//! \brief Abstract class of connectors +//! \details Connector send and receive full distributions between two blocks in shared memory. class Block3DConnector { - //FETOL -#ifdef VF_FETOL public: - enum TransmitterType{NONE=0, MPI=1, BOND=2}; -#endif -public: - Block3DConnector() - : sendDir(-1) -#ifdef VF_FETOL - , ttype(NONE) -#endif - {} - - Block3DConnector(const int& sendDir) - : sendDir(sendDir) -#ifdef VF_FETOL - , ttype(NONE) -#endif - {} - + Block3DConnector() : sendDir(-1) {} + Block3DConnector(const int& sendDir) : sendDir(sendDir) {} virtual ~Block3DConnector() {} - + //!Iniitializes connector virtual void init()=0; - - //for synchronize the send- and receive-bufferlength + //!Synchronizes the send-buffer length virtual void sendTransmitterDataSize()=0; + //!Synchronizes the receive-buffer length virtual void receiveTransmitterDataSize()=0; - //send operations (should be called in given order!!!) + //Send (should be called in given order!!!) virtual void prepareForSend()=0; virtual void fillSendVectors()=0; virtual void sendVectors()=0; - //receive operations (should be called in given order!!!) + //Receive (should be called in given order!!!) virtual void prepareForReceive()=0; virtual void receiveVectors()=0; virtual void distributeReceiveVectors()=0; @@ -82,18 +93,8 @@ public: virtual void receiveVectorsX2() = 0; virtual void receiveVectorsX3() = 0; - //FETOL -#ifdef VF_FETOL - void setTransmitterType(TransmitterType ttype) { this->ttype=ttype;} - TransmitterType getTransmitterType() {return ttype;} -#endif - protected: int sendDir; - //FETOL -#ifdef VF_FETOL - TransmitterType ttype; -#endif }; -#endif //BLOCK2DCONNECTOR_H +#endif //BLOCK3DCONNECTOR_H diff --git a/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.cpp b/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.cpp index 19c5799933606653a82572da6c7f80d04f8f6a03..e47bee86ad69ad7dd9dca7f855eeda3275015729 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.cpp +++ b/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.cpp @@ -1,3 +1,36 @@ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// 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 D3Q27ETFullDirectConnector.cpp +//! \ingroup Connectors +//! \author Konstantin Kutscher +//======================================================================================= + #include "D3Q27ETFullDirectConnector.h" #include "LBMKernel.h" #include "D3Q27EsoTwist3DSplittedVector.h" @@ -18,19 +51,19 @@ void D3Q27ETFullDirectConnector::init() maxX2 = (int)this->from.lock()->getKernel()->getDataSet()->getFdistributions()->getNX2() - 1; maxX3 = (int)this->from.lock()->getKernel()->getDataSet()->getFdistributions()->getNX3() - 1; - fFrom = dynamicPointerCast<EsoTwist3D>(from.lock()->getKernel()->getDataSet()->getFdistributions()); - fTo = dynamicPointerCast<EsoTwist3D>(to.lock()->getKernel()->getDataSet()->getFdistributions()); + fFrom = dynamic_pointer_cast<EsoTwist3D>(from.lock()->getKernel()->getDataSet()->getFdistributions()); + fTo = dynamic_pointer_cast<EsoTwist3D>(to.lock()->getKernel()->getDataSet()->getFdistributions()); } ////////////////////////////////////////////////////////////////////////// void D3Q27ETFullDirectConnector::sendVectors() { - localDistributionsFrom = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getLocalDistributions(); - nonLocalDistributionsFrom = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getNonLocalDistributions(); - zeroDistributionsFrom = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getZeroDistributions(); + localDistributionsFrom = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getLocalDistributions(); + nonLocalDistributionsFrom = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getNonLocalDistributions(); + zeroDistributionsFrom = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fFrom)->getZeroDistributions(); - localDistributionsTo = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getLocalDistributions(); - nonLocalDistributionsTo = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getNonLocalDistributions(); - zeroDistributionsTo = dynamicPointerCast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getZeroDistributions(); + localDistributionsTo = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getLocalDistributions(); + nonLocalDistributionsTo = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getNonLocalDistributions(); + zeroDistributionsTo = dynamic_pointer_cast<D3Q27EsoTwist3DSplittedVector>(this->fTo)->getZeroDistributions(); //EAST if (sendDir == D3Q27System::E) diff --git a/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.h b/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.h index 654c7da9b7a54810b5aa5850dd2f4fd1a73ab927..1d290effc0f93348a9e4e7feaedf1e949b61cad2 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.h +++ b/src/cpu/VirtualFluidsCore/Connectors/D3Q27ETFullDirectConnector.h @@ -1,10 +1,36 @@ -/** -* @file D3Q27ETFullDirectConnector.h -* @brief Connector send and receive full distribution in shared memory -* -* @author Konstantin Kutscher -* @date 28.04.2016 -*/ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// 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 D3Q27ETFullDirectConnector.h +//! \ingroup Connectors +//! \author Konstantin Kutscher +//======================================================================================= + #ifndef D3Q27ETFULLDIRECTCONNECTOR_H #define D3Q27ETFULLDIRECTCONNECTOR_H @@ -17,8 +43,6 @@ //! \brief Exchange data between blocks. //! \details Connector send and receive full distributions between two blocks in shared memory. -//! \author Konstantin Kutscher - class D3Q27ETFullDirectConnector : public LocalBlock3DConnector { public: diff --git a/src/cpu/VirtualFluidsCore/Connectors/LocalBlock3DConnector.h b/src/cpu/VirtualFluidsCore/Connectors/LocalBlock3DConnector.h index cab9a684e68fd13d877818da8378a156a323cf02..efa1ce73e772e848928fcd322371d4ffcb1795f8 100644 --- a/src/cpu/VirtualFluidsCore/Connectors/LocalBlock3DConnector.h +++ b/src/cpu/VirtualFluidsCore/Connectors/LocalBlock3DConnector.h @@ -1,3 +1,36 @@ +//======================================================================================= +// ____ ____ __ ______ __________ __ __ __ __ +// \ \ | | | | | _ \ |___ ___| | | | | / \ | | +// \ \ | | | | | |_) | | | | | | | / \ | | +// \ \ | | | | | _ / | | | | | | / /\ \ | | +// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ +// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| +// \ \ | | ________________________________________________________________ +// \ \ | | | ______________________________________________________________| +// \ \| | | | __ __ __ __ ______ _______ +// \ | | |_____ | | | | | | | | | _ \ / _____) +// \ | | _____| | | | | | | | | | | \ \ \_______ +// \ | | | | |_____ | \_/ | | | | |_/ / _____ | +// \ _____| |__| |________| \_______/ |__| |______/ (_______/ +// +// 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 LocalBlock3DConnector.h +//! \ingroup Connectors +//! \author Konstantin Kutscher +//======================================================================================= + #ifndef LocalBlock3DConnector_H #define LocalBlock3DConnector_H @@ -5,6 +38,7 @@ #include "Block3D.h" #include "PointerDefinitions.h" +//! A class provides an interface for connectors in shared memory class LocalBlock3DConnector : public Block3DConnector { public: