Skip to content

adam_weno_object

ADAM, WENO class definition. Detailed reference of this implementation in contained into NASA/CR-97-206253 ICASE Report No. 97-65 "Essentially Non-Oscillatory and Weighted Essentially Non-Oscillatory Schemes for Hyperbolic Conservation Laws" of Chi-Wang Shu (1997). The stencil is arragnged as the following where for the sake of simplicity the case S=3 for interface 1/2 is sketched:

                       1/2
                       L|R
      -2     -1      0  |   1      2      3
...|------|------|------|------|------|------|...
    -^  ^+ -^  ^+ -^  ^+ -^  ^+ -^  ^+ -^  ^+
      \/     \/     \/     \/     \/     \/
...|------|------|------|------|------|------|...
   |stencil 0 R         |      |      |      |
   |____________________|      |      |      |
   |      |stencil 1 R         |      |      |
   |      |____________________|      |      |
   |      |      |stencil 2 R         |      |
   |      |      |____________________|      |
   |      |stencil 0 L         |      |      |
   |      |____________________|      |      |
   |             |stencil 1 L         |      |
   |             |____________________|      |
   |                    |stencil 2 L         |
   |                    |____________________|
   |centered (big) stencil                   |
   |_________________________________________|

Note that:

  • For upwind reconstruction the right (+) cell values are [-2,-1,0,1,2 ];
  • For upwind reconstruction the left (-) cell values are [-1, 0,1,2,3 ];
  • For centered reconstruction the cell values are [-2,-1,0,1,2,3];

To simplify the calculation for the upwind reconstruction the cell values for the left (-) reconstruction are passed in array shifted to left with the same bounds of the right (+) values, i.e. [-2:2] or [1-S:-1+S], while for the centered reconstruction the big stencil [-2:3] or [1-S:S] is passed.

Non TBP procedures are also provided for use without class object in device backend kernels.

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)parameterParameter of WENO scheme, centered S=1, order 2.
WENO_C_4character(len=8)parameterParameter of WENO scheme, centered S=2, order 4.
WENO_C_6character(len=8)parameterParameter of WENO scheme, centered S=3, order 6.
WENO_C_8character(len=8)parameterParameter of WENO scheme, centered S=4, order 8.
INI_SECTION_NAMEcharacter(len=4)parameterINI (config) file section name containing time configs.

Derived Types

weno_object

WENO class definition.

Components

NameTypeAttributesDescription
mpihtype(mpih_object)MPI handler.
schemecharacter(len=:)allocatableWENO scheme.
Sinteger(kind=I4P)Stencils number/dimensions, 2S-1 order of accuracy.
is_centeredlogicalCentered scheme flag.
areal(kind=R8P)allocatableOptimal weights [1:2,0:S-1,1:S].
preal(kind=R8P)allocatablePolinomials coefficients [1:2,0:S-1,0:S-1,1:S].
dreal(kind=R8P)allocatableSmoothness indicators coefficients [0:S-1,0:S-1,0:S-1,1:S].
creal(kind=R8P)allocatableCentered polynomials coefficients [1-S:S,1:S].
zepsreal(kind=R8P)Parameter for avoiding division by zero in computing IS.
soddinteger(kind=I4P)Branching between odd and even number of stencils (mod(S,2)).
wexpinteger(kind=I4P)Exponent for growing the diffusive part of weights.
ror_numberinteger(kind=I4P)Number of ROR iterations.
ror_schemesinteger(kind=I4P)allocatableScheme (S value) for each ROR iteration.
ror_thresholdreal(kind=R8P)ROR threshold triggering.
ror_vars_numberinteger(kind=I4P)Number of variables to check in ROR iterations.
ror_ivarinteger(kind=I4P)allocatableIndex of each variable to check in ROR iterations.
enable_ror_statslogicalEnable ror statistic saving.
ib_reduction_extentinteger(kind=I4P)Extent of order reduction close to IB solids.
ib_reduced_orderinteger(kind=I4P)Reduced order (S value) close to IB solids.
ror_statsinteger(kind=I4P)allocatableROR statistics.
cell_schemeinteger(kind=I4P)allocatableLocal-cell WENO scheme: S everywhere, but modified close to solids.

Type-Bound Procedures

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize class.
load_from_filepass(self)Load config from file.
reconstruct_upwindpass(self)Return WENO upwind reconstruction of 2S-1 order.
initialize_centered_S1pass(self)Initialize centered coefficients for S=1.
initialize_centered_S2pass(self)Initialize centered coefficients for S=2.
initialize_centered_S3pass(self)Initialize centered coefficients for S=3.
initialize_centered_S4pass(self)Initialize centered coefficients for S=4.
initialize_upwind_S1pass(self)Initialize upwind coefficients for S=1.
initialize_upwind_S2pass(self)Initialize upwind coefficients for S=2.
initialize_upwind_S3pass(self)Initialize upwind coefficients for S=3.
initialize_upwind_S4pass(self)Initialize upwind coefficients for S=4.
initialize_upwind_S5pass(self)Initialize upwind coefficients for S=5.
compute_polynomials_upwindpass(self)Compute WENO polynomials upwind.
compute_weights_upwindpass(self)Compute WENO weights.

Subroutines

initialize

Initialize class.

fortran
subroutine initialize(self, file_parameters, scheme, nb, ngc, ni, nj, nk)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.
file_parameterstype(file_ini)inoptionalSimulation parameters ini file handler.
schemecharacter(len=*)inoptionalWENO scheme.
nbinteger(kind=I4P)inTotal blocks number for MPI.
ngcinteger(kind=I4P)inNumber of ghost cells.
niinteger(kind=I4P)inNumber of cells in i direction.
njinteger(kind=I4P)inNumber of cells in j direction.
nkinteger(kind=I4P)inNumber of cells in k direction.

Call graph

load_from_file

Load config from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

reconstruct_upwind

Reconstruct by WENO upwind method of 2S-1 order.

Attributes: pure

fortran
subroutine reconstruct_upwind(self, S, v, vr)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inWENO object.
Sinteger(kind=I4P)inNumber of stencils used.
vreal(kind=R8P)inVariables to be reconstructed.
vrreal(kind=R8P)outLeft and right (1,2) interface value of reconstructed v.

Call graph

initialize_centered_S1

Initialize coefficients for centered S=1, 2S=2th order.

fortran
subroutine initialize_centered_S1(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_centered_S2

Initialize coefficients for centered S=2, 2S=4th order.

fortran
subroutine initialize_centered_S2(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_centered_S3

Initialize coefficients for centered S=3, 2S=6th order.

fortran
subroutine initialize_centered_S3(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_centered_S4

Initialize coefficients for centered S=4, 2S=8th order.

fortran
subroutine initialize_centered_S4(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_upwind_S1

Initialize coefficients for upwind S=1.

fortran
subroutine initialize_upwind_S1(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_upwind_S2

Initialize coefficients for upwind S=2, 2S-1=3rd order.

fortran
subroutine initialize_upwind_S2(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_upwind_S3

Initialize coefficients for upwind S=3, 2S-1=5th order.

fortran
subroutine initialize_upwind_S3(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_upwind_S4

Initialize coefficients for upwind S=4, 2S-1=7th order.

fortran
subroutine initialize_upwind_S4(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

initialize_upwind_S5

Initialize coefficients for upwind S=5, 2S-1=9th order.

fortran
subroutine initialize_upwind_S5(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inoutWENO object.

Call graph

compute_polynomials_upwind

Compute WENO polynomials upwind.

Attributes: pure

fortran
subroutine compute_polynomials_upwind(self, S, v, vp)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inWENO object.
Sinteger(kind=I4P)inNumber of stencils used.
vreal(kind=R8P)inVariable to be reconstructed.
vpreal(kind=R8P)outPolynomial reconstructions.

Call graph

compute_weights_upwind

Compute WENO weights upwind.

Attributes: pure

fortran
subroutine compute_weights_upwind(self, S, v, w)

Arguments

NameTypeIntentAttributesDescription
selfclass(weno_object)inWENO object.
Sinteger(kind=I4P)inNumber of stencils used.
vreal(kind=R8P)inVariable to be reconstructed.
wreal(kind=R8P)outWeights of the stencils.

Call graph

weno_compute_convolution

Compute WENO convulution, non TBP.

Attributes: pure

fortran
subroutine weno_compute_convolution(S, vp, w, vr)

Arguments

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inNumber of stencils used.
vpreal(kind=R8P)inPolynomial reconstructions.
wreal(kind=R8P)inWeights of the stencils.
vrreal(kind=R8P)outLeft and right (1,2) interface value of reconstructed v.

Call graph

weno_compute_polynomials_upwind

Compute WENO polynomials upwind, non TBP.

Attributes: pure

fortran
subroutine weno_compute_polynomials_upwind(S, weno_p, v, vp)

Arguments

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inNumber of stencils used.
weno_preal(kind=R8P)inPolinomials coefficients.
vreal(kind=R8P)inVariable to be reconstructed.
vpreal(kind=R8P)outPolynomial reconstructions.

Call graph

weno_compute_weights_upwind

Compute WENO weights, non TBP.

Attributes: pure

fortran
subroutine weno_compute_weights_upwind(S, weno_a, weno_d, weno_zeps, v, w)

Arguments

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inNumber of stencils used.
weno_areal(kind=R8P)inOptimal weights.
weno_dreal(kind=R8P)inSmoothness indicators coefficients.
weno_zepsreal(kind=R8P)inParameter for avoiding division by zero in computing IS.
vreal(kind=R8P)inVariable to be reconstructed.
wreal(kind=R8P)outWeights of the stencils.

Call graph

weno_reconstruct_centered

Reconstruct by WENO centered method of 2S order, non TBP.

Attributes: pure

fortran
subroutine weno_reconstruct_centered(S, weno_a, weno_p, weno_d, weno_c, weno_zeps, v, vr)

Arguments

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inNumber of stencils used.
weno_areal(kind=R8P)inOptimal weights.
weno_preal(kind=R8P)inPolinomials coefficients.
weno_dreal(kind=R8P)inSmoothness indicators coefficients.
weno_creal(kind=R8P)inCentered polinomials coefficients.
weno_zepsreal(kind=R8P)inParameter for avoiding division by zero in computing IS.
vreal(kind=R8P)inVariables to be reconstructed.
vrreal(kind=R8P)outLeft and right (1,2) interface value of reconstructed v.

Call graph

weno_reconstruct_upwind

Reconstruct by WENO upwind method of 2S-1 order, non TBP.

Attributes: pure

fortran
subroutine weno_reconstruct_upwind(S, weno_a, weno_p, weno_d, weno_zeps, v, vr)

Arguments

NameTypeIntentAttributesDescription
Sinteger(kind=I4P)inNumber of stencils used.
weno_areal(kind=R8P)inOptimal weights.
weno_preal(kind=R8P)inPolinomials coefficients.
weno_dreal(kind=R8P)inSmoothness indicators coefficients.
weno_zepsreal(kind=R8P)inParameter for avoiding division by zero in computing IS.
vreal(kind=R8P)inVariables to be reconstructed.
vrreal(kind=R8P)outLeft and right (1,2) interface value of reconstructed v.

Call graph

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