selah_additive_splitting
SELAH, L2: additive splitting of a field step and a caller's flow.
For (u' = F(u) + G(u)), where F is the residual the stepper integrates (the field step, a Runge–Kutta step) and G is a term the caller integrates itself (an exact or approximate sub-flow: radiative cooling with Townsend's exact flow, a stiff relaxation, a particle step), one step is a composition of the two operators' flows over fractions of the step. SELAH owns the composition (which operator, what fraction, at what time); the caller owns both flows.
call sp%initialize('strang')
do m=1, sp%substeps()
h = sp%substep_fraction(m) * dt ; tm = t + sp%substep_time(m) * dt
if (sp%substep_operator(m) == OPERATOR_FIELD) then
! one step of the stepper of length h, from time tm
else
! the caller's flow over h, from time tm
endif
enddo| Scheme | Substeps | Order | Composition (flow 1 first) |
|---|---|---|---|
lie | 2 | 1 | field h, flow h (first=OPERATOR_FLOW: flow h, field h) |
strang | 3 | 2 | flow h/2, field h, flow h/2 (first=OPERATOR_FIELD: field h/2, flow h, field h/2) |
yoshida-4, blanes-moan-s6, blanes-moan-s10 | 7, 13, 21 | 4, 4, 6 | the palindromes of selah_splittings |
Backward fractions. Every real splitting of order 3 or more has a negative fraction in each operator (Sheng 1989, Suzuki 1991, Goldman & Kaper 1996, Blanes & Casas 2005): a sub-flow run backward in time. That is fine for reversible flows (a particle Hamiltonian) and ill-posed for an irreversible one: an upwind or limited field step, cooling, relaxation, diffusion, accretion. initialize refuses such a scheme unless the caller declares both operators reversible (reversible=.true.); backward() tells.
Order. The order is the composition's when both sub-flows are exact, or each at least as accurate; the field step of a scheme of order p contributes its own (O(\Delta t^p)). With a stiff flow the composition may lose order (order reduction): see the verification of selah_test_additive_splitting.
Time. Each operator integrates its own time dependence over its substep (the field step through its stages' stage_time, the caller's flow from its start time), so each keeps its own clock: substep m starts at substep_time(m), the sum of the fractions of the same operator's substeps before m. This is the composition of the autonomous system (u, t_1, t_2)' = (F(u, t_1), 1, 0) + (G(u, t_2), 0, 1), whose exact solution keeps t_1 = t_2 = t: the composition keeps its order when either term or both depend on t. (The stepper's own splitting form differs: its sub-flows are Euler steps of one partition, which cannot carry time; its stage_time takes the other partition's fractions.)
Source: src/lib/selah_additive_splitting.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
OPERATOR_FIELD | integer(kind=I4P) | parameter | The field step: the stepper. |
OPERATOR_FLOW | integer(kind=I4P) | parameter | The caller's flow. |
SCHEME_LIE | character(len=*) | parameter | Lie (Lie–Trotter) splitting, order 1. |
ADDITIVE_SCHEMES | character(len=15) | parameter | Every scheme. |
Derived Types
additive_splitting
A composition of the field step and the caller's flow.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
scheme | character(len=:) | allocatable | Scheme name. |
sc | type(splitting_composition) | Composition: partition 1 = OPERATOR_FIELD, 2 = OPERATOR_FLOW. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
initialize | pass(self) | Set the composition; first is the operator of the first substep (default: the field for lie, ADAM's order, and the flow for the palindromes, so that the field step, the costly one, runs once in strang). A scheme with backward substeps stops the program unless reversible (see "Backward fractions" above). |
substeps | pass(self) | Substeps of a step. |
substep_operator | pass(self) | The operator of substep m: OPERATOR_FIELD (a step of the stepper) or OPERATOR_FLOW (the caller's flow). |
substep_fraction | pass(self) | The length of substep m as a fraction of the step (negative: a backward substep, see backward). |
substep_time | pass(self) | The time at which substep m starts, as a fraction of the step: the fractions of the same operator's substeps before m (see "Time" above). |
order | pass(self) | The order of the composition with exact sub-flows. |
backward | pass(self) | Some substep runs backward in time: admissible for reversible flows only. |
additive_splitting%initialize
Set the composition; first is the operator of the first substep (default: the field for lie, ADAM's order, and the flow for the palindromes, so that the field step, the costly one, runs once in strang). A scheme with backward substeps stops the program unless reversible (see "Backward fractions" above).
subroutine initialize(self, scheme, first, reversible)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | inout | Splitting. | |
scheme | character(len=*) | in | Scheme name (ADDITIVE_SCHEMES). | |
first | integer(kind=I4P) | in | optional | OPERATOR_FIELD or OPERATOR_FLOW. |
reversible | logical | in | optional | Both operators may run backward (default .false.). |
Call graph
additive_splitting%substeps
Substeps of a step.
Attributes: pure
Returns: integer(kind=I4P)
function substeps(self) result(n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. |
additive_splitting%substep_operator
The operator of substep m: OPERATOR_FIELD (a step of the stepper) or OPERATOR_FLOW (the caller's flow).
Attributes: pure
Returns: integer(kind=I4P)
function substep_operator(self, m) result(op)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. | |
m | integer(kind=I4P) | in | Substep. |
additive_splitting%substep_fraction
The length of substep m as a fraction of the step (negative: a backward substep, see backward).
Attributes: pure
Returns: real(kind=R_P)
function substep_fraction(self, m) result(c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. | |
m | integer(kind=I4P) | in | Substep. |
additive_splitting%substep_time
The time at which substep m starts, as a fraction of the step: the fractions of the same operator's substeps before m (see "Time" above).
Attributes: pure
Returns: real(kind=R_P)
function substep_time(self, m) result(c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. | |
m | integer(kind=I4P) | in | Substep. |
additive_splitting%order
The order of the composition with exact sub-flows.
Attributes: pure
Returns: integer(kind=I4P)
function order(self) result(p)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. |
additive_splitting%backward
Some substep runs backward in time: admissible for reversible flows only.
Attributes: pure
Returns: logical
function backward(self) result(yes)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(additive_splitting) | in | Splitting. |