Neko 1.99.1
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
rough_log_law_device.F90
Go to the documentation of this file.
1
3 use num_types, only : rp, c_rp
4 use, intrinsic :: iso_c_binding, only : c_ptr
5 use utils, only : neko_error
6 implicit none
7 private
8
9#ifdef HAVE_HIP
10 interface
11 subroutine hip_rough_log_law_compute(u_d, v_d, w_d, &
12 ind_r_d, ind_s_d, ind_t_d, ind_e_d, &
13 n_x_d, n_y_d, n_z_d, h_d, &
14 tau_x_d, tau_y_d, tau_z_d, n_nodes, lx, &
15 kappa, B, z0, tstep) &
16 bind(c, name = 'hip_rough_log_law_compute')
17 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
18 use num_types, only : c_rp
19 implicit none
20 type(c_ptr), value :: u_d, v_d, w_d
21 type(c_ptr), value :: ind_r_d, ind_s_d, ind_t_d, ind_e_d
22 type(c_ptr), value :: n_x_d, n_y_d, n_z_d, h_d
23 real(c_rp) :: kappa, B, z0
24 type(c_ptr), value :: tau_x_d, tau_y_d, tau_z_d
25 integer(c_int) :: n_nodes, lx, tstep
26 end subroutine hip_rough_log_law_compute
27 end interface
28#elif HAVE_CUDA
29 interface
30 subroutine cuda_rough_log_law_compute(u_d, v_d, w_d, &
31 ind_r_d, ind_s_d, ind_t_d, ind_e_d, &
32 n_x_d, n_y_d, n_z_d, h_d, &
33 tau_x_d, tau_y_d, tau_z_d, n_nodes, lx, &
34 kappa, B, z0, tstep) &
35 bind(c, name = 'cuda_rough_log_law_compute')
36 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
37 use num_types, only : c_rp
38 implicit none
39 type(c_ptr), value :: u_d, v_d, w_d
40 type(c_ptr), value :: ind_r_d, ind_s_d, ind_t_d, ind_e_d
41 type(c_ptr), value :: n_x_d, n_y_d, n_z_d, h_d
42 real(c_rp) :: kappa, B, z0
43 type(c_ptr), value :: tau_x_d, tau_y_d, tau_z_d
44 integer(c_int) :: n_nodes, lx, tstep
45 end subroutine cuda_rough_log_law_compute
46 end interface
47#elif HAVE_OPENCL
48#endif
50
51contains
55 subroutine rough_log_law_compute_device(u_d, v_d, w_d, &
56 ind_r_d, ind_s_d, ind_t_d, ind_e_d, &
57 n_x_d, n_y_d, n_z_d, h_d, tau_x_d, tau_y_d, tau_z_d, &
58 n_nodes, lx, kappa, B, z0, tstep)
59 integer, intent(in) :: n_nodes, lx, tstep
60 type(c_ptr), intent(in) :: u_d, v_d, w_d
61 type(c_ptr), intent(in) :: ind_r_d, ind_s_d, ind_t_d, ind_e_d
62 type(c_ptr), intent(in) :: n_x_d, n_y_d, n_z_d, h_d
63 type(c_ptr), intent(inout) :: tau_x_d, tau_y_d, tau_z_d
64 real(kind=rp), intent(in) :: kappa, b, z0
65
66#if HAVE_HIP
67 call hip_rough_log_law_compute(u_d, v_d, w_d, &
68 ind_r_d, ind_s_d, ind_t_d, ind_e_d, &
69 n_x_d, n_y_d, n_z_d, h_d, &
70 tau_x_d, tau_y_d, tau_z_d, n_nodes, lx, kappa, b, z0, tstep)
71#elif HAVE_CUDA
72 call cuda_rough_log_law_compute(u_d, v_d, w_d, &
73 ind_r_d, ind_s_d, ind_t_d, ind_e_d, &
74 n_x_d, n_y_d, n_z_d, h_d, &
75 tau_x_d, tau_y_d, tau_z_d, n_nodes, lx, kappa, b, z0, tstep)
76#elif HAVE_OPENCL
77 call neko_error("OPENCL is not implemented for the rough log-law model")
78#else
79 call neko_error('No device backend configured')
80#endif
81
82 end subroutine rough_log_law_compute_device
83end module rough_log_law_device
integer, parameter, public c_rp
Definition num_types.f90:13
integer, parameter, public rp
Global precision used in computations.
Definition num_types.f90:12
Implements the device kernel for the rough_log_law_t type.
subroutine, public rough_log_law_compute_device(u_d, v_d, w_d, ind_r_d, ind_s_d, ind_t_d, ind_e_d, n_x_d, n_y_d, n_z_d, h_d, tau_x_d, tau_y_d, tau_z_d, n_nodes, lx, kappa, b, z0, tstep)
Compute the wall shear stress on device using the rough log-law model.
Utilities.
Definition utils.f90:35
void cuda_rough_log_law_compute(void *u_d, void *v_d, void *w_d, void *ind_r_d, void *ind_s_d, void *ind_t_d, void *ind_e_d, void *n_x_d, void *n_y_d, void *n_z_d, void *h_d, void *tau_x_d, void *tau_y_d, void *tau_z_d, int *n_nodes, int *lx, real *kappa, real *B, real *z0, int *tstep)