Skip to content

adam_flume_fnl_kernels ​

ADAM, FLUME FNL device kernels.

Model-independent kernels; the per-model ones (face fluxes, auxiliary variables, signal speed) live in adam_flume_fnl_<model>_kernels (issue #41, section 4).

Module-level kernels (issue #35, D-11/D-12): private work arrays have constant bounds, no array section is ever an actual argument inside a loop body, host scalars are firstprivate, device arrays are DEVICEVAR/DEVICEPTR, and every offload !$acc directive is immediately followed by its !$omp twin. Device arrays are transposed, (b, i, j, k, v): the block index is stride-1, so it is the innermost loop of every collapse(4) nest.

Source: src/app/flume/fnl/adam_flume_fnl_kernels.F90

Dependencies

Contents ​

Subroutines ​

apply_reflux_face_dev ​

Add the Berger-Colella correction scale delta(:, c) of one register face to the coarse skin cells of block b. With limit (the positivity limiter, issue #88) each cell receives the largest admissible fraction of its correction (reflux_positivity_theta), exactly the full one whenever admissible; nclip counts the others.

fortran
subroutine apply_reflux_face_dev(axis, sgn, b, ni, nj, nk, ngc, nv, nface_cells, scale, limit, mag_w, psi_w, delta_gpu, q_gpu, nclip)

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.
nvinteger(kind=I4P)inVariables number.
nface_cellsinteger(kind=I4P)inSkin cells number.
scalereal(kind=R8P)inCorrection scale, sgn dt / dx_coarse.
limitlogicalinKeep the corrected cells admissible.
mag_wreal(kind=R8P)inMagnetic and psi energy weights of the model.
psi_wreal(kind=R8P)inMagnetic and psi energy weights of the model.
delta_gpureal(kind=R8P)inFlux mismatch F_coarse - F_fine_sum (nv, cells).
q_gpureal(kind=R8P)inoutConservative variables.
nclipinteger(kind=I4P)outCells whose correction was limited.

Call graph

copy_state_dev ​

Copy blocks 1:blocks_number of a device field, ghost cells included, into another (e.g. an idle RK stage buffer: the D_flux diagnostic evaluates the residual on a copy of the committed state, issue #68 A2).

fortran
subroutine copy_state_dev(ni, nj, nk, ngc, nv, blocks_number, src_gpu, dst_gpu)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
nvinteger(kind=I4P)inVariables number.
blocks_numberinteger(kind=I4P)inBlocks to copy.
src_gpureal(kind=R8P)inSource field.
dst_gpureal(kind=R8P)inoutDestination field.

Call graph

compute_dflux_norms_dev ​

Compute the D_flux norms (issue #68 A2), the device twin of the CPU compute_dflux_norms loop: D_flux of a cell is the divergence of the psi face fluxes minus the reflux correction corr of the coarse seam skin cells, over the psi flux per unit B_n (scale, c_h^2 or c_h); the norms are its maximum, its integral, its seam-local maximum (as compute_divb_norms_dev), the maximum of h |D_flux| (h the smallest active spacing of the block) and max|B|.

fortran
subroutine compute_dflux_norms_dev(ni, nj, nk, ngc, blocks_number, band, ipsi, ibx, scale, dxyz_gpu, is_null, seam_gpu, flx_gpu, fly_gpu, flz_gpu, corr_gpu, q_gpu, dflux_max, dflux_l1, dflux_seam_max, h_dflux_max, b_max)

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)inActual blocks number.
bandinteger(kind=I4P)inSeam-local band width, in cells.
ipsiinteger(kind=I4P)inIndexes of psi and of B_x (B_y, B_z follow).
ibxinteger(kind=I4P)inIndexes of psi and of B_x (B_y, B_z follow).
scalereal(kind=R8P)inpsi flux per unit B_n.
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
is_nulllogicalinNull directions.
seam_gpuinteger(kind=I4P)inSeam faces flags [nb, 6] (0: not a seam face).
flx_gpureal(kind=R8P)inX-face fluxes [nb, 0:ni, 1:nj, 1:nk, nv].
fly_gpureal(kind=R8P)inY-face fluxes [nb, 1:ni, 0:nj, 1:nk, nv].
flz_gpureal(kind=R8P)inZ-face fluxes [nb, 1:ni, 1:nj, 0:nk, nv].
corr_gpureal(kind=R8P)inReflux correction [blocks_number, ni, nj, nk].
q_gpureal(kind=R8P)inConservative variables.
dflux_maxreal(kind=R8P)outMaximum of |D_flux|.
dflux_l1real(kind=R8P)outSum of |D_flux| dV.
dflux_seam_maxreal(kind=R8P)outMaximum of |D_flux| over the seam-local cells.
h_dflux_maxreal(kind=R8P)outMaximum of h |D_flux|.
b_maxreal(kind=R8P)outMaximum of |B|.

Call graph

compute_flux_difference_dev ​

Compute the residuals from the face fluxes, dq = -sum_d (F_{d,i+1/2} - F_{d,i-1/2}) / dx_d.

A null direction weighs zero, and the residual of the variable it freezes, freeze(d) (0: none), is zero: the normal momentum for Euler (CHASE semantics, issue #35, section 3.4), none for MHD (issue #41, M2-P3).

fortran
subroutine compute_flux_difference_dev(nv, ni, nj, nk, ngc, blocks_number, is_null, freeze, dxyz_gpu, flx_f_gpu, fly_f_gpu, flz_f_gpu, dq_gpu)

Arguments

NameTypeIntentAttributesDescription
nvinteger(kind=I4P)inConservative variables number.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
is_nulllogicalinNull directions.
freezeinteger(kind=I4P)inVariable frozen by each null direction (0: none).
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

add_gravity_sources_dev ​

Add the external gravity sources (issue #73, M7-G1; device twin of the CPU add_gravity_sources): rho g to the momentum, 1/2 sum_d g_d (F^rho_{d,i+1/2} + F^rho_{d,i-1/2}) plus its fourth-order correction (M7-G2a) to the energy.

fortran
subroutine add_gravity_sources_dev(ni, nj, nk, ngc, blocks_number, g, q_gpu, flx_f_gpu, fly_f_gpu, flz_f_gpu, gc_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)inActual blocks number.
greal(kind=R8P)inGravity.
q_gpureal(kind=R8P)inConservative variables.
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
gc_gpureal(kind=R8P)inFourth-order correction of the energy source.
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

add_potential_sources_dev ​

Add the gravity of the cell potential (issue #81, M8-P1; device twin of the CPU add_potential_sources): face gravity -(Phi_{i+1} - Phi_i) / dx_d, cell gravity the mean of the two faces; rho times the cell gravity to the momentum, 1/2 sum_d (g_{d,i+1/2} F^rho_{d,i+1/2} + g_{d,i-1/2} F^rho_{d,i-1/2}) to the energy.

fortran
subroutine add_potential_sources_dev(ni, nj, nk, ngc, blocks_number, is_null, dxyz_gpu, phi_gpu, q_gpu, flx_f_gpu, fly_f_gpu, flz_f_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)inActual blocks number.
is_nulllogicalinNull directions.
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
phi_gpureal(kind=R8P)inGravitational potential, ghosts filled.
q_gpureal(kind=R8P)inConservative variables.
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

subtract_equilibrium_residual_dev ​

Subtract the residual of the hydrostatic equilibrium from the residual of the stage (issue #73, M7-G2b; device twin of the CPU subtract_equilibrium_residual).

fortran
subroutine subtract_equilibrium_residual_dev(nv, ni, nj, nk, ngc, blocks_number, dq_e_gpu, dq_gpu)

Arguments

NameTypeIntentAttributesDescription
nvinteger(kind=I4P)inVariables number.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
dq_e_gpureal(kind=R8P)inEquilibrium residual.
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

compute_gravity_correction_faces_dev ​

Set the fourth-order correction of the gravity energy source from the faces the block holds (issue #73, M7-G2a; device twin of the CPU compute_gravity_correction_faces): sum_d g_d (-F_{i-3/2} + F_{i-1/2} + F_{i+1/2} - F_{i+3/2}) / 24, the faces beyond the block left to add_gravity_edge_correction_dev.

fortran
subroutine compute_gravity_correction_faces_dev(ni, nj, nk, ngc, blocks_number, g, flx_f_gpu, fly_f_gpu, flz_f_gpu, gc_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)inActual blocks number.
greal(kind=R8P)inGravity.
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
gc_gpureal(kind=R8P)inoutGravity energy correction [..., 1].

Call graph

add_gravity_limited_correction_dev ​

Remove (1 - Lambda) L from the gravity energy source (issue #73, M7-G1, option B; device twin of the CPU add_gravity_limited_correction).

fortran
subroutine add_gravity_limited_correction_dev(ni, nj, nk, ngc, blocks_number, lam_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)inActual blocks number.
lam_gpureal(kind=R8P)inCell factors (1) and gravity excess (2).
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

compute_flux_difference_ib_dev ​

Compute the residuals from the face fluxes with immersed solids: the spacing of a fluid cell is cut by the solid surface (ib_cut_spacing, CHASE semantics, issue #35 D-9); device twin of the CPU flux difference with phi.

fortran
subroutine compute_flux_difference_ib_dev(nv, ni, nj, nk, ngc, blocks_number, is_null, freeze, dxyz_gpu, flx_f_gpu, fly_f_gpu, flz_f_gpu, phi_gpu, dq_gpu)

Arguments

NameTypeIntentAttributesDescription
nvinteger(kind=I4P)inConservative variables number.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
blocks_numberinteger(kind=I4P)inActual blocks number.
is_nulllogicalinNull directions.
freezeinteger(kind=I4P)inVariable frozen by each null direction (0: none).
dxyz_gpureal(kind=R8P)inBlocks space steps [nb, 3].
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
phi_gpureal(kind=R8P)inDistance function [nb, i, j, k, solids+1].
dq_gpureal(kind=R8P)inoutResiduals.

Call graph

poison_ghosts_dev ​

Set every ghost cell to a quiet NaN (verification instrument, [diagnostics] ghost_poison, issue #65).

fortran
subroutine poison_ghosts_dev(ni, nj, nk, ngc, nv, blocks_number, q_gpu)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
nvinteger(kind=I4P)inVariables number.
blocks_numberinteger(kind=I4P)inActual blocks number.
q_gpureal(kind=R8P)inoutConservative variables.

Call graph

compute_rk_ssp_residual_dev ​

Compute the residual of a strong stability preserving step, dq = sum_s beta_s dq_s, from the stored stages.

Device twin of the residual that the host rk_object%update_q returns: the residuals history of the two backends then reports the same quantity (the effective step residual, not the last stage one).

fortran
subroutine compute_rk_ssp_residual_dev(ni, nj, nk, ngc, nv, blocks_number, nrk, beta_gpu, q_rk_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.
nvinteger(kind=I4P)inVariables number.
blocks_numberinteger(kind=I4P)inActual blocks number.
nrkinteger(kind=I4P)inRunge-Kutta stages number.
beta_gpureal(kind=R8P)inRunge-Kutta beta coefficients.
q_rk_gpureal(kind=R8P)inStored stage residuals.
dq_gpureal(kind=R8P)inoutStep residual.

Call graph

fill_seam_copy_dev ​

Copy a peer realm's interior cells into this realm's seam ghost cells, following the seam map rows.

fortran
subroutine fill_seam_copy_dev(row_start, row_count, nv, ngc, rows_gpu, src_gpu, dst_gpu)

Arguments

NameTypeIntentAttributesDescription
row_startinteger(kind=I4P)inSeam map slice of the peer.
row_countinteger(kind=I4P)inSeam map slice of the peer.
nvinteger(kind=I4P)inVariables number.
ngcinteger(kind=I4P)inGhost cells number.
rows_gpuinteger(kind=I4P)inSeam map rows.
src_gpureal(kind=R8P)inPeer active buffer.
dst_gpureal(kind=R8P)inoutOwn active buffer.

Call graph

pack_seam_skins_dev ​

Pack the face fluxes of every seam register face f of the rank in one launch (issue #90, F-B): face faces_gpu(:,f) = [block, fec, first column - 1] goes to skins_gpu(:, first column:), its cells over the two tangential axes, inner fastest (x faces: j, k; y faces: i, k; z faces: i, j), the flux register order (accumulate_seam_skin).

fortran
subroutine pack_seam_skins_dev(n_faces, max_cells, faces_gpu, ni, nj, nk, nv, flx_f_gpu, fly_f_gpu, flz_f_gpu, skins_gpu)

Arguments

NameTypeIntentAttributesDescription
n_facesinteger(kind=I4P)inRegister faces number.
max_cellsinteger(kind=I4P)inMost skin cells of a face, max(nj nk, ni nk, ni nj).
faces_gpuinteger(kind=I4P)inFaces [3, n_faces]: block, fec, first column - 1.
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
nvinteger(kind=I4P)inVariables number.
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
skins_gpureal(kind=R8P)inoutPacked skins (nv, columns).

Call graph

pack_density_dev ​

Pack the interior density of every block into buf_gpu, block-major then k, j, i fastest: the order of the library FFT Poisson solver's solve_packed (issue #81, M8-P3), which gathers it on the host.

fortran
subroutine pack_density_dev(ni, nj, nk, ngc, blocks_number, q_gpu, buf_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)inActual blocks number.
q_gpureal(kind=R8P)inConservative variables.
buf_gpureal(kind=R8P)inoutPacked density [blocks_number ni nj nk].

Call graph

unpack_potential_dev ​

Unpack the potential of the active blocks, every ghost layer included, from buf_gpu (the host layout (i, j, k, b) flattened, i fastest) into phi_gpu(b, i, j, k, 1) (issue #81, M8-P3). Only the active blocks cross the bus: the host and device arrays are sized to the block capacity, not to the blocks in use.

fortran
subroutine unpack_potential_dev(ni, nj, nk, ngc, blocks_number, buf_gpu, phi_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)inActual blocks number.
buf_gpureal(kind=R8P)inPacked potential [(ni+2ngc)(nj+2ngc)(nk+2ngc) nb].
phi_gpureal(kind=R8P)inoutPotential (b, i, j, k, 1).

Call graph

gather_seam_cells_dev ​

Gather out_gpu(v, m) = a_gpu(b, i, j, k, v) at the cells cells_gpu(:, m) = (i, j, k, b) of a ghosted field (issue #50: the seam synchronisation of the positivity limiter works on the host, over the seam cells only).

fortran
subroutine gather_seam_cells_dev(n, nv, ngc, cells_gpu, a_gpu, out_gpu)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inCells number.
nvinteger(kind=I4P)inComponents gathered (the first nv).
ngcinteger(kind=I4P)inGhost cells number.
cells_gpuinteger(kind=I4P)inCells (i, j, k, b) [4, n].
a_gpureal(kind=R8P)inField.
out_gpureal(kind=R8P)inoutGathered values [nv, n].

Call graph

gather_seam_stencils_dev ​

Gather the three axis stencils of half width s around the cells cells_gpu(:, m) = (i, j, k, b): out_gpu(v, l + s + 1, d, m) is the state l cells from the cell along d (issue #50).

fortran
subroutine gather_seam_stencils_dev(n, nv, ngc, s, cells_gpu, q_gpu, out_gpu)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inCells number.
nvinteger(kind=I4P)inVariables number.
ngcinteger(kind=I4P)inGhost cells number.
sinteger(kind=I4P)inStencil half width (s <= ngc).
cells_gpuinteger(kind=I4P)inCells (i, j, k, b) [4, n].
q_gpureal(kind=R8P)inConservative variables.
out_gpureal(kind=R8P)inoutStencils [nv, 2 s + 1, 3, n].

Call graph

gather_seam_faces_dev ​

Gather the face fluxes at the faces faces_gpu(:, m) = (axis, i, j, k, b), (i, j, k) the face index of the flux array of axis (issue #50).

fortran
subroutine gather_seam_faces_dev(n, nv, faces_gpu, flx_f_gpu, fly_f_gpu, flz_f_gpu, out_gpu)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inFaces number.
nvinteger(kind=I4P)inVariables number.
faces_gpuinteger(kind=I4P)inFaces (axis, i, j, k, b) [5, n].
flx_f_gpureal(kind=R8P)inX-face fluxes.
fly_f_gpureal(kind=R8P)inY-face fluxes.
flz_f_gpureal(kind=R8P)inZ-face fluxes.
out_gpureal(kind=R8P)inoutGathered fluxes [nv, n].

Call graph

scatter_seam_faces_dev ​

Set the face fluxes at the faces faces_gpu(:, m) = (axis, i, j, k, b) to in_gpu(:, m) (issue #50).

fortran
subroutine scatter_seam_faces_dev(n, nv, faces_gpu, in_gpu, flx_f_gpu, fly_f_gpu, flz_f_gpu)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inFaces number.
nvinteger(kind=I4P)inVariables number.
faces_gpuinteger(kind=I4P)inFaces (axis, i, j, k, b) [5, n].
in_gpureal(kind=R8P)inFluxes [nv, n].
flx_f_gpureal(kind=R8P)inoutX-face fluxes.
fly_f_gpureal(kind=R8P)inoutY-face fluxes.
flz_f_gpureal(kind=R8P)inoutZ-face fluxes.

Call graph

scatter_seam_cells_dev ​

Set a_gpu(b, i, j, k, v) = in_gpu(v, m) at the cells cells_gpu(:, m) = (i, j, k, b) (issue #50).

fortran
subroutine scatter_seam_cells_dev(n, nv, ngc, cells_gpu, in_gpu, a_gpu)

Arguments

NameTypeIntentAttributesDescription
ninteger(kind=I4P)inCells number.
nvinteger(kind=I4P)inComponents set (the first nv).
ngcinteger(kind=I4P)inGhost cells number.
cells_gpuinteger(kind=I4P)inCells (i, j, k, b) [4, n].
in_gpureal(kind=R8P)inValues [nv, n].
a_gpureal(kind=R8P)inoutField.

Call graph

set_boundary_conditions_dev ​

Set boundary conditions on one crown, for the rows beyond pass realm faces (see the CPU set_boundary_conditions): pass 1 the face rows (each face's kind, inward along its normal), pass 2 and 3 the rows beyond two or three realm faces (the kind of one physical face among them, realm_edge_face, on the donor realm_edge_donor, issue #65 P0).

The caller runs the passes in order, and every donor is interior, filled by the exchange or the seams, or by an earlier pass: a face row reads the mirrored (walls) or the first interior (extrapolation) cell along its normal, never another ghost of its pass, so the rows of one launch are independent.

fortran
subroutine set_boundary_conditions_dev(ni, nj, nk, ngc, nv, crown, pass, face_kind, gamma, R, psi_energy, wall_velocity, wall_temperature, g, has_phi, phi_gpu, local_map_bc_crown_gpu, row_first, row_last, bc_rows_gpu, q_inflow_gpu, wall_sign_gpu, dxyz_gpu, q_gpu)

Arguments

NameTypeIntentAttributesDescription
niinteger(kind=I4P)inGrid dimensions.
njinteger(kind=I4P)inGrid dimensions.
nkinteger(kind=I4P)inGrid dimensions.
ngcinteger(kind=I4P)inGrid dimensions.
nvinteger(kind=I4P)inConservative variables number.
crowninteger(kind=I4P)inCrown counter.
passinteger(kind=I4P)inRealm faces the rows of this launch lie beyond.
face_kindinteger(kind=I4P)inKind of each realm face, BC_SEAM for a seam.
gammareal(kind=R8P)inSpecific heats ratio, gas constant.
Rreal(kind=R8P)inSpecific heats ratio, gas constant.
psi_energyreal(kind=R8P)in1 if the total energy holds psi^2 / 2 (EGLM).
wall_velocityreal(kind=R8P)inNo-slip walls: wall velocity of each face.
wall_temperaturereal(kind=R8P)inIsothermal walls: wall temperature of each face.
greal(kind=R8P)inHydrostatic faces: gravity (issue #73).
has_philogicalinHydrostatic faces: a cell potential (issue #81).
phi_gpureal(kind=R8P)inGravitational potential (read with has_phi).
local_map_bc_crown_gpuinteger(kind=I8P)inBoundary crown map (row, field, crown).
row_firstinteger(kind=I4P)inThe rows of pass in bc_rows_gpu(:,crown).
row_lastinteger(kind=I4P)inThe rows of pass in bc_rows_gpu(:,crown).
bc_rows_gpuinteger(kind=I4P)inCrown map rows grouped by pass, per crown.
q_inflow_gpureal(kind=R8P)inConservative inflow state of each face [nv, 6].
wall_sign_gpureal(kind=R8P)inWall mirror sign per variable and direction [nv, 3].
dxyz_gpureal(kind=R8P)inCell spacing of each block [nb, 3].
q_gpureal(kind=R8P)inoutConservative variables.

Call graph