Appearance
adam_weno_object
ADAM, WENO configuration and the run-time dispatchers over SETH's WENO kernels.
SETH is the only source of WENO, TENO and hybrid operators in ADAM (issue #139): every coefficient table, smoothness indicator and nonlinear weight is SETH's, in kernels with compile-time coefficients (pure, acc routine seq, omp declare target: nothing to mirror on a device). ADAM keeps the policy: weno_object holds the [weno] configuration (the scheme, its half-width S, the weights js or si and their descaler switch sigma, the regulariser eps), and the module holds three run-time dispatchers that select SETH's kernel of the width S for the callers whose S is a run-time value per call (RIPPLE, the tutorial application). FLUME and PRISM call SETH's kernel of each width directly, from kernels compiled with S a named constant.
SETH's stencil convention: cells by offset from the face i+1/2 (cell 0 left of it), vp(1-S:S) the values reconstructed with a left bias, vm(1-S:S) those reconstructed with a right bias, both unshifted (vp(S) and vm(1-S) are not read). The upwind schemes weno-u-1 to weno-u-9 (S = 1 ... 5, order 2S-1) are accepted; the centred names weno-c-* are refused until an application calls SETH's centred kernels (#139, D6).
Source: src/lib/common/adam_weno_object.F90
Dependencies
Contents
- weno_object
- initialize
- load_from_file
- weno_reconstruct
- weno_reconstruct_wr
- weno_reconstruct_interp_wr
- description
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
S_MAX | integer(kind=I4P) | parameter | Maximum number/dimensions of stencils. |
S_MAX_M1 | integer(kind=I4P) | parameter | Maximum number/dimensions of stencils minus 1. |
WENO_U_1 | character(len=8) | parameter | Parameter of WENO scheme, upwind S=1, order 1. |
WENO_U_3 | character(len=8) | parameter | Parameter of WENO scheme, upwind S=2, order 3. |
WENO_U_5 | character(len=8) | parameter | Parameter of WENO scheme, upwind S=3, order 5. |
WENO_U_7 | character(len=8) | parameter | Parameter of WENO scheme, upwind S=4, order 7. |
WENO_U_9 | character(len=8) | parameter | Parameter of WENO scheme, upwind S=5, order 9. |
WENO_C_2 | character(len=8) | parameter | Centred WENO name, S=1, order 2: refused (#139 D6). |
WENO_C_4 | character(len=8) | parameter | Centred WENO name, S=2, order 4: refused (#139 D6). |
WENO_C_6 | character(len=8) | parameter | Centred WENO name, S=3, order 6: refused (#139 D6). |
WENO_C_8 | character(len=8) | parameter | Centred WENO name, S=4, order 8: refused (#139 D6). |
WENO_WEIGHTS_JS | character(len=2) | parameter | Nonlinear weights of Jiang & Shu, absolute eps (default). |
WENO_WEIGHTS_SI | character(len=2) | parameter | Scale-invariant weights, eps relative to the data (#49). |
INI_SECTION_NAME | character(len=4) | parameter | INI (config) file section name containing time configs. |
Derived Types
weno_object
WENO configuration: the scheme of [weno], the kernels are SETH's.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
scheme | character(len=:) | allocatable | WENO scheme. |
S | integer(kind=I4P) | Stencils number/dimensions, 2S-1 order of accuracy. | |
weights | character(len=:) | allocatable | Nonlinear weights, WENO_WEIGHTS_JS or WENO_WEIGHTS_SI. |
sigma | real(kind=R8P) | Descaler switch of the weights: 0 Jiang-Shu, 1 scale-invariant. | |
eps | real(kind=R8P) | Regulariser of the smoothness indicators of SETH's kernels. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize class. |
load_from_file | pass(self) | Load config from file. |
Subroutines
initialize
Initialize class: the configuration of [weno] (or the scheme alone, the Jiang-Shu weights).
fortran
subroutine initialize(self, file_parameters, scheme)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(weno_object) | inout | WENO object. | |
file_parameters | type(file_ini) | in | optional | Simulation parameters ini file handler. |
scheme | character(len=*) | in | optional | WENO scheme. |
Call graph
load_from_file
Load config from file.
fortran
subroutine load_from_file(self, file_parameters)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(weno_object) | inout | WENO object. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. |
Call graph
weno_reconstruct
WENO-JS reconstruction of one face by SETH's kernel of width S (issue #139): the run-time dispatcher of the callers whose S is a run-time value per call (RIPPLE, the tutorial application); FLUME and PRISM call SETH's kernel of each width directly from a kernel compiled with S a named constant. SETH's stencil convention: cells by offset from the face (cell 0 left of it), vp the left-biased values, vm the right-biased ones, both unshifted.
Attributes: pure
fortran
subroutine weno_reconstruct(S, vp, vm, eps, rmu, rp, rm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
S | integer(kind=I4P) | in | Candidates of the scheme, WENO-(2S-1). | |
vp | real(kind=R8P) | in | Values reconstructed with a left bias. | |
vm | real(kind=R8P) | in | Values reconstructed with a right bias. | |
eps | real(kind=R8P) | in | Regulariser of the smoothness indicators. | |
rmu | real(kind=R8P) | in | Inverse descaler (1: Jiang-Shu weights). | |
rp | real(kind=R8P) | out | Left state at the face. | |
rm | real(kind=R8P) | out | Right state at the face. |
Call graph
weno_reconstruct_wr
weno_reconstruct with the weights ratios min_k w_k/d_k of the two states.
Attributes: pure
fortran
subroutine weno_reconstruct_wr(S, vp, vm, eps, rmu, rp, rm, wrp, wrm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
S | integer(kind=I4P) | in | Candidates of the scheme, WENO-(2S-1). | |
vp | real(kind=R8P) | in | Values reconstructed with a left bias. | |
vm | real(kind=R8P) | in | Values reconstructed with a right bias. | |
eps | real(kind=R8P) | in | Regulariser of the smoothness indicators. | |
rmu | real(kind=R8P) | in | Inverse descaler (1: Jiang-Shu weights). | |
rp | real(kind=R8P) | out | Left state at the face. | |
rm | real(kind=R8P) | out | Right state at the face. | |
wrp | real(kind=R8P) | out | Weights ratio of the left state. | |
wrm | real(kind=R8P) | out | Weights ratio of the right state. |
weno_reconstruct_interp_wr
weno_reconstruct_wr from point values (the interpolation coefficients of SETH's _interp kernels).
Attributes: pure
fortran
subroutine weno_reconstruct_interp_wr(S, vp, vm, eps, rmu, rp, rm, wrp, wrm)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
S | integer(kind=I4P) | in | Candidates of the scheme, WENO-(2S-1). | |
vp | real(kind=R8P) | in | Values interpolated with a left bias. | |
vm | real(kind=R8P) | in | Values interpolated with a right bias. | |
eps | real(kind=R8P) | in | Regulariser of the smoothness indicators. | |
rmu | real(kind=R8P) | in | Inverse descaler (1: Jiang-Shu weights). | |
rp | real(kind=R8P) | out | Left state at the face. | |
rm | real(kind=R8P) | out | Right state at the face. | |
wrp | real(kind=R8P) | out | Weights ratio of the left state. | |
wrm | real(kind=R8P) | out | Weights ratio of the right state. |
Functions
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(weno_object) | in | WENO object. |
Call graph