Neko 1.99.4
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
ale_kinematics.cu
Go to the documentation of this file.
1#include <cuda_runtime.h>
3#include <device/cuda/check.h>
5
6extern "C" {
7
9 void *wx, void *wy, void *wz,
10 void *x_ref, void *y_ref, void *z_ref,
11 void *phi, void *x, void *y, void *z,
12 kinematics_params_t kin_params,
13 int n)
14 {
15 const dim3 nthrds(1024, 1, 1);
16 const dim3 nblcks((n + 1024 - 1) / 1024, 1, 1);
17 const cudaStream_t stream = (cudaStream_t) glb_cmd_queue;
18
20 <<<nblcks, nthrds, 0, stream>>>(n,
21 (real*)wx, (real*)wy, (real*)wz,
22 (real*)x_ref, (real*)y_ref, (real*)z_ref,
23 (real*)phi, (real*)x, (real*)y, (real*)z,
25
27 }
28
32 void compute_cheap_dist_cuda(void *d_d, void *x_d, void *y_d, void *z_d,
33 int lx, int ly, int lz, int nel,
34 int local_iters, void *nchange_d) {
35
36 const dim3 nthrds(256, 1, 1);
37 const dim3 nblcks((nel + 256 - 1) / 256, 1, 1);
38 const cudaStream_t stream = (cudaStream_t) glb_cmd_queue;
39
41 <<<nblcks, nthrds, 0, stream>>>((real*)d_d, (real*)x_d, (real*)y_d, (real*)z_d,
42 lx, ly, lz, nel, local_iters, (int*)nchange_d);
43
45 }
46
47} // extern "C"
void compute_cheap_dist_cuda(void *d_d, void *x_d, void *y_d, void *z_d, int lx, int ly, int lz, int nel, int local_iters, void *nchange_d)
void add_kinematics_to_mesh_velocity_cuda(void *wx, void *wy, void *wz, void *x_ref, void *y_ref, void *z_ref, void *phi, void *x, void *y, void *z, kinematics_params_t kin_params, int n)
__global__ void ale_add_kinematics_kernel(const int n, T *__restrict__ wx, T *__restrict__ wy, T *__restrict__ wz, const T *__restrict__ x_ref, const T *__restrict__ y_ref, const T *__restrict__ z_ref, const T *__restrict__ phi, const T *__restrict__ x, const T *__restrict__ y, const T *__restrict__ z, const kinematics_params_t kin_params)
__global__ void const T *__restrict__ x
#define CUDA_CHECK(err)
Definition check.h:6
double real