42 use,
intrinsic :: iso_c_binding
54 bind(c, name =
'scalar_residual_update_hip')
55 use,
intrinsic :: iso_c_binding
57 type(c_ptr),
value :: s_res_d
58 type(c_ptr),
value :: f_s_d
66 bind(c, name =
'scalar_residual_update_cuda')
67 use,
intrinsic :: iso_c_binding
69 type(c_ptr),
value :: s_res_d
70 type(c_ptr),
value :: f_s_d
78 bind(c, name =
'scalar_residual_update_opencl')
79 use,
intrinsic :: iso_c_binding
81 type(c_ptr),
value :: s_res_d
82 type(c_ptr),
value :: f_s_d
89 subroutine scalar_residual_update_metal(s_res_d, f_s_d, n) &
90 bind(c, name =
'scalar_residual_update_metal')
91 use,
intrinsic :: iso_c_binding
93 type(c_ptr),
value :: s_res_d
94 type(c_ptr),
value :: f_s_d
96 end subroutine scalar_residual_update_metal
105 lambda, rhocp, bd, dt, n)
106 class(
ax_t),
intent(in) :: Ax
107 type(
mesh_t),
intent(inout) :: msh
108 type(
space_t),
intent(inout) :: Xh
109 type(
field_t),
intent(inout) :: s
110 type(
field_t),
intent(inout) :: s_res
111 type(
field_t),
intent(in) :: f_Xh
112 type(
coef_t),
intent(inout) :: c_Xh
113 type(
field_t),
intent(in) :: lambda
114 real(kind=
rp),
intent(in) :: rhocp
115 real(kind=
rp),
intent(in) :: bd
116 real(kind=
rp),
intent(in) :: dt
117 integer,
intent(in) :: n
123 call ax%compute(s_res%x, s%x, c_xh, msh, xh)
132 call scalar_residual_update_metal(s_res%x_d, f_xh%x_d, n)
Defines a Matrix-vector product.
subroutine, public device_copy(a_d, b_d, n, strm)
Copy a vector .
subroutine, public device_cfill(a_d, c, n, strm)
Set all elements to a constant c .
integer, parameter, public rp
Global precision used in computations.
subroutine scalar_residual_device_compute(ax, s, s_res, f_xh, c_xh, msh, xh, lambda, rhocp, bd, dt, n)
Defines the residual for the scalar transport equation.
Defines a function space.
void scalar_residual_update_opencl(void *s_res, void *f_s, int *n)
void scalar_residual_update_cuda(void *s_res, void *f_s, int *n)
Base type for a matrix-vector product providing .
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
Abstract type to compute scalar residual.
The function space for the SEM solution fields.