diff --git a/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.cpp b/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.cpp index d82f27e20dca51426844a9d1c2be4d614e4fc447..6d2b06544e3c1e1fc8c60e76e6684af2b622ac3f 100644 --- a/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.cpp +++ b/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.cpp @@ -40,53 +40,53 @@ void LBKernelManager::runLBMKernel(SPtr<Parameter> para) { if (para->getIsADcalculationOn()) { - CumulantK17LBMDeviceKernelAD( - para->getParD()->numberofthreads, - para->getParD()->omega, - para->getParD()->typeOfGridNode, - para->getParD()->neighborX, - para->getParD()->neighborY, - para->getParD()->neighborZ, - para->getParD()->distributions.f[0], - para->getParD()->distributionsAD.f[0], - para->getParD()->numberOfNodes, - para->getParD()->forcing, - para->getParD()->isEvenTimestep); + CumulantK17LBMDeviceKernelAD( + para->getParD()->numberofthreads, + para->getParD()->omega, + para->getParD()->typeOfGridNode, + para->getParD()->neighborX, + para->getParD()->neighborY, + para->getParD()->neighborZ, + para->getParD()->distributions.f[0], + para->getParD()->distributionsAD.f[0], + para->getParD()->numberOfNodes, + para->getParD()->forcing, + para->getParD()->isEvenTimestep); } else { - CumulantK17LBMDeviceKernel( - para->getParD()->numberofthreads, - para->getParD()->omega, - para->getParD()->typeOfGridNode, - para->getParD()->neighborX, - para->getParD()->neighborY, - para->getParD()->neighborZ, - para->getParD()->distributions.f[0], - para->getParD()->numberOfNodes, - para->getParD()->forcing, - para->getParD()->isEvenTimestep); - } + CumulantK17LBMDeviceKernel( + para->getParD()->numberofthreads, + para->getParD()->omega, + para->getParD()->typeOfGridNode, + para->getParD()->neighborX, + para->getParD()->neighborY, + para->getParD()->neighborZ, + para->getParD()->distributions.f[0], + para->getParD()->numberOfNodes, + para->getParD()->forcing, + para->getParD()->isEvenTimestep); + } } void LBKernelManager::runVelocityBCKernel(SPtr<Parameter> para) { - if (para->getParD()->numberOfVeloBCnodes > 0) - { - QVelDevicePlainBB27( - para->getParD()->numberofthreads, - para->getParD()->veloBC.Vx, - para->getParD()->veloBC.Vy, - para->getParD()->veloBC.Vz, - para->getParD()->distributions.f[0], - para->getParD()->veloBC.k, - para->getParD()->veloBC.q27[0], - para->getParD()->numberOfVeloBCnodes, - para->getParD()->veloBC.kArray, - para->getParD()->neighborX, - para->getParD()->neighborY, - para->getParD()->neighborZ, - para->getParD()->numberOfNodes, - para->getParD()->isEvenTimestep); - } + if (para->getParD()->numberOfVeloBCnodes > 0) + { + QVelDevicePlainBB27( + para->getParD()->numberofthreads, + para->getParD()->veloBC.Vx, + para->getParD()->veloBC.Vy, + para->getParD()->veloBC.Vz, + para->getParD()->distributions.f[0], + para->getParD()->veloBC.k, + para->getParD()->veloBC.q27[0], + para->getParD()->numberOfVeloBCnodes, + para->getParD()->veloBC.kArray, + para->getParD()->neighborX, + para->getParD()->neighborY, + para->getParD()->neighborZ, + para->getParD()->numberOfNodes, + para->getParD()->isEvenTimestep); + } } void LBKernelManager::runGeoBCKernel(SPtr<Parameter> para) @@ -100,38 +100,38 @@ void LBKernelManager::runGeoBCKernel(SPtr<Parameter> para) void LBKernelManager::calculateMacroscopicValues(SPtr<Parameter> para) { if (para->getIsADcalculationOn()) { - CalcMacADCompSP27( - para->getParD()->velocityX, - para->getParD()->velocityY, - para->getParD()->velocityZ, - para->getParD()->rho, - para->getParD()->pressure, - para->getParD()->typeOfGridNode, - para->getParD()->neighborX, - para->getParD()->neighborY, - para->getParD()->neighborZ, - para->getParD()->numberOfNodes, - para->getParD()->numberofthreads, - para->getParD()->distributions.f[0], - para->getParD()->distributionsAD.f[0], + CalcMacADCompSP27( + para->getParD()->velocityX, + para->getParD()->velocityY, + para->getParD()->velocityZ, + para->getParD()->rho, + para->getParD()->pressure, + para->getParD()->typeOfGridNode, + para->getParD()->neighborX, + para->getParD()->neighborY, + para->getParD()->neighborZ, + para->getParD()->numberOfNodes, + para->getParD()->numberofthreads, + para->getParD()->distributions.f[0], + para->getParD()->distributionsAD.f[0], para->getParD()->forcing, - para->getParD()->isEvenTimestep); + para->getParD()->isEvenTimestep); } else { - CalcMacCompSP27( - para->getParD()->velocityX, - para->getParD()->velocityY, - para->getParD()->velocityZ, - para->getParD()->rho, - para->getParD()->pressure, - para->getParD()->typeOfGridNode, - para->getParD()->neighborX, - para->getParD()->neighborY, - para->getParD()->neighborZ, - para->getParD()->numberOfNodes, - para->getParD()->numberofthreads, - para->getParD()->distributions.f[0], - para->getParD()->isEvenTimestep); - } + CalcMacCompSP27( + para->getParD()->velocityX, + para->getParD()->velocityY, + para->getParD()->velocityZ, + para->getParD()->rho, + para->getParD()->pressure, + para->getParD()->typeOfGridNode, + para->getParD()->neighborX, + para->getParD()->neighborY, + para->getParD()->neighborZ, + para->getParD()->numberOfNodes, + para->getParD()->numberofthreads, + para->getParD()->distributions.f[0], + para->getParD()->isEvenTimestep); + } } diff --git a/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.h b/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.h index 0067f1c5260abf301bd70ab17a277d1d71509d83..35bbd3b2c20db876610dc33ea0372de8218deacb 100644 --- a/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.h +++ b/src/gpu/VirtualFluids_GPU/KernelManager/LBKernelManager.h @@ -45,33 +45,33 @@ class Parameter; class VIRTUALFLUIDS_GPU_EXPORT LBKernelManager { public: - //! \brief makes an object of LBKernelManager - //! \param para shared pointer to instance of class Parameter + //! \brief makes an object of LBKernelManager + //! \param para shared pointer to instance of class Parameter static SPtr<LBKernelManager> make(std::shared_ptr<Parameter> parameter); - //! \brief calls the device function of the lattice Boltzmann kernel - void runLBMKernel(SPtr<Parameter> para); + //! \brief calls the device function of the lattice Boltzmann kernel + void runLBMKernel(SPtr<Parameter> para); - //! \brief calls the device function of the velocity boundary condition + //! \brief calls the device function of the velocity boundary condition void runVelocityBCKernel(SPtr<Parameter> para); - //! \brief calls the device function of the geometry boundary condition - void runGeoBCKernel(SPtr<Parameter> para); + //! \brief calls the device function of the geometry boundary condition + void runGeoBCKernel(SPtr<Parameter> para); //! \brief calls the device function that calculates the macroscopic values void calculateMacroscopicValues(SPtr<Parameter> para); private: - //! Class constructor - //! \param parameter shared pointer to instance of class Parameter - LBKernelManager(SPtr<Parameter> parameter); - //! Class copy constructor - //! \param LBKernelManager is a reference to LBKernelManager object - LBKernelManager(const LBKernelManager&); + //! Class constructor + //! \param parameter shared pointer to instance of class Parameter + LBKernelManager(SPtr<Parameter> parameter); + //! Class copy constructor + //! \param LBKernelManager is a reference to LBKernelManager object + LBKernelManager(const LBKernelManager&); - //! \property para is a shared pointer to an object of Parameter - SPtr<Parameter> parameter; + //! \property para is a shared pointer to an object of Parameter + SPtr<Parameter> parameter; }; #endif