Skip to content

adam_ripple_fnl_kernels ​

RIPPLE, the FNL (OpenACC) device kernels.

The device twins of the CPU loops. Device arrays are transposed, (b, i, j, k, v): the block index is stride-1, so it is the innermost loop of every nest. Host scalars are firstprivate, device arrays DEVICEVAR (FUNDAL's deviceptr), private work arrays have constant bounds.

Source: src/app/ripple/fnl/adam_ripple_fnl_kernels.F90

Dependencies

Contents ​

Subroutines ​

compute_face_fluxes_dev ​

Face fluxes along the axis of unit step (di, dj, dk), device twin of the CPU face_fluxes: the split fluxes a+ u (cells m = 1-S ... S-1) and a- u (cells m+1) of the stencil of face i+1/2, reconstructed by WENO and summed.

fortran
subroutine compute_face_fluxes_dev(di, dj, dk, ni, nj, nk, ngc, blocks_number, S, a, weno_a_gpu, weno_p_gpu, weno_d_gpu, weno_zeps, q_gpu, fl_gpu)

Arguments

NameTypeIntentAttributesDescription
diinteger(kind=I4P)inUnit step.
djinteger(kind=I4P)inUnit step.
dkinteger(kind=I4P)inUnit step.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inBlocks in use.
Sinteger(kind=I4P)inWENO half stencil.
areal(kind=R8P)inVelocity component.
weno_a_gpureal(kind=R8P)inWENO optimal weights.
weno_p_gpureal(kind=R8P)inWENO polynomials coefficients.
weno_d_gpureal(kind=R8P)inWENO smoothness indicators coefficients.
weno_zepsreal(kind=R8P)inWENO parameter avoiding division by zero.
q_gpureal(kind=R8P)inState.
fl_gpureal(kind=R8P)inoutFace fluxes.

Call graph

compute_flux_difference_dev ​

Residuals dq = -sum_d w_d (F_{i+1/2} - F_{i-1/2}) / dx_d, w_d 1 on an active axis, 0 on a null one.

fortran
subroutine compute_flux_difference_dev(ni, nj, nk, ngc, blocks_number, w, dxyz_gpu, flx_gpu, fly_gpu, flz_gpu, dq_gpu)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inBlocks in use.
wreal(kind=R8P)inAxis weights.
dxyz_gpureal(kind=R8P)inBlock spacings [nb, 3].
flx_gpureal(kind=R8P)inX-face fluxes.
fly_gpureal(kind=R8P)inY-face fluxes.
flz_gpureal(kind=R8P)inZ-face fluxes.
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

pack_face_skin_dev ​

Pack the face fluxes of face fec of block b into skin_gpu(1, c), c running over the two tangential axes, inner fastest (x faces: j, k; y faces: i, k; z faces: i, j): the flux register's order.

fortran
subroutine pack_face_skin_dev(fec, b, ni, nj, nk, flx_gpu, fly_gpu, flz_gpu, skin_gpu)

Arguments

NameTypeIntentAttributesDescription
fecinteger(kind=I4P)inFace (1..6: -x, +x, -y, +y, -z, +z), block.
binteger(kind=I4P)inFace (1..6: -x, +x, -y, +y, -z, +z), block.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
flx_gpureal(kind=R8P)inX-face fluxes.
fly_gpureal(kind=R8P)inY-face fluxes.
flz_gpureal(kind=R8P)inZ-face fluxes.
skin_gpureal(kind=R8P)inoutSkin (1, cells).

Call graph

apply_reflux_face_dev ​

Add scale delta(1, c) to the coarse skin cells of block b on the face of normal axis and side sgn.

fortran
subroutine apply_reflux_face_dev(axis, sgn, b, ni, nj, nk, ngc, nface_cells, scale, delta_gpu, q_gpu)

Arguments

NameTypeIntentAttributesDescription
axisinteger(kind=I4P)inFace normal axis (1..3) and side (+-1).
sgninteger(kind=I4P)inFace normal axis (1..3) and side (+-1).
binteger(kind=I4P)inCoarse block.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
nface_cellsinteger(kind=I4P)inSkin cells.
scalereal(kind=R8P)insgn dt / dx_coarse.
delta_gpureal(kind=R8P)inFlux mismatch F_coarse - F_fine (1, cells).
q_gpureal(kind=R8P)inoutState.

Call graph