From 2c60b23ef59e5c761145c35ea2178b482e272f6a Mon Sep 17 00:00:00 2001 From: Anna Wellmann <a.wellmann@tu-bs.de> Date: Tue, 17 Jan 2023 08:42:50 +0000 Subject: [PATCH] Trim trailing whitespace, fix some formatting problems --- src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu | 6 +++--- .../LBM/GPUHelperFunctions/KernelUtilities.h | 16 ++++++++-------- .../LBM/GPUHelperFunctions/ScalingUtilities.h | 10 +++++----- .../PreCollisionInteractor/PrecursorWriter.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu b/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu index f8245ec94..f7bb09f81 100644 --- a/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu +++ b/src/gpu/VirtualFluids_GPU/GPU/CalcMac27.cu @@ -58,9 +58,9 @@ __global__ void LBCalcMac27( const unsigned int tx = threadIdx.x; // Thread index = lokaler i index const unsigned int by = blockIdx.x; // Block index x const unsigned int bz = blockIdx.y; // Block index y - const unsigned int x = tx + STARTOFFX; // Globaler x-Index - const unsigned int y = by + STARTOFFY; // Globaler y-Index - const unsigned int z = bz + STARTOFFZ; // Globaler z-Index + const unsigned int x = tx + STARTOFFX; // Globaler x-Index + const unsigned int y = by + STARTOFFY; // Globaler y-Index + const unsigned int z = bz + STARTOFFZ; // Globaler z-Index const unsigned nx = blockDim.x + 2 * STARTOFFX; const unsigned ny = gridDim.x + 2 * STARTOFFY; diff --git a/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/KernelUtilities.h b/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/KernelUtilities.h index 724e1aa82..37208ee59 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/KernelUtilities.h +++ b/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/KernelUtilities.h @@ -33,7 +33,7 @@ #ifndef KERNEL_UTILITIES_H #define KERNEL_UTILITIES_H -#include "LBM/LB.h" +#include "LBM/LB.h" #include "lbm/constants/D3Q27.h" #include "lbm/constants/NumericConstants.h" @@ -143,35 +143,35 @@ __inline__ __device__ real getEquilibriumForBC(const real& drho, const real& vel return weight * (drho + c9o2 * velocity * velocity * (c1o1 + drho) - cu_sq); } -__inline__ __device__ real getInterpolatedDistributionForVeloBC(const real& q, const real& f, const real& fInverse, const real& feq, +__inline__ __device__ real getInterpolatedDistributionForVeloBC(const real& q, const real& f, const real& fInverse, const real& feq, const real& omega, const real& velocity, const real weight) { - return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + (q * (f + fInverse) - c6o1 * weight * velocity) / (c1o1 + q); } -__inline__ __device__ real getBounceBackDistributionForVeloBC( const real& f, +__inline__ __device__ real getBounceBackDistributionForVeloBC( const real& f, const real& velocity, const real weight) { return f - (c6o1 * weight * velocity); } -__inline__ __device__ real getInterpolatedDistributionForNoSlipBC(const real& q, const real& f, const real& fInverse, const real& feq, +__inline__ __device__ real getInterpolatedDistributionForNoSlipBC(const real& q, const real& f, const real& fInverse, const real& feq, const real& omega) { - return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + (q * (f + fInverse)) / (c1o1 + q); } -__inline__ __device__ real getInterpolatedDistributionForVeloWithPressureBC(const real& q, const real& f, const real& fInverse, const real& feq, +__inline__ __device__ real getInterpolatedDistributionForVeloWithPressureBC(const real& q, const real& f, const real& fInverse, const real& feq, const real& omega, const real& drho, const real& velocity, const real weight) { - return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + return (c1o1-q) / (c1o1+q) * (f - fInverse + (f + fInverse - c2o1 * feq * omega) / (c1o1 - omega)) * c1o2 + (q * (f + fInverse) - c6o1 * weight * velocity) / (c1o1 + q) - weight * drho; } diff --git a/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/ScalingUtilities.h b/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/ScalingUtilities.h index 45ce8a4cb..53990e452 100644 --- a/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/ScalingUtilities.h +++ b/src/gpu/VirtualFluids_GPU/LBM/GPUHelperFunctions/ScalingUtilities.h @@ -111,23 +111,23 @@ __device__ __inline__ void calculateMomentsOnSourceNodes(Distributions27 &dist, // example: kxxMzz: moment, second derivative in x direction minus the second derivative in z direction kxyFromfcNEQ = -c3o1 * omega * ((f_MM0 + f_MMM + f_MMP - f_MP0 - f_MPM - f_MPP - f_PM0 - f_PMM - f_PMP + f_PP0 + f_PPM + f_PPP) / - (c1o1 + drho) - + (c1o1 + drho) - ((velocityX * velocityY))); kyzFromfcNEQ = -c3o1 * omega * ((f_0MM + f_PMM + f_MMM - f_0MP - f_PMP - f_MMP - f_0PM - f_PPM - f_MPM + f_0PP + f_PPP + f_MPP) / - (c1o1 + drho) - + (c1o1 + drho) - ((velocityY * velocityZ))); kxzFromfcNEQ = -c3o1 * omega * ((f_M0M + f_MMM + f_MPM - f_M0P - f_MMP - f_MPP - f_P0M - f_PMM - f_PPM + f_P0P + f_PMP + f_PPP) / - (c1o1 + drho) - + (c1o1 + drho) - ((velocityX * velocityZ))); kxxMyyFromfcNEQ = -c3o2 * omega * ((f_M0M + f_M00 + f_M0P - f_0MM - f_0M0 - f_0MP - f_0PM - f_0P0 - f_0PP + f_P0M + f_P00 + f_P0P) / - (c1o1 + drho) - + (c1o1 + drho) - ((velocityX * velocityX - velocityY * velocityY))); kxxMzzFromfcNEQ = -c3o2 * omega * ((f_MM0 + f_M00 + f_MP0 - f_0MM - f_0MP - f_00M - f_00P - f_0PM - f_0PP + f_PM0 + f_P00 + f_PP0) / - (c1o1 + drho) - + (c1o1 + drho) - ((velocityX * velocityX - velocityZ * velocityZ))); } diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.h b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.h index 3bae63a33..264023b58 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.h +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.h @@ -31,7 +31,7 @@ //! \date 05/12/2022 //! \brief Probe writing planes of data to be used as inflow data in successor simulation using PrecursorBC //! -//! The probe writes out yz-planes at a specifc x position ( \param xPos ) of either velocity or distributions +//! The probe writes out yz-planes at a specific x position ( \param xPos ) of either velocity or distributions //! that can be read by PrecursorBC as inflow data. //======================================================================================= -- GitLab