Appearance
adam_flume_cpu_hybrid_kernels
ADAM, FLUME CPU kernels of the hybrid central/WENO scheme (issue #119, T2).
compute_hybrid_sensor fills psi on the interior and 2 ghost layers per active direction, the WENO face fluxes having been computed as ever; overwrite_central_fluxes replaces the flux of direction d by the central one at a face whose cells -1 ... 2 along d are all below the threshold and whose stencil -2 ... 3 does not reach the ghost cells of a flagged block face along d: ngc >= 3. The two blocks of a same-level interface see the same stencil and, the ghosts of psi being copies, the same mask: one flux per face, conservative.
Source: src/app/flume/cpu/adam_flume_cpu_hybrid_kernels.F90
Dependencies
Contents
Subroutines
compute_hybrid_sensor
Compute the sensor from 2nd-order central velocity gradients; the floor of the denominator is floor (a / dx_min)^2 per cell.
fortran
subroutine compute_hybrid_sensor(ni, nj, nk, ngc, blocks_number, floor, jump_max, dxyz, is_null, q_aux, psi)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. | |
floor | real(kind=R8P) | in | Dimensionless floor. | |
jump_max | real(kind=R8P) | in | Bound of the relative density jump. | |
dxyz | real(kind=R8P) | in | Blocks space steps [3, nb]. | |
is_null | logical | in | Null directions. | |
q_aux | real(kind=R8P) | in | Auxiliary variables. | |
psi | real(kind=R8P) | inout | Sensor, component 1, q-shaped. |
Call graph
mask_mu_t
Zero the eddy viscosity of the cells the sensor flags (issue #119, T2.6): there WENO supplies the dissipation.
fortran
subroutine mask_mu_t(ni, nj, nk, ngc, blocks_number, threshold, is_null, psi, mu_t)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. | |
threshold | real(kind=R8P) | in | Sensor threshold. | |
is_null | logical | in | Null directions. | |
psi | real(kind=R8P) | in | Sensor, component 1, q-shaped. | |
mu_t | real(kind=R8P) | inout | Eddy viscosity. |
Call graph
overwrite_central_fluxes
Replace the flux of direction d by the central one where the sensor allows it.
fortran
subroutine overwrite_central_fluxes(d, di, dj, dk, ni, nj, nk, ngc, blocks_number, gamma, threshold, faces, q_aux, psi, fl)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. | |
gamma | real(kind=R8P) | in | Specific heats ratio. | |
threshold | real(kind=R8P) | in | Sensor threshold. | |
faces | integer(kind=I4P) | in | Block faces not to read across [nb, 6]. | |
q_aux | real(kind=R8P) | in | Auxiliary variables. | |
psi | real(kind=R8P) | in | Sensor, component 1, q-shaped. | |
fl | real(kind=R8P) | inout | Face fluxes of direction d. |
Call graph