35 #ifndef __BC_DONG_OUTFLOW_KERNEL__
36 #define __BC_DONG_OUTFLOW_KERNEL__
41 template<
typename T >
55 const int idx = blockIdx.x * blockDim.x + threadIdx.x;
56 const int str = blockDim.x * gridDim.x;
58 for (
int i = idx;
i < m;
i += str) {
59 const int k = msk[
i + 1] - 1;
63 const T vn = uk*normal_x[
i] + vk*normal_y[
i] + wk*normal_z[
i];
64 const T S0 = 0.5*(1.0 - tanh(vn/(uinf*delta)));
65 x[k] = -0.5*(uk*uk+vk*vk+wk*wk)*S0;
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ const T *__restrict__ w
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ u
__global__ void T *__restrict__ T *__restrict__ const T *__restrict__ const T *__restrict__ v
__global__ void const T *__restrict__ x
__global__ void dong_outflow_apply_scalar_kernel(const int *__restrict__ msk, T *__restrict__ x, const T *normal_x, const T *normal_y, const T *normal_z, const T *u, const T *v, const T *w, const T uinf, const T delta, const int m)