Skip to content

adam_flume_numerics_object ​

ADAM, FLUME numerics class definition.

The time scheme is not duplicated here: it is the library [runge_kutta].(scheme).

reflux switches the Berger-Colella correction at AMR coarse-fine faces: .true. for every production run; .false. is a diagnostic (the negative control of the conservation test, issue #35 V3), since a run on a grid with coarse-fine faces is then not conservative. reflux_cadence (optional, issue #81 P5c): step (default) corrects the coarse cells once, at the end of the step, from the step's fluxes (Berger-Colella, the AMReX cadence); stage corrects the coarse cells' residual at every Runge-Kutta stage from that stage's fluxes, so every stage advances the coarse cells with the fine fluxes and the scheme is the conservative composite one at every stage (the time integration then keeps its order on what the step cadence makes first order, e.g. the E + W of self-gravity).

scheme_space = weno-riemann (issue #47) interpolates the reconstruction_variables (characteristic or primitive) to the faces by WENO, takes the riemann_solver flux of the two face states and adds the flux_correction (6th or 4th order, or none), switched off at a face by the flux_correction_sensor.

positivity_limiter = cell (issue #47, D-9; optional, default none) blends every face flux with the first-order local Lax-Friedrichs backbone so that each stage keeps the density and the pressure positive.

Source: src/app/flume/common/adam_flume_numerics_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=8)parameterINI (config) file section name containing numerics configs.

Derived Types ​

flume_numerics_object ​

FLUME numerics class definition.

Components ​

NameTypeAttributesDescription
scheme_spacecharacter(len=:)allocatableSpatial scheme.
reconstruction_variablescharacter(len=:)allocatableVariables reconstructed at cell interfaces.
refluxlogicalBerger-Colella reflux at AMR coarse-fine faces.
riemann_solvercharacter(len=:)allocatableRiemann solver (weno-riemann only).
flux_correctioncharacter(len=:)allocatableFace flux correction order (weno-riemann only).
flux_correction_sensorcharacter(len=:)allocatableFace flux correction sensor (weno-riemann only).
positivity_limitercharacter(len=:)allocatablePositivity limiter: none or cell.
reflux_policycharacter(len=:)allocatableReflux policy (with reflux on): always or troubled (#68 E1).
reflux_cadencecharacter(len=:)allocatableReflux cadence (with reflux on): step or stage (#81 P5c).
dissipative_orderinteger(kind=I4P)Order of the dissipative face fluxes, 2 or 4 (issue #65).

Type-Bound Procedures ​

NameAttributesDescription
correction_coefficientspass(self)Return the face flux correction coefficients.
correction_thresholdpass(self)Return the face flux correction sensor threshold.
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize numerics.
load_from_filepass(self)Load config from file.

Subroutines ​

initialize ​

Initialize numerics.

fortran
subroutine initialize(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_numerics_object)inoutNumerics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

load_from_file ​

Load config from file; every key is required and an unknown value is fatal.

fortran
subroutine load_from_file(self, file_parameters)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_numerics_object)inoutNumerics.
file_parameterstype(file_ini)inSimulation parameters ini file handler.

Call graph

Functions ​

correction_coefficients ​

Return the face flux correction coefficients c, F^ = c(1) F + c(2) (f_i + f_i+1) + c(3) (f_i-1 + f_i+2).

F is the Riemann flux of the face i+1/2, f_m the physical flux of cell m. The 6th- and 4th-order weights match F^ = f - h^2/24 f_xx + 7 h^4/5760 f_xxxx at the face (Chen, Toth & Gombosi 2016; derived with sympy, issue #47); none returns F^ = F. Passing them to the kernels keeps the order choice out of the device code.

Attributes: pure

Returns: real(kind=R8P)

fortran
function correction_coefficients(self) result(c)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_numerics_object)inNumerics.

Call graph

correction_threshold ​

Return the sensor threshold: the correction is kept at a face where the WENO weights ratio min_k w_k/d_k >= tau in every interpolated field on both sides; tau = 0 keeps it everywhere (sensor none).

Attributes: pure

Returns: real(kind=R8P)

fortran
function correction_threshold(self) result(tau)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_numerics_object)inNumerics.

Call graph

description ​

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(flume_numerics_object)inNumerics.

Call graph