Skip to content

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.

fortran
 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
SchemeSubstepsOrderComposition (flow 1 first)
lie21field h, flow h (first=OPERATOR_FLOW: flow h, field h)
strang32flow 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-s107, 13, 214, 4, 6the 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 ​

NameTypeAttributesDescription
OPERATOR_FIELDinteger(kind=I4P)parameterThe field step: the stepper.
OPERATOR_FLOWinteger(kind=I4P)parameterThe caller's flow.
SCHEME_LIEcharacter(len=*)parameterLie (Lie–Trotter) splitting, order 1.
ADDITIVE_SCHEMEScharacter(len=15)parameterEvery scheme.

Derived Types ​

additive_splitting ​

A composition of the field step and the caller's flow.

Components

NameTypeAttributesDescription
schemecharacter(len=:)allocatableScheme name.
sctype(splitting_composition)Composition: partition 1 = OPERATOR_FIELD, 2 = OPERATOR_FLOW.

Type-Bound Procedures

NameAttributesDescription
initializepass(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).
substepspass(self)Substeps of a step.
substep_operatorpass(self)The operator of substep m: OPERATOR_FIELD (a step of the stepper) or OPERATOR_FLOW (the caller's flow).
substep_fractionpass(self)The length of substep m as a fraction of the step (negative: a backward substep, see backward).
substep_timepass(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).
orderpass(self)The order of the composition with exact sub-flows.
backwardpass(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).

fortran
subroutine initialize(self, scheme, first, reversible)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inoutSplitting.
schemecharacter(len=*)inScheme name (ADDITIVE_SCHEMES).
firstinteger(kind=I4P)inoptionalOPERATOR_FIELD or OPERATOR_FLOW.
reversiblelogicalinoptionalBoth operators may run backward (default .false.).

Call graph

additive_splitting%substeps ​

Substeps of a step.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function substeps(self) result(n)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.

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)

fortran
function substep_operator(self, m) result(op)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.
minteger(kind=I4P)inSubstep.

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)

fortran
function substep_fraction(self, m) result(c)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.
minteger(kind=I4P)inSubstep.

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)

fortran
function substep_time(self, m) result(c)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.
minteger(kind=I4P)inSubstep.

additive_splitting%order ​

The order of the composition with exact sub-flows.

Attributes: pure

Returns: integer(kind=I4P)

fortran
function order(self) result(p)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.

additive_splitting%backward ​

Some substep runs backward in time: admissible for reversible flows only.

Attributes: pure

Returns: logical

fortran
function backward(self) result(yes)

Arguments

NameTypeIntentAttributesDescription
selfclass(additive_splitting)inSplitting.

GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT, at your choice