integrator_euler_explicit Derived Type

type, public, extends(integrator_multistage_object) :: integrator_euler_explicit

type~~integrator_euler_explicit~~InheritsGraph type~integrator_euler_explicit integrator_euler_explicit type~integrand_object integrand_object type~integrand_object->type~integrator_euler_explicit buffer, stage type~integrator_multistage_object integrator_multistage_object type~integrand_object->type~integrator_multistage_object buffer, stage type~integrator_multistage_object->type~integrator_euler_explicit type~integrator_object integrator_object type~integrator_object->type~integrator_multistage_object
Help


FOODIE integrator: provide explicit Euler scheme, it being 1st order accurate.



Components

TypeVisibility AttributesNameInitial
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.

integer(kind=I_P), public :: registers

Number of registers used for stages.

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

Stages.

integer(kind=I_P), public :: stages

Number of stages.


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_multistage

Assign members of integrator_multistage_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_euler_explicit), 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_euler_explicit), intent(inout) :: self

    Integrator.

procedure, public, pass(self) :: destroy_abstract

Destroy only members of abstract integrator_object type.

procedure, public, pass(self) :: destroy_multistage

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_euler_explicit), intent(in) :: self

    Integrator.

    Return Value logical

    Inquire result.

procedure, public, pass(self) :: initialize

Initialize (create) the integrator.

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

    Create the actual RK integrator: initialize the Butcher' table coefficients.

    Arguments

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

    Integrator.

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

    Selected scheme.

    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, new_Dt)

    Integrate field with explicit Euler scheme, 1st order.

    Arguments

    Type IntentOptional AttributesName
    class(integrator_euler_explicit), 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.

    real(kind=R_P), intent(out), optional :: new_Dt

    New adapted time step.

procedure, public, pass(self) :: integrate_fast

Integrate integrand field, fast mode.

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

    Integrate field with explicit Euler scheme, 1st order, fast mode.

    Arguments

    Type IntentOptional AttributesName
    class(integrator_euler_explicit), 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.

    real(kind=R_P), intent(out), optional :: new_Dt

    New adapted time step.

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_multistage_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_multistage_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_euler_explicit), 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_multistage_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_multistage_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_euler_explicit), 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.

Source Code

type, extends(integrator_multistage_object) :: integrator_euler_explicit
  !< FOODIE integrator: provide explicit Euler scheme, it being 1st order accurate.
  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.
endtype integrator_euler_explicit