35#ifndef __LPT_PERIODIC_BC_KERNEL_H__
36#define __LPT_PERIODIC_BC_KERNEL_H__
57 const int n_periodic_dirs,
58 const T periodic_dir_x1,
59 const T periodic_dir_y1,
60 const T periodic_dir_z1,
61 const T periodic_dir_x2,
62 const T periodic_dir_y2,
63 const T periodic_dir_z2,
64 const T periodic_dir_x3,
65 const T periodic_dir_y3,
66 const T periodic_dir_z3,
67 const T periodic_min1,
68 const T periodic_min2,
69 const T periodic_min3,
70 const T periodic_max1,
71 const T periodic_max2,
72 const T periodic_max3,
73 const T periodic_shift_x1,
74 const T periodic_shift_y1,
75 const T periodic_shift_z1,
76 const T periodic_shift_x2,
77 const T periodic_shift_y2,
78 const T periodic_shift_z2,
79 const T periodic_shift_x3,
80 const T periodic_shift_y3,
81 const T periodic_shift_z3,
82 const T periodic_len1,
83 const T periodic_len2,
84 const T periodic_len3) {
90 for (
int i = idx;
i < n;
i +=
str) {
95 for (
int j = 0;
j < n_periodic_dirs;
j++) {
96 T dir0 = periodic_dir_x1;
97 T dir1 = periodic_dir_y1;
98 T dir2 = periodic_dir_z1;
99 T min = periodic_min1;
100 T max = periodic_max1;
104 T len = periodic_len1;
108 dir0 = periodic_dir_x2;
109 dir1 = periodic_dir_y2;
110 dir2 = periodic_dir_z2;
113 shift0 = periodic_shift_x2;
114 shift1 = periodic_shift_y2;
115 shift2 = periodic_shift_z2;
119 dir0 = periodic_dir_x3;
120 dir1 = periodic_dir_y3;
121 dir2 = periodic_dir_z3;
124 shift0 = periodic_shift_x3;
125 shift1 = periodic_shift_y3;
126 shift2 = periodic_shift_z3;
181 const T tol = 1.0e-8;
182 const T pi =
acos((
T) -1.0);
186 for (
int i = idx;
i < n;
i +=
str) {
209 if (u_lag && v_lag) {
212 if (u_laglag && v_laglag) {
215 if (acc_xlag && acc_ylag) {
218 if (acc_xlaglag && acc_ylaglag) {
__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 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
__device__ void lpt_rotate_xy(T *x, T *y, const int i, const T theta)
__global__ void lpt_periodic_bc_wrap_translational_kernel(T *__restrict__ x, T *__restrict__ y, T *__restrict__ z, const int n, const int n_periodic_dirs, const T periodic_dir_x1, const T periodic_dir_y1, const T periodic_dir_z1, const T periodic_dir_x2, const T periodic_dir_y2, const T periodic_dir_z2, const T periodic_dir_x3, const T periodic_dir_y3, const T periodic_dir_z3, const T periodic_min1, const T periodic_min2, const T periodic_min3, const T periodic_max1, const T periodic_max2, const T periodic_max3, const T periodic_shift_x1, const T periodic_shift_y1, const T periodic_shift_z1, const T periodic_shift_x2, const T periodic_shift_y2, const T periodic_shift_z2, const T periodic_shift_x3, const T periodic_shift_y3, const T periodic_shift_z3, const T periodic_len1, const T periodic_len2, const T periodic_len3)
__global__ void lpt_periodic_bc_wrap_rotational_kernel(T *__restrict__ x, T *__restrict__ y, T *__restrict__ z, const int n, const T theta_min, const T theta_max, const T theta_len, T *__restrict__ u, T *__restrict__ v, T *__restrict__ w, T *__restrict__ u_lag, T *__restrict__ v_lag, T *__restrict__ w_lag, T *__restrict__ u_laglag, T *__restrict__ v_laglag, T *__restrict__ w_laglag, T *__restrict__ acc_xlag, T *__restrict__ acc_ylag, T *__restrict__ acc_zlag, T *__restrict__ acc_xlaglag, T *__restrict__ acc_ylaglag, T *__restrict__ acc_zlaglag)