integrator_lmm_ssp_vss Derived Type

type, public, extends(integrator_multistep_object) :: integrator_lmm_ssp_vss

type~~integrator_lmm_ssp_vss~~InheritsGraph type~integrator_lmm_ssp_vss integrator_lmm_ssp_vss type~integrand_object integrand_object type~integrand_object->type~integrator_lmm_ssp_vss buffer, previous type~integrator_multistep_object integrator_multistep_object type~integrand_object->type~integrator_multistep_object buffer, previous type~integrator_multistep_object->type~integrator_lmm_ssp_vss type~integrator_object integrator_object type~integrator_object->type~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.



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.

  • private subroutine check_error(self, is_severe)

    Check for error occurencies.

    Arguments

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

    Integrator.

    logical, intent(in), optional :: is_severe

    Flag to activate severe faliure, namely errors trigger a stop.

procedure, public, pass(self) :: class_name

Return the class name of schemes.

  • 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.

procedure, public, pass(self) :: description

Return informative integrator description.

  • private pure function description(self, prefix) result(desc)

    Return informative integrator description.

    Arguments

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

    Integrator.

    character(len=*), intent(in), optional :: prefix

    Prefixing string.

    Return Value character(len=:), allocatable

    Description.

procedure, public, pass(self) :: destroy

Destroy the integrator.

  • private elemental subroutine destroy(self)

    Destroy the integrator.

    Arguments

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

    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.

  • 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.

procedure, public, pass(self) :: initialize

Initialize (create) the 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.

procedure, public, pass(lhs) :: integr_assign_integr

Operator =.

procedure, public, pass(self) :: integrate

Integrate integrand field.

  • 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.

procedure, public, pass(self) :: integrate_fast

Integrate integrand field, fast mode.

  • 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.

procedure, private, pass(self) :: integrate_order_2

Integrate integrand field by 2nd order formula.

  • 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.

procedure, private, pass(self) :: integrate_order_2_fast

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

  • 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.

procedure, private, pass(self) :: integrate_order_3

Integrate integrand field by 3rd order formula.

  • 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.

procedure, private, pass(self) :: integrate_order_3_fast

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

  • 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.

procedure, public, pass(self) :: is_multistage

Return .true. for multistage integrator.

  • private elemental function is_multistage(self)

    Return .true. for multistage integrator.

    Arguments

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

    Integrator.

    Return Value logical

    Inquire result.

procedure, public, pass(self) :: is_multistep

Return .true. for multistep integrator.

  • private elemental function is_multistep(self)

    Return .true. for multistage integrator.

    Arguments

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

    Integrator.

    Return Value logical

    Inquire result.

procedure, public, pass(self) :: is_supported

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

  • 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.

procedure, public, pass(self) :: stages_number

Return number of stages used.

  • private elemental function stages_number(self)

    Return number of stages used.

    Arguments

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

    Integrator.

    Return Value integer(kind=I_P)

    Number of stages used.

procedure, public, pass(self) :: steps_number

Return number of steps used.

  • private elemental function steps_number(self)

    Return number of steps used.

    Arguments

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

    Integrator.

    Return Value integer(kind=I_P)

    Number of steps used.

procedure, public, pass(self) :: supported_schemes

Return the list of supported schemes.

  • 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.

procedure, public, pass(self) :: trigger_error

Trigger an error.

  • private subroutine trigger_error(self, error, error_message, is_severe)

    Check for error occurencies.

    Arguments

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

    Integrator.

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

    Error status code.

    character(len=*), intent(in), optional :: error_message

    Error message, hopefully meaningful.

    logical, intent(in), optional :: is_severe

    Flag to activate severe faliure, namely errors trigger a stop.

procedure, public, nopass :: update_previous

Cyclic update previous time steps.

  • private subroutine update_previous(U, previous, Dt, t, previous_Dt, previous_t)

    Cyclic update previous time steps.

    Arguments

    Type IntentOptional AttributesName
    class(integrand_object), intent(in) :: U

    Field to be integrated.

    class(integrand_object), intent(inout) :: previous(1:)

    Previous time steps solutions of integrand.

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

    Time step.

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

    Time.

    real(kind=R_P), intent(inout), optional :: previous_Dt(1:)

    Time step.

    real(kind=R_P), intent(inout), optional :: previous_t(1:)

    Time.

Source Code

type, extends(integrator_multistep_object) :: integrator_lmm_ssp_vss
  !< 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.
  !<
  !< @note The integrator must be created or initialized before used.
  private
  procedure(integrate_interface),      pointer :: integrate_ => integrate_order_2           !< Integrate integrand field.
  procedure(integrate_fast_interface), pointer :: integrate_fast_ => integrate_order_2_fast !< Integrate integrand field, fast.
  contains
    ! deferred methods
    procedure, pass(self) :: class_name           !< Return the class name of schemes.
    procedure, pass(self) :: has_fast_mode        !< Return .true. if the integrator class has *fast mode* integrate.
    procedure, pass(lhs)  :: integr_assign_integr !< Operator `=`.
    procedure, pass(self) :: integrate            !< Integrate integrand field.
    procedure, pass(self) :: integrate_fast       !< Integrate integrand field, fast mode.
    procedure, pass(self) :: is_supported         !< Return .true. if the integrator class support the given scheme.
    procedure, pass(self) :: supported_schemes    !< Return the list of supported schemes.
    ! public methods
    procedure, pass(self) :: destroy    !< Destroy the integrator.
    procedure, pass(self) :: initialize !< Initialize (create) the integrator.
    ! private methods
    procedure, pass(self), private :: integrate_order_2      !< Integrate integrand field by 2nd order formula.
    procedure, pass(self), private :: integrate_order_3      !< Integrate integrand field by 3rd order formula.
    procedure, pass(self), private :: integrate_order_2_fast !< Integrate integrand field by 2nd order formula, fast mode.
    procedure, pass(self), private :: integrate_order_3_fast !< Integrate integrand field by 3rd order formula, fast mode.
endtype integrator_lmm_ssp_vss