Skip to content

adam_fnl_field_kernels

ADAM, field class FNL kernels (FNL backend of field_object).

Source: src/lib/fnl/adam_fnl_field_kernels.F90

Dependencies

Contents

Subroutines

compute_q_gradient_dev

Compute gradient of q(ivar).

fortran
subroutine compute_q_gradient_dev(b, ni, nj, nk, ngc, dx, dy, dz, q_gpu, ivar, gradient)

Arguments

NameTypeIntentAttributesDescription
binteger(kind=I4P)inBlock index.
niinteger(kind=I4P)inGrid cells number in I direction.
njinteger(kind=I4P)inGrid cells number in J direction.
nkinteger(kind=I4P)inGrid cells number in K direction.
ngcinteger(kind=I4P)inGhost cells number.
dxreal(kind=R8P)inX space step.
dyreal(kind=R8P)inY space step.
dzreal(kind=R8P)inZ space step.
q_gpureal(kind=R8P)inField component to which apply gradient.
ivarinteger(kind=I4P)inGhost cells number.
gradientreal(kind=R8P)outMaximum gradient of q.

Call graph

compute_normL2_residuals_dev

Compute L2 norm of residuals.

fortran
subroutine compute_normL2_residuals_dev(ni, nj, nk, ngc, nv, blocks_number, dq_gpu, norm)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid cells number in I direction.
njinteger(kind=I4P)inGrid cells number in J direction.
nkinteger(kind=I4P)inGrid cells number in K direction.
ngcinteger(kind=I4P)inGhost grid number.
nvinteger(kind=I4P)inNumber of states variables.
blocks_numberinteger(kind=I4P)inNumber of blocks.
dq_gpureal(kind=R8P)inResiduals.
normreal(kind=R8P)inoutResiduals norm.

Call graph

populate_send_buffer_ghost_gpu_dev

Polulate send buffer ghost GPU.

fortran
subroutine populate_send_buffer_ghost_gpu_dev(ngc, seam_ghost_fill, comm_map_send_ghost_cell_gpu, send_buffer_ghost_gpu, q_gpu)

Arguments

NameTypeIntentAttributesDescription
ngcinteger(kind=I4P)inGhost cells number.
seam_ghost_fillinteger(kind=I4P)inSeam ghost-fill regime (flag-4 rows).
comm_map_send_ghost_cell_gpuinteger(kind=I8P)inpointerComm map, cell information.
send_buffer_ghost_gpureal(kind=R8P)inoutpointerSend buffer of ghost cells.
q_gpureal(kind=R8P)inoutField component to be updated.

Call graph

receive_recv_buffer_ghost_gpu_dev

Receive recv buffer ghost GPU.

fortran
subroutine receive_recv_buffer_ghost_gpu_dev(ngc, comm_map_recv_ghost_cell_gpu, recv_buffer_ghost_gpu, q_gpu)

Arguments

NameTypeIntentAttributesDescription
ngcinteger(kind=I4P)inGhost cells number.
comm_map_recv_ghost_cell_gpuinteger(kind=I8P)inpointerComm map, cell information.
recv_buffer_ghost_gpureal(kind=R8P)inoutpointerReceive buffer of ghost cells.
q_gpureal(kind=R8P)inoutField component to be updated.

Call graph

update_ghost_local_gpu_dev

Update (local) ghost cells.

fortran
subroutine update_ghost_local_gpu_dev(ngc, seam_ghost_fill, l_map_ghost_cell_gpu, q_gpu)

Arguments

NameTypeIntentAttributesDescription
ngcinteger(kind=I4P)inGhost cells number.
seam_ghost_fillinteger(kind=I4P)inSeam ghost-fill regime (flag-4 rows).
l_map_ghost_cell_gpuinteger(kind=I8P)inpointerLocal map of ghost cells.
q_gpureal(kind=R8P)inoutField component to be updated.

Call graph

Functions

interp_seam_ghost_gpu_dev

Device twin of field_object%interp_seam_ghost (issue #22 F3): evaluate the coarse->fine seam ghost interpolant for one (variable, fine ghost) pair on the FNL layout q_gpu(b,i,j,k,v), calling the single-source evaluators of adam_seam_interpolation_library (device-pinned by test_seam_interpolation_fnl, #22 F2).

Race discipline (CLAUDE-gpu, #22 F1-bis/F2): the footprint gather buffers are CONSTANT-BOUND locals of this acc routine seq — per-thread stack storage, the WENO device-kernels precedent — never private() clauses of a contained kernel nor array-section actuals (both are nvfortran race shapes). The anchor and the shift-clamped positions in meta guarantee the footprint reads REAL donor cells only (G3), so the gather never sees ghost cells written concurrently by other map rows.

Attributes: pure

Returns: real(kind=R8P)

fortran
function interp_seam_ghost_gpu_dev(regime, meta, ngc, q_gpu, v, b_send, i_send, j_send, k_send) result(value_)

Arguments

NameTypeIntentAttributesDescription
regimeinteger(kind=I4P)inActive fill regime (SEAM_FILL_COMPATIBLE | SEAM_FILL_TRICUBIC).
metainteger(kind=I4P)inPacked interpolation metadata (see seam_meta_pack).
ngcinteger(kind=I4P)inGhost cells number (bounds of q_gpu).
q_gpureal(kind=R8P)inField variables, FNL layout (b,i,j,k,v).
vinteger(kind=I4P)inVariable index.
b_sendinteger(kind=I4P)inDonor block index.
i_sendinteger(kind=I4P)inAnchor donor cell, i.
j_sendinteger(kind=I4P)inAnchor donor cell, j.
k_sendinteger(kind=I4P)inAnchor donor cell, k.

Call graph