diff --git a/src/gpu/core/PreProcessor/PreProcessorFactory/PreProcessorFactoryImp.cpp b/src/gpu/core/PreProcessor/PreProcessorFactory/PreProcessorFactoryImp.cpp index c8b620ebb80a8f07dbabf3f470df366f5dc65c16..10fdf377bfb738f48d8083d40aedb6db6e2f627e 100644 --- a/src/gpu/core/PreProcessor/PreProcessorFactory/PreProcessorFactoryImp.cpp +++ b/src/gpu/core/PreProcessor/PreProcessorFactory/PreProcessorFactoryImp.cpp @@ -35,7 +35,6 @@ #include "PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionCompressible/InitAdvectionDiffusionCompressible.h" #include "PreProcessor/PreProcessorStrategy/InitNavierStokesCompressible/InitNavierStokesCompressible.h" #include "PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressible/InitAdvectionDiffusionIncompressible.h" -#include "PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.h" #include "PreProcessor/PreProcessorStrategy/InitNavierStokesIncompressible/InitNavierStokesIncompressible.h" @@ -59,9 +58,6 @@ std::shared_ptr<PreProcessorStrategy> PreProcessorFactoryImp::makePreProcessorSt case InitNavierStokesCompressible: return InitNavierStokesCompressible::getNewInstance(para); break; - case InitAdvectionDiffusionIncompressibleD3Q7: - return InitAdvectionDiffusionIncompressibleD3Q7::getNewInstance(para); - break; case InitAdvectionDiffusionIncompressible: return InitAdvectionDiffusionIncompressible::getNewInstance(para); break; diff --git a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.cu b/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.cu deleted file mode 100644 index 94d7da3bcdc6296bfaaa03c5ce81508c5c3c53e2..0000000000000000000000000000000000000000 --- a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.cu +++ /dev/null @@ -1,73 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// 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/>. -// -//! \author Martin Schoenherr -//======================================================================================= -#include "InitAdvectionDiffusionIncompressibleD3Q7.h" - -#include "InitAdvectionDiffusionIncompressibleD3Q7_Device.cuh" -#include "Parameter/Parameter.h" -#include <cuda_helper/CudaGrid.h> - -std::shared_ptr<PreProcessorStrategy> InitAdvectionDiffusionIncompressibleD3Q7::getNewInstance(std::shared_ptr<Parameter> para) -{ - return std::shared_ptr<PreProcessorStrategy>(new InitAdvectionDiffusionIncompressibleD3Q7(para)); -} - -void InitAdvectionDiffusionIncompressibleD3Q7::init(int level) -{ - vf::cuda::CudaGrid grid = vf::cuda::CudaGrid(para->getParD(level)->numberofthreads, para->getParD(level)->numberOfNodes); - - InitAdvectionDiffusionIncompressibleD3Q7_Device <<< grid.grid, grid.threads >>>( - para->getParD(level)->neighborX, - para->getParD(level)->neighborY, - para->getParD(level)->neighborZ, - para->getParD(level)->typeOfGridNode, - para->getParD(level)->concentration, - para->getParD(level)->velocityX, - para->getParD(level)->velocityY, - para->getParD(level)->velocityZ, - para->getParD(level)->numberOfNodes, - para->getParD(level)->distributionsAD.f[0], - para->getParD(level)->isEvenTimestep); - getLastCudaError("InitAdvectionDiffusionIncompressibleD3Q7_Device execution failed"); -} - -bool InitAdvectionDiffusionIncompressibleD3Q7::checkParameter() -{ - return false; -} - -InitAdvectionDiffusionIncompressibleD3Q7::InitAdvectionDiffusionIncompressibleD3Q7(std::shared_ptr<Parameter> para) -{ - this->para = para; -} - -InitAdvectionDiffusionIncompressibleD3Q7::InitAdvectionDiffusionIncompressibleD3Q7() -{ -} diff --git a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.h b/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.h deleted file mode 100644 index 4ece3ee7dd8c889ec373bcc08a5e47c255b7be5b..0000000000000000000000000000000000000000 --- a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7.h +++ /dev/null @@ -1,53 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// 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/>. -// -//! \author Martin Schoenherr -//======================================================================================= -#ifndef InitAdvectionDiffusionIncompressibleD3Q7_H -#define InitAdvectionDiffusionIncompressibleD3Q7_H - -#include "PreProcessor/PreProcessorStrategy/PreProcessorStrategy.h" - -#include <memory> - -class Parameter; - -class InitAdvectionDiffusionIncompressibleD3Q7 : public PreProcessorStrategy -{ -public: - static std::shared_ptr<PreProcessorStrategy> getNewInstance(std::shared_ptr< Parameter> para); - void init(int level); - bool checkParameter(); - -private: - InitAdvectionDiffusionIncompressibleD3Q7(); - InitAdvectionDiffusionIncompressibleD3Q7(std::shared_ptr< Parameter> para); - std::shared_ptr< Parameter> para; -}; - -#endif \ No newline at end of file diff --git a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cu b/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cu deleted file mode 100644 index 441e8c7adcc18d891615d0374fe5bfaa56d92652..0000000000000000000000000000000000000000 --- a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cu +++ /dev/null @@ -1,126 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// 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/>. -// -//! \author Martin Schoenherr -//======================================================================================= -#include "LBM/LB.h" -#include "lbm/constants/D3Q27.h" -#include <basics/constants/NumericConstants.h> - -using namespace vf::basics::constant; -using namespace vf::lbm::dir; -#include "math.h" - -__global__ void InitAdvectionDiffusionIncompressibleD3Q7_Device( - unsigned int* neighborX, - unsigned int* neighborY, - unsigned int* neighborZ, - unsigned int* geoD, - real* Conc, - real* ux, - real* uy, - real* uz, - unsigned int size_Mat, - real* DD7, - bool EvenOrOdd) -{ - //////////////////////////////////////////////////////////////////////////////// - const unsigned x = threadIdx.x; // Globaler x-Index - const unsigned y = blockIdx.x; // Globaler y-Index - const unsigned z = blockIdx.y; // Globaler z-Index - - const unsigned nx = blockDim.x; - const unsigned ny = gridDim.x; - - const unsigned k = nx*(ny*z + y) + x; - ////////////////////////////////////////////////////////////////////////// - - if(k<size_Mat) - { - //////////////////////////////////////////////////////////////////////////////// - unsigned int BC; - BC = geoD[k]; - - if( BC != GEO_SOLID && BC != GEO_VOID) - { - Distributions7 D7; - if (EvenOrOdd==true) - { - D7.f[0] = &DD7[0*size_Mat]; - D7.f[1] = &DD7[1*size_Mat]; - D7.f[2] = &DD7[2*size_Mat]; - D7.f[3] = &DD7[3*size_Mat]; - D7.f[4] = &DD7[4*size_Mat]; - D7.f[5] = &DD7[5*size_Mat]; - D7.f[6] = &DD7[6*size_Mat]; - } - else - { - D7.f[0] = &DD7[0*size_Mat]; - D7.f[2] = &DD7[1*size_Mat]; - D7.f[1] = &DD7[2*size_Mat]; - D7.f[4] = &DD7[3*size_Mat]; - D7.f[3] = &DD7[4*size_Mat]; - D7.f[6] = &DD7[5*size_Mat]; - D7.f[5] = &DD7[6*size_Mat]; - } - ////////////////////////////////////////////////////////////////////////// - real ConcD = Conc[k]; - real vx1 = ux[k]; - real vx2 = uy[k]; - real vx3 = uz[k]; - real lambdaD = -c3o1 + sqrt(c3o1); - real Diffusivity = c1o20; - real Lam = -(c1o2+c1o1/lambdaD); - real nue_d = Lam/c3o1; - real ae = Diffusivity/nue_d - c1o1; - real ux_sq = vx1 * vx1; - real uy_sq = vx2 * vx2; - real uz_sq = vx3 * vx3; - ////////////////////////////////////////////////////////////////////////// - //index - ////////////////////////////////////////////////////////////////////////// - unsigned int kzero= k; - unsigned int ke = k; - unsigned int kw = neighborX[k]; - unsigned int kn = k; - unsigned int ks = neighborY[k]; - unsigned int kt = k; - unsigned int kb = neighborZ[k]; - ////////////////////////////////////////////////////////////////////////// - - (D7.f[0])[kzero] = ConcD*(c1o3*(ae*(-c3o1))-(ux_sq+uy_sq+uz_sq)); - (D7.f[1])[ke ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(ux_sq)+vx1*c1o2); - (D7.f[2])[kw ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(ux_sq)-vx1*c1o2); - (D7.f[3])[kn ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(uy_sq)+vx2*c1o2); - (D7.f[4])[ks ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(uy_sq)-vx2*c1o2); - (D7.f[5])[kt ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(uz_sq)+vx3*c1o2); - (D7.f[6])[kb ] = ConcD*(c1o6*(ae+c1o1)+c1o2*(uz_sq)-vx3*c1o2); - } - } -} \ No newline at end of file diff --git a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cuh b/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cuh deleted file mode 100644 index 3d0efb3a80edc645020226ca7fe88256a6c5097e..0000000000000000000000000000000000000000 --- a/src/gpu/core/PreProcessor/PreProcessorStrategy/InitAdvectionDiffusionIncompressibleD3Q7/InitAdvectionDiffusionIncompressibleD3Q7_Device.cuh +++ /dev/null @@ -1,50 +0,0 @@ -//======================================================================================= -// ____ ____ __ ______ __________ __ __ __ __ -// \ \ | | | | | _ \ |___ ___| | | | | / \ | | -// \ \ | | | | | |_) | | | | | | | / \ | | -// \ \ | | | | | _ / | | | | | | / /\ \ | | -// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____ -// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______| -// \ \ | | ________________________________________________________________ -// \ \ | | | ______________________________________________________________| -// \ \| | | | __ __ __ __ ______ _______ -// \ | | |_____ | | | | | | | | | _ \ / _____) -// \ | | _____| | | | | | | | | | | \ \ \_______ -// \ | | | | |_____ | \_/ | | | | |_/ / _____ | -// \ _____| |__| |________| \_______/ |__| |______/ (_______/ -// -// 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/>. -// -//! \author Martin Schoenherr -//======================================================================================= -#ifndef InitAdvectionDiffusionIncompressibleD3Q7_Device_H -#define InitAdvectionDiffusionIncompressibleD3Q7_Device_H - -#include <DataTypes.h> -#include <curand.h> - -__global__ void InitAdvectionDiffusionIncompressibleD3Q7_Device( - unsigned int* neighborX, - unsigned int* neighborY, - unsigned int* neighborZ, - unsigned int* geoD, - real* Conc, - real* ux, - real* uy, - real* uz, - unsigned int size_Mat, - real* DD7, - bool EvenOrOdd); - -#endif \ No newline at end of file diff --git a/src/gpu/core/PreProcessor/PreProcessorType.h b/src/gpu/core/PreProcessor/PreProcessorType.h index faa164cdd48f90a13dd9775ffc9c3a775e417a74..88c4f2bfb35abb19d80380035df0b6cfe6020bfa 100644 --- a/src/gpu/core/PreProcessor/PreProcessorType.h +++ b/src/gpu/core/PreProcessor/PreProcessorType.h @@ -35,7 +35,6 @@ enum PreProcessorType { InitNavierStokesIncompressible, InitNavierStokesCompressible, - InitAdvectionDiffusionIncompressibleD3Q7, InitAdvectionDiffusionIncompressible, InitAdvectionDiffusionCompressible };