Appearance
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
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=8) | parameter | INI (config) file section name containing numerics configs. |
Derived Types
flume_numerics_object
FLUME numerics class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
scheme_space | character(len=:) | allocatable | Spatial scheme. |
reconstruction_variables | character(len=:) | allocatable | Variables reconstructed at cell interfaces. |
reflux | logical | Berger-Colella reflux at AMR coarse-fine faces. | |
riemann_solver | character(len=:) | allocatable | Riemann solver (weno-riemann only). |
flux_correction | character(len=:) | allocatable | Face flux correction order (weno-riemann only). |
flux_correction_sensor | character(len=:) | allocatable | Face flux correction sensor (weno-riemann only). |
positivity_limiter | character(len=:) | allocatable | Positivity limiter: none or cell. |
reflux_policy | character(len=:) | allocatable | Reflux policy (with reflux on): always or troubled (#68 E1). |
reflux_cadence | character(len=:) | allocatable | Reflux cadence (with reflux on): step or stage (#81 P5c). |
dissipative_order | integer(kind=I4P) | Order of the dissipative face fluxes, 2 or 4 (issue #65). |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
correction_coefficients | pass(self) | Return the face flux correction coefficients. |
correction_threshold | pass(self) | Return the face flux correction sensor threshold. |
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize numerics. |
load_from_file | pass(self) | Load config from file. |
Subroutines
initialize
Initialize numerics.
fortran
subroutine initialize(self, file_parameters)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_numerics_object) | inout | Numerics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_numerics_object) | inout | Numerics. | |
file_parameters | type(file_ini) | in | Simulation 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_numerics_object) | in | Numerics. |
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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_numerics_object) | in | Numerics. |
Call graph
description
Return a pretty-formatted object description.
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_numerics_object) | in | Numerics. |
Call graph