Appearance
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
- compute_q_gradient_dev
- compute_normL2_residuals_dev
- populate_send_buffer_ghost_gpu_dev
- receive_recv_buffer_ghost_gpu_dev
- update_ghost_local_gpu_dev
- interp_seam_ghost_gpu_dev
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
b | integer(kind=I4P) | in | Block index. | |
ni | integer(kind=I4P) | in | Grid cells number in I direction. | |
nj | integer(kind=I4P) | in | Grid cells number in J direction. | |
nk | integer(kind=I4P) | in | Grid cells number in K direction. | |
ngc | integer(kind=I4P) | in | Ghost cells number. | |
dx | real(kind=R8P) | in | X space step. | |
dy | real(kind=R8P) | in | Y space step. | |
dz | real(kind=R8P) | in | Z space step. | |
q_gpu | real(kind=R8P) | in | Field component to which apply gradient. | |
ivar | integer(kind=I4P) | in | Ghost cells number. | |
gradient | real(kind=R8P) | out | Maximum 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid cells number in I direction. | |
nj | integer(kind=I4P) | in | Grid cells number in J direction. | |
nk | integer(kind=I4P) | in | Grid cells number in K direction. | |
ngc | integer(kind=I4P) | in | Ghost grid number. | |
nv | integer(kind=I4P) | in | Number of states variables. | |
blocks_number | integer(kind=I4P) | in | Number of blocks. | |
dq_gpu | real(kind=R8P) | in | Residuals. | |
norm | real(kind=R8P) | inout | Residuals 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ngc | integer(kind=I4P) | in | Ghost cells number. | |
seam_ghost_fill | integer(kind=I4P) | in | Seam ghost-fill regime (flag-4 rows). | |
comm_map_send_ghost_cell_gpu | integer(kind=I8P) | in | pointer | Comm map, cell information. |
send_buffer_ghost_gpu | real(kind=R8P) | inout | pointer | Send buffer of ghost cells. |
q_gpu | real(kind=R8P) | inout | Field 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ngc | integer(kind=I4P) | in | Ghost cells number. | |
comm_map_recv_ghost_cell_gpu | integer(kind=I8P) | in | pointer | Comm map, cell information. |
recv_buffer_ghost_gpu | real(kind=R8P) | inout | pointer | Receive buffer of ghost cells. |
q_gpu | real(kind=R8P) | inout | Field 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ngc | integer(kind=I4P) | in | Ghost cells number. | |
seam_ghost_fill | integer(kind=I4P) | in | Seam ghost-fill regime (flag-4 rows). | |
l_map_ghost_cell_gpu | integer(kind=I8P) | in | pointer | Local map of ghost cells. |
q_gpu | real(kind=R8P) | inout | Field 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
regime | integer(kind=I4P) | in | Active fill regime (SEAM_FILL_COMPATIBLE | SEAM_FILL_TRICUBIC). | |
meta | integer(kind=I4P) | in | Packed interpolation metadata (see seam_meta_pack). | |
ngc | integer(kind=I4P) | in | Ghost cells number (bounds of q_gpu). | |
q_gpu | real(kind=R8P) | in | Field variables, FNL layout (b,i,j,k,v). | |
v | integer(kind=I4P) | in | Variable index. | |
b_send | integer(kind=I4P) | in | Donor block index. | |
i_send | integer(kind=I4P) | in | Anchor donor cell, i. | |
j_send | integer(kind=I4P) | in | Anchor donor cell, j. | |
k_send | integer(kind=I4P) | in | Anchor donor cell, k. |
Call graph