Skip to content

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 ​

Variables ​

NameTypeAttributesDescription
S_MAXinteger(kind=I4P)parameterMaximum number/dimensions of stencils.
S_MAX_M1integer(kind=I4P)parameterMaximum number/dimensions of stencils minus 1.
WENO_U_1character(len=8)parameterParameter of WENO scheme, upwind S=1, order 1.
WENO_U_3character(len=8)parameterParameter of WENO scheme, upwind S=2, order 3.
WENO_U_5character(len=8)parameterParameter of WENO scheme, upwind S=3, order 5.
WENO_U_7character(len=8)parameterParameter of WENO scheme, upwind S=4, order 7.
WENO_U_9character(len=8)parameterParameter of WENO scheme, upwind S=5, order 9.
WENO_C_2character(len=8)parameterCentred WENO name, S=1, order 2: refused (#139 D6).
WENO_C_4character(len=8)parameterCentred WENO name, S=2, order 4: refused (#139 D6).
WENO_C_6character(len=8)parameterCentred WENO name, S=3, order 6: refused (#139 D6).
WENO_C_8character(len=8)parameterCentred WENO name, S=4, order 8: refused (#139 D6).
WENO_WEIGHTS_JScharacter(len=2)parameterNonlinear weights of Jiang & Shu, absolute eps (default).
WENO_WEIGHTS_SIcharacter(len=2)parameterScale-invariant weights, eps relative to the data (#49).
INI_SECTION_NAMEcharacter(len=4)parameterINI (config) file section name containing time configs.

Derived Types ​

weno_object ​

WENO configuration: the scheme of [weno], the kernels are SETH's.

Components

NameTypeAttributesDescription
schemecharacter(len=:)allocatableWENO scheme.
Sinteger(kind=I4P)Stencils number/dimensions, 2S-1 order of accuracy.
weightscharacter(len=:)allocatableNonlinear weights, WENO_WEIGHTS_JS or WENO_WEIGHTS_SI.
sigmareal(kind=R8P)Descaler switch of the weights: 0 Jiang-Shu, 1 scale-invariant.
epsreal(kind=R8P)Regulariser of the smoothness indicators of SETH's kernels.

Type-Bound Procedures

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize class.
load_from_filepass(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

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.
file_parameterstype(file_ini)inoptionalSimulation parameters ini file handler.
schemecharacter(len=*)inoptionalWENO scheme.

Call graph

load_from_file ​

Load config from file.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.
file_parameterstype(file_ini)inSimulation 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

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inCandidates of the scheme, WENO-(2S-1).
vpreal(kind=R8P)inValues reconstructed with a left bias.
vmreal(kind=R8P)inValues reconstructed with a right bias.
epsreal(kind=R8P)inRegulariser of the smoothness indicators.
rmureal(kind=R8P)inInverse descaler (1: Jiang-Shu weights).
rpreal(kind=R8P)outLeft state at the face.
rmreal(kind=R8P)outRight 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

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inCandidates of the scheme, WENO-(2S-1).
vpreal(kind=R8P)inValues reconstructed with a left bias.
vmreal(kind=R8P)inValues reconstructed with a right bias.
epsreal(kind=R8P)inRegulariser of the smoothness indicators.
rmureal(kind=R8P)inInverse descaler (1: Jiang-Shu weights).
rpreal(kind=R8P)outLeft state at the face.
rmreal(kind=R8P)outRight state at the face.
wrpreal(kind=R8P)outWeights ratio of the left state.
wrmreal(kind=R8P)outWeights 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

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inCandidates of the scheme, WENO-(2S-1).
vpreal(kind=R8P)inValues interpolated with a left bias.
vmreal(kind=R8P)inValues interpolated with a right bias.
epsreal(kind=R8P)inRegulariser of the smoothness indicators.
rmureal(kind=R8P)inInverse descaler (1: Jiang-Shu weights).
rpreal(kind=R8P)outLeft state at the face.
rmreal(kind=R8P)outRight state at the face.
wrpreal(kind=R8P)outWeights ratio of the left state.
wrmreal(kind=R8P)outWeights 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

NameTypeIntentAttributesDescription
selfclass(weno_object)inWENO object.

Call graph