Appearance
adam_flume_fnl_euler_kernels
ADAM, FLUME FNL device kernels of the Euler model.
The model-agnostic kernel bodies (adam_flume_fnl_{face,aux}_kernels_agnostic.INC) instantiated on the Euler physics: the private arrays are sized by the Euler constants NV_K = NV_EULER, NV_AUX_K = NV_AUX (issue #41, section 4), plus the Euler kernels whose body depends on the variables (conservation integrals, signal speed). Same kernel rules as adam_flume_fnl_kernels (issue #35, D-11/D-12).
Source: src/app/flume/fnl/adam_flume_fnl_euler_kernels.F90
Dependencies
Contents
- compute_face_fluxes_dev
- compute_q_aux_dev
- compute_conservation_dev
- compute_lambda_max_dev
- face_split_fluxes
Subroutines
compute_face_fluxes_dev
Compute the WENO face fluxes of direction d: face (i,j,k) lies between cells (i,j,k) and (i+di,j+dj,k+dk), so the face array starts at index 0 along d.
Per face (device twin of the CPU compute_face_fluxes): gather the stencil m = 1-S ... S into constant-bound privates, project and split it, reconstruct every field (the private v is the packed stencil of the WENO primitive), back-project.
fortran
subroutine compute_face_fluxes_dev(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, S, gamma, ch, is_characteristic, weno_a_gpu, weno_p_gpu, weno_d_gpu, weno_zeps, q_gpu, q_aux_gpu, fl_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
d | integer(kind=I4P) | in | Direction, 1=x, 2=y, 3=z. | |
di | integer(kind=I4P) | in | Unit step along d. | |
dj | integer(kind=I4P) | in | Unit step along d. | |
dk | integer(kind=I4P) | in | Unit step along d. | |
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
S | integer(kind=I4P) | in | WENO stencil half-width. | |
gamma | real(kind=R8P) | in | Specific heats ratio. | |
ch | real(kind=R8P) | in | GLM cleaning speed (models with GLM only). | |
is_characteristic | logical | in | Characteristic (or conservative) variables. | |
weno_a_gpu | real(kind=R8P) | in | WENO optimal weights. | |
weno_p_gpu | real(kind=R8P) | in | WENO polynomials coefficients. | |
weno_d_gpu | real(kind=R8P) | in | WENO smoothness indicators coefficients. | |
weno_zeps | real(kind=R8P) | in | WENO parameter avoiding division by zero. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
q_aux_gpu | real(kind=R8P) | in | Auxiliary variables. | |
fl_gpu | real(kind=R8P) | inout | Face fluxes of direction d. |
Call graph
compute_q_aux_dev
Compute the auxiliary variables on every cell, ghost cells included.
fortran
subroutine compute_q_aux_dev(ni, nj, nk, ngc, blocks_number, gamma, R, q_gpu, q_aux_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
gamma | real(kind=R8P) | in | Specific heats ratio. | |
R | real(kind=R8P) | in | Gas constant. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
q_aux_gpu | real(kind=R8P) | inout | Auxiliary variables. |
Call graph
compute_conservation_dev
Compute the volume integrals of the conservative variables (interior cells). The cell volume includes the null directions: the tree splits them too, so a refined block's cells are smaller along them (issue #37).
fortran
subroutine compute_conservation_dev(ni, nj, nk, ngc, blocks_number, dxyz_gpu, q_gpu, integrals)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
dxyz_gpu | real(kind=R8P) | in | Blocks space steps [nb, 3]. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
integrals | real(kind=R8P) | out | Volume integrals. |
Call graph
compute_lambda_max_dev
Compute max(sum_d (|u_d| + a) / dx_d) over the interior cells (null directions excluded).
fortran
subroutine compute_lambda_max_dev(ni, nj, nk, ngc, blocks_number, gamma, R, dxyz_gpu, is_null, q_gpu, lambda_max)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
ngc | integer(kind=I4P) | in | Grid dimensions. | |
blocks_number | integer(kind=I4P) | in | Actual blocks number. | |
gamma | real(kind=R8P) | in | Specific heats ratio. | |
R | real(kind=R8P) | in | Gas constant. | |
dxyz_gpu | real(kind=R8P) | in | Blocks space steps [nb, 3]. | |
is_null | logical | in | Null directions. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
lambda_max | real(kind=R8P) | out | Maximum of sum_d (|u_d| + a) / dx_d. |
Call graph
face_split_fluxes
Split adapter of the shared face kernel (issue #41, M2-P3): the Euler split, ch unused.
Attributes: pure
fortran
subroutine face_split_fluxes(gamma, ch, d, S, is_characteristic, qs, qas, fsplit, er)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
gamma | real(kind=R8P) | in | Specific heats ratio. | |
ch | real(kind=R8P) | in | GLM cleaning speed. | |
d | integer(kind=I4P) | in | Direction, 1=x, 2=y, 3=z. | |
S | integer(kind=I4P) | in | WENO stencil half-width, S <= S_MAX. | |
is_characteristic | logical | in | Characteristic (or conservative) variables. | |
qs | real(kind=R8P) | in | Stencil conservative variables. | |
qas | real(kind=R8P) | in | Stencil auxiliary variables. | |
fsplit | real(kind=R8P) | out | Split fields in the WENO upwind layout. | |
er | real(kind=R8P) | out | Right eigenvectors. |
Call graph