Appearance
adam_leapfrog_object
ADAM, leapfrog class definition.
Considering the following ODE system:
where (U_t = \frac{dU}{dt}), U is the vector of state variables being a function of the time-like independent variable t, R is the (vectorial) residual function, the leapfrog class scheme implemented (see [3]) is:
Optionally, the Robert-Asselin-Williams (RAW) filter (see [3]) is applied to the computed integration steps:
Note that for (\alpha=1) the filter reverts back to the standard Robert-Asselin scheme. The filter coefficients should be taken as (\nu \in (0,1]) and (\alpha \in (0.5,1]). The default values are
- (\nu=0.01)
- (\alpha=0.53)
@note The value of (\Delta t) must be provided, it not being computed by the integrator.
The schemes are explicit. The filter coefficients (\nu,,\alpha ) define the actual scheme.
Bibliography
[1] The integration of a low order spectral form of the primitive meteorological equations, Robert, A. J., J. Meteor. Soc. Japan,vol. 44, pages 237--245, 1966.
[2] Frequency filter for time integrations, Asselin, R., Monthly Weather Review, vol. 100, pages 487--490, 1972.
[3] The RAW filter: An improvement to the Robert–Asselin filter in semi-implicit integrations, Williams, P.D., Monthly Weather Review, vol. 139(6), pages 1996--2007, June 2011.
Source: src/lib/common/adam_leapfrog_object.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=8) | parameter | INI (config) file section name containing time configs. |
Derived Types
leapfrog_object
Leapforg class definition.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
nu | real(kind=R8P) | Robert-Asselin filter coefficient. | |
alpha | real(kind=R8P) | Robert-Asselin-Williams filter coefficient. | |
is_filtered | logical | Flag to check if the integration if RAW filtered. | |
q_old | real(kind=R8P) | allocatable | Field cell centered variables, old time steps. |
field | type(field_object) | pointer | The field. |
grid | type(grid_object) | pointer | The grid. |
ngc | integer(kind=I4P) | pointer | Number of ghost cells. |
ni | integer(kind=I4P) | pointer | Number of cells in i direction. |
nj | integer(kind=I4P) | pointer | Number of cells in j direction. |
nk | integer(kind=I4P) | pointer | Number of cells in k direction. |
nb | integer(kind=I4P) | pointer | Total blocks number for MPI. |
blocks_number | integer(kind=I4P) | pointer | Actual blocks number. |
ns | integer(kind=I4P) | pointer | Number of fluids specie. |
nv | integer(kind=I4P) | pointer | Number of conservative variables. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
assign_step | pass(self) | Assign q to old steps. |
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize class. |
integrate | pass(self) | Integrate. |
load_from_file | pass(self) | Load config from file. |
Subroutines
assign_step
Assign q to leapfrog old step.
fortran
subroutine assign_step(self, s, q, phi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(leapfrog_object) | inout | Leapfrog object. | |
s | integer(kind=I4P) | in | Current step number. | |
q | real(kind=R8P) | in | Conservative variables. | |
phi | real(kind=R8P) | in | optional | IB distance. |
Call graph
initialize
Initialize class.
fortran
subroutine initialize(self, file_parameters, scheme, grid, field)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(leapfrog_object) | inout | Leapfrog object. | |
file_parameters | type(file_ini) | in | optional | Simulation parameters ini file handler. |
scheme | character(len=*) | in | optional | Runge-Kutta scheme. |
grid | type(grid_object) | in | target | The grid. |
field | type(field_object) | in | target | The field. |
Call graph
integrate
Integrate.
fortran
subroutine integrate(self, dt, q, dq)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(leapfrog_object) | inout | Leapfrog object. | |
dt | real(kind=R8P) | in | Time step. | |
q | real(kind=R8P) | inout | Conservative variables. | |
dq | real(kind=R8P) | in | Residuals. |
Call graph
load_from_file
Load config from file.
fortran
subroutine load_from_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(leapfrog_object) | inout | Leapfrog object. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
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(leapfrog_object) | in | Leapfrog object. |
Call graph