47 use,
intrinsic :: iso_c_binding, only : c_ptr, c_null_ptr, c_associated
63 procedure, pass(this) :: compute_scalar => &
78 type(
coef_t),
intent(in) :: coef
103 type(
space_t),
intent(in) :: Xh
104 type(
coef_t),
intent(in) :: coef
105 type(
field_t),
intent(inout) :: vx, vy, vz
106 type(
field_t),
intent(inout) :: fx, fy, fz
107 integer,
intent(in) :: n
108 real(kind=
rp),
intent(in),
optional :: dt
117 call conv1(temp%x, vx%x, vx%x, vy%x, vz%x, xh, coef)
119 call conv1(temp%x, vy%x, vx%x, vy%x, vz%x, xh, coef)
121 if (coef%Xh%lz .eq. 1)
then
124 call conv1(temp%x, vz%x, vx%x, vy%x, vz%x, xh, coef)
128 call conv1(temp%x, vx%x, vx%x, vy%x, vz%x, xh, coef)
129 call subcol3 (fx%x, coef%B, temp%x, n)
130 call conv1(temp%x, vy%x, vx%x, vy%x, vz%x, xh, coef)
131 call subcol3 (fy%x, coef%B, temp%x, n)
132 if (coef%Xh%lz .eq. 1)
then
133 call rzero (temp%x, n)
135 call conv1(temp%x, vz%x, vx%x, vy%x, vz%x, xh, coef)
136 call subcol3(fz%x, coef%B, temp%x, n)
158 type(
field_t),
intent(inout) :: vx, vy, vz
159 type(
field_t),
intent(inout) :: s
160 type(
field_t),
intent(inout) :: fs
161 type(
space_t),
intent(in) :: Xh
162 type(
coef_t),
intent(in) :: coef
163 integer,
intent(in) :: n
164 real(kind=
rp),
intent(in),
optional :: dt
172 call conv1(temp%x, s%x, vx%x, vy%x, vz%x, xh, coef)
174 if (coef%Xh%lz .eq. 1)
then
179 call conv1(temp%x, s%x, vx%x, vy%x, vz%x, xh, coef)
182 call subcol3 (fs%x, coef%B, temp%x, n)
183 if (coef%Xh%lz .eq. 1)
then
184 call rzero (temp%x, n)
193 type(
coef_t),
intent(in) :: coef
194 logical,
intent(in) :: moving_boundary
199 wm_x, wm_y, wm_z, fx, fy, fz, Xh, coef, n, dt)
201 type(
field_t),
intent(inout) :: vx, vy, vz
202 type(
field_t),
intent(inout) :: wm_x, wm_y, wm_z
203 type(
field_t),
intent(inout) :: fx, fy, fz
204 type(
space_t),
intent(in) :: Xh
205 type(
coef_t),
intent(in) :: coef
206 integer,
intent(in) :: n
207 real(kind=
rp),
intent(in),
optional :: dt
208 type(
field_t),
pointer :: temp, work_x, work_y, work_z
220 call div(temp%x_d, work_x%x_d, work_y%x_d, work_z%x_d, coef)
225 call addcol3(fx%x, coef%B, temp%x, n)
232 call div(temp%x_d, work_x%x_d, work_y%x_d, work_z%x_d, coef)
237 call addcol3(fy%x, coef%B, temp%x, n)
244 call div(temp%x_d, work_x%x_d, work_y%x_d, work_z%x_d, coef)
249 call addcol3(fz%x, coef%B, temp%x, n)
Return the device pointer for an associated Fortran array.
Map a Fortran array to a device (allocate and associate)
Compute the divergence of a vector field.
Subroutines to add advection terms to the RHS of a transport equation.
subroutine init_no_dealias(this, coef)
Constructor.
subroutine free_no_dealias(this)
Destructor.
subroutine compute_ale_advection_no_dealias(this, vx, vy, vz, wm_x, wm_y, wm_z, fx, fy, fz, xh, coef, n, dt)
subroutine compute_scalar_advection_no_dealias(this, vx, vy, vz, s, fs, xh, coef, n, dt)
Add the advection term for a scalar, i.e. , to the RHS.
subroutine recompute_metrics_no_dealias(this, coef, moving_boundary)
subroutine compute_advection_no_dealias(this, vx, vy, vz, fx, fy, fz, xh, coef, n, dt)
Add the advection term for the fluid, i.e. to the RHS.
Subroutines to add advection terms to the RHS of a transport equation.
subroutine, public device_addcol3(a_d, b_d, c_d, n, strm)
Returns .
subroutine, public device_rzero(a_d, n, strm)
Zero a real vector.
subroutine, public device_subcol3(a_d, b_d, c_d, n, strm)
Returns .
Device abstraction, common interface for various accelerators.
subroutine, public device_free(x_d)
Deallocate memory on the device.
subroutine, public field_col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public subcol3(a, b, c, n)
Returns .
subroutine, public addcol3(a, b, c, n)
Returns .
subroutine, public rzero(a, n)
Zero a real vector.
integer, parameter neko_bcknd_device
integer, parameter, public rp
Global precision used in computations.
subroutine, public conv1(du, u, vx, vy, vz, xh, coef, es, ee)
Compute the advection term.
Defines a registry for storing and requesting temporary objects This can be used when you have a func...
type(scratch_registry_t), target, public neko_scratch_registry
Global scratch registry.
Defines a function space.
Type encapsulating advection routines with no dealiasing applied.
Base abstract type for computing the advection operator.
Coefficients defined on a given (mesh, ) tuple. Arrays use indices (i,j,k,e): element e,...
The function space for the SEM solution fields.