foodie_integrator_lmm_ssp_vss Module

module~~foodie_integrator_lmm_ssp_vss~~UsesGraph module~foodie_integrator_lmm_ssp_vss foodie_integrator_lmm_ssp_vss module~foodie_integrator_object foodie_integrator_object module~foodie_integrator_object->module~foodie_integrator_lmm_ssp_vss module~foodie_integrator_multistep_object foodie_integrator_multistep_object module~foodie_integrator_object->module~foodie_integrator_multistep_object module~foodie_integrator_multistep_object->module~foodie_integrator_lmm_ssp_vss penf penf penf->module~foodie_integrator_lmm_ssp_vss penf->module~foodie_integrator_object penf->module~foodie_integrator_multistep_object module~foodie_error_codes foodie_error_codes penf->module~foodie_error_codes module~foodie_integrand_object foodie_integrand_object penf->module~foodie_integrand_object module~foodie_error_codes->module~foodie_integrator_lmm_ssp_vss module~foodie_integrand_object->module~foodie_integrator_lmm_ssp_vss module~foodie_integrand_object->module~foodie_integrator_multistep_object iso_fortran_env iso_fortran_env iso_fortran_env->module~foodie_integrator_object iso_fortran_env->module~foodie_integrator_multistep_object
Help

FOODIE integrator: provide an explicit class of Linear Multi-step Methods (LLM) with Strong Stability Preserving property and variable stepsize (VSS), from 2nd to 3rd order accurate.

Considering the following ODE system:

$$ U_t = R(t,U) $$

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 LMM-SSP class scheme implemented is:

Second order formula

$$ U^{n+N_s} = \frac{1}{\Omega_{N_s-1}^2} U^n + \frac{\Omega_{N_s-1}^2 - 1}{\Omega_{N_s-1}^2} U^{n+N_s-1} + \frac{\Omega_{N_s-1} + 1}{\Omega_{N_s-1}} \Delta t^{n+N_s} R(U^{n+N_s-1}) $$

Third order formula

$$ U^{n+N_s} = \frac{3 \Omega_{N_s-1} + 2}{\Omega_{N_s-1}^3} U^n + \frac{(\Omega_{N_s-1} + 1)^2(\Omega_{N_s-1} - 2)}{\Omega_{N_s-1}^3} U^{n+N_s-1} + \frac{\Omega_{N_s-1} + 1}{\Omega_{N_s-1}^2} \Delta t^{n+N_s} R(U^n) + \frac{(\Omega_{N_s-1} + 1)^2}{\Omega_{N_s-1}^2} \Delta t^{n+N_s} R(U^{n+N_s-1}) $$

where \(N_s\) is the number of previous steps considered and

$$ \Omega_s = \sum_{i=1}^s { \omega_i }\quad 1 \leq s \leq N_s $$ $$ \omega_i = \frac{\Delta t^{n + s}}{\Delta t^{n + N_s}} $$

The schemes are explicit.

Bibliography

[1] Strong Stability Preserving Explicit Linear Multistep Methods with Variable Step Size, Y. Hadjmichael, D. Ketcheson, L. Loczi, A. Nemeth, 2016, SIAM, Vol. 54, N. 5, pp. 2799-2832.

Used By

module~~foodie_integrator_lmm_ssp_vss~~UsedByGraph module~foodie_integrator_lmm_ssp_vss foodie_integrator_lmm_ssp_vss module~foodie foodie module~foodie_integrator_lmm_ssp_vss->module~foodie program~integrate_burgers integrate_burgers module~foodie->program~integrate_burgers program~integrate_lorenz integrate_lorenz module~foodie->program~integrate_lorenz module~type_euler_1d type_euler_1D module~foodie->module~type_euler_1d module~foodie_test_integrand_tester_object foodie_test_integrand_tester_object module~foodie->module~foodie_test_integrand_tester_object module~foodie_test_lcce_test foodie_test_lcce_test module~foodie->module~foodie_test_lcce_test module~type_euler_1d_openmp type_euler_1D_openmp module~foodie->module~type_euler_1d_openmp program~integrate_euler_1d_caf~2 integrate_euler_1D_caf module~foodie->program~integrate_euler_1d_caf~2 module~foodie_test_oscillation_test foodie_test_oscillation_test module~foodie->module~foodie_test_oscillation_test program~integrate_euler_1d integrate_euler_1D module~foodie->program~integrate_euler_1d module~foodie_test_object foodie_test_object module~foodie->module~foodie_test_object module~foodie_test_integrand_oscillation foodie_test_integrand_oscillation module~foodie->module~foodie_test_integrand_oscillation module~foodie_test_integrand_lcce foodie_test_integrand_lcce module~foodie->module~foodie_test_integrand_lcce module~type_euler_1d_caf type_euler_1D_caf module~foodie->module~type_euler_1d_caf module~type_burgers type_burgers module~foodie->module~type_burgers module~foodie_test_integrand_ladvection foodie_test_integrand_ladvection module~foodie->module~foodie_test_integrand_ladvection program~integrate_euler_1d_openmp integrate_euler_1D_openmp module~foodie->program~integrate_euler_1d_openmp module~type_lorenz type_lorenz module~foodie->module~type_lorenz module~type_euler_1d->program~integrate_euler_1d module~foodie_test_integrand_tester_object->module~foodie_test_object module~foodie_test_integrand_tester_object->module~foodie_test_integrand_oscillation module~foodie_test_integrand_tester_object->module~foodie_test_integrand_lcce module~foodie_test_integrand_tester_object->module~foodie_test_integrand_ladvection program~foodie_test_lcce foodie_test_lcce module~foodie_test_lcce_test->program~foodie_test_lcce module~type_euler_1d_openmp->program~integrate_euler_1d_openmp program~foodie_test_oscillation foodie_test_oscillation module~foodie_test_oscillation_test->program~foodie_test_oscillation program~foodie_tester foodie_tester module~foodie_test_object->program~foodie_tester module~foodie_test_integrand_oscillation->module~foodie_test_oscillation_test module~foodie_test_integrand_oscillation->module~foodie_test_object module~foodie_test_integrand_lcce->module~foodie_test_lcce_test module~foodie_test_integrand_lcce->module~foodie_test_object module~type_euler_1d_caf->program~integrate_euler_1d_caf~2 module~type_burgers->program~integrate_burgers module~foodie_test_integrand_ladvection->module~foodie_test_object module~type_lorenz->program~integrate_lorenz
Help


Variables

TypeVisibility AttributesNameInitial
character(len=99), private, parameter:: class_name_ ='lmm_ssp_vss'

Name of the class of schemes.

logical, private, parameter:: has_fast_mode_ =.true.

Flag to check if integrator provides fast mode integrate.

character(len=99), private, parameter:: supported_schemes_(1:5) =[trim(class_name_)//'_steps_2_order_2', trim(class_name_)//'_steps_3_order_2', trim(class_name_)//'_steps_3_order_3', trim(class_name_)//'_steps_4_order_3', trim(class_name_)//'_steps_5_order_3']

List of supported schemes.


Abstract Interfaces

abstract interface

Abstract interfaces of integrator_lmm_ssp_vss methods.

  • private subroutine integrate_fast_interface(self, U, Dt, t)

    Integrate field with LMM-SSP class scheme.

    Arguments

    Type IntentOptional AttributesName
    class(integrator_lmm_ssp_vss), intent(inout) :: self

    Integrator.

    class(integrand_object), intent(inout) :: U

    Field to be integrated.

    real(kind=R_P), intent(in) :: Dt

    Time step.

    real(kind=R_P), intent(in) :: t

    Time.

abstract interface

Abstract interfaces of integrator_lmm_ssp_vss methods.

  • private subroutine integrate_interface(self, U, Dt, t)

    Integrate field with LMM-SSP class scheme.

    Arguments

    Type IntentOptional AttributesName
    class(integrator_lmm_ssp_vss), intent(inout) :: self

    Integrator.

    class(integrand_object), intent(inout) :: U

    Field to be integrated.

    real(kind=R_P), intent(in) :: Dt

    Time step.

    real(kind=R_P), intent(in) :: t

    Time.


Derived Types

FOODIE integrator: provide an explicit class of Linear Multi-step Methods (LLM) with Strong Stability Preserving property and variable stepsize (VSS), from 2nd to 3rd order accurate.

Components

TypeVisibility AttributesNameInitial
real(kind=R_P), public, allocatable:: Dt(:)

Previous time steps.

logical, public :: autoupdate

Perform cyclic autoupdate of previous time steps buffers.

class(integrand_object), public, allocatable:: buffer

Buffer used for fast integration.

character(len=:), public, allocatable:: description_

Informative description of the integrator.

integer(kind=I_P), public :: error =0

Error status code.

character(len=:), public, allocatable:: error_message

Error message, hopefully meaningful.

procedure(integrate_interface), private, pointer:: integrate_=> integrate_order_2

Integrate integrand field.

procedure(integrate_fast_interface), private, pointer:: integrate_fast_=> integrate_order_2_fast

Integrate integrand field, fast.

integer(kind=I_P), public :: iterations

Implicit iterations.

class(integrand_object), public, allocatable:: previous(:)

Previous steps.

integer(kind=I_P), public :: registers

Number of registers used for steps.

integer(kind=I_P), public :: steps

Number of time steps.

real(kind=R_P), public, allocatable:: t(:)

Previous times.

Type-Bound Procedures

procedure, public, pass(self) :: allocate_integrand_members

Allocate integrand members.

procedure, public, pass(lhs) :: assign_abstract

Assign ony members of abstract integrator_object type.

procedure, public, pass(lhs) :: assign_multistep

Assign members of integrator_multistep_object and parents.

generic, public :: assignment(=) => integr_assign_integr

Overload =.

procedure, public, pass(self) :: check_error

Check for error occurrencies.

procedure, public, pass(self) :: class_name

Return the class name of schemes.

procedure, public, pass(self) :: description

Return informative integrator description.

procedure, public, pass(self) :: destroy

Destroy the integrator.

procedure, public, pass(self) :: destroy_abstract

Destroy only members of abstract integrator_object type.

procedure, public, pass(self) :: destroy_multistep

Destroy the integrator.

procedure, public, pass(self) :: has_fast_mode

Return .true. if the integrator class has fast mode integrate.

procedure, public, pass(self) :: initialize

Initialize (create) the integrator.

procedure, public, pass(lhs) :: integr_assign_integr

Operator =.

procedure, public, pass(self) :: integrate

Integrate integrand field.

procedure, public, pass(self) :: integrate_fast

Integrate integrand field, fast mode.

procedure, private, pass(self) :: integrate_order_2

Integrate integrand field by 2nd order formula.

procedure, private, pass(self) :: integrate_order_2_fast

Integrate integrand field by 2nd order formula, fast mode.

procedure, private, pass(self) :: integrate_order_3

Integrate integrand field by 3rd order formula.

procedure, private, pass(self) :: integrate_order_3_fast

Integrate integrand field by 3rd order formula, fast mode.

procedure, public, pass(self) :: is_multistage

Return .true. for multistage integrator.

procedure, public, pass(self) :: is_multistep

Return .true. for multistep integrator.

procedure, public, pass(self) :: is_supported

Return .true. if the integrator class support the given scheme.

procedure, public, pass(self) :: stages_number

Return number of stages used.

procedure, public, pass(self) :: steps_number

Return number of steps used.

procedure, public, pass(self) :: supported_schemes

Return the list of supported schemes.

procedure, public, pass(self) :: trigger_error

Trigger an error.

procedure, public, nopass :: update_previous

Cyclic update previous time steps.


Functions

private pure function class_name(self)

Return the class name of schemes.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(in) :: self

Integrator.

Return Value character(len=99)

Class name.

private pure function dt_ratio(Dt, s) result(ratio)

Return Dt(n+s)/Dt(n+Ns) ratio.

Arguments

Type IntentOptional AttributesName
real(kind=R_P), intent(in) :: Dt(:)

Time steps.

integer(kind=I_P), intent(in) :: s

Step index.

Return Value real(kind=R_P)

Time steps ratio.

private elemental function has_fast_mode(self)

Return .true. if the integrator class has fast mode integrate.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(in) :: self

Integrator.

Return Value logical

Inquire result.

private elemental function is_supported(self, scheme)

Return .true. if the integrator class support the given scheme.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(in) :: self

Integrator.

character(len=*), intent(in) :: scheme

Selected scheme.

Return Value logical

Inquire result.

private pure function omega(Dt, s)

Return omega=sum(dt_ratio(i)), i=1, s.

Arguments

Type IntentOptional AttributesName
real(kind=R_P), intent(in) :: Dt(:)

Time steps.

integer(kind=I_P), intent(in) :: s

Step index.

Return Value real(kind=R_P)

Omega sum.

private pure function supported_schemes(self) result(schemes)

Return the list of supported schemes.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(in) :: self

Integrator.

Return Value character(len=99), allocatable, (:)

Queried scheme.


Subroutines

private elemental subroutine destroy(self)

Destroy the integrator.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

private subroutine initialize(self, scheme, autoupdate, U, stop_on_fail)

Create the actual LMM-SSP-VSS integrator.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

character(len=*), intent(in) :: scheme

Selected scheme.

logical, intent(in), optional :: autoupdate

Enable cyclic autoupdate of previous time steps.

class(integrand_object), intent(in), optional :: U

Integrand molding prototype.

logical, intent(in), optional :: stop_on_fail

Stop execution if initialization fail.

private subroutine integr_assign_integr(lhs, rhs)

Operator =.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: lhs

Left hand side.

class(integrator_object), intent(in) :: rhs

Right hand side.

private subroutine integrate(self, U, Dt, t)

Integrate field with LMM-SSP class scheme.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.

private subroutine integrate_fast(self, U, Dt, t)

Integrate field with LMM-SSP class scheme, fast mode.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.

private subroutine integrate_order_2(self, U, Dt, t)

Integrate field with LMM-SSP-VSS 2nd order class scheme.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.

private subroutine integrate_order_2_fast(self, U, Dt, t)

Integrate field with LMM-SSP-VSS 2nd order class scheme, fast mode.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.

private subroutine integrate_order_3(self, U, Dt, t)

Integrate field with LMM-SSP-VSS 3rd order class scheme.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.

private subroutine integrate_order_3_fast(self, U, Dt, t)

Integrate field with LMM-SSP-VSS 3rd order class scheme, fast mode.

Arguments

Type IntentOptional AttributesName
class(integrator_lmm_ssp_vss), intent(inout) :: self

Integrator.

class(integrand_object), intent(inout) :: U

Field to be integrated.

real(kind=R_P), intent(in) :: Dt

Time step.

real(kind=R_P), intent(in) :: t

Time.