integrator Derived Type

type, public, abstract :: integrator

An abstract class that defines an equation time integrator.


Inherits

type~~integrator~~InheritsGraph type~integrator integrator type~equation_pointer equation_pointer type~integrator->type~equation_pointer eqs type~equation equation type~equation_pointer->type~equation p

Inherited by

type~~integrator~~InheritedByGraph type~integrator integrator type~abmv5 abmv5 type~abmv5->type~integrator type~rk5 rk5 type~rk5->type~integrator type~rk4 rk4 type~rk4->type~integrator

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
integer(kind=ip), public :: nequations

The number of equations to integrate.

class(equation_pointer), public, dimension(:), allocatable:: eqs

A 1d array of equation pointers. Will be of length nequations.


Type-Bound Procedures

procedure(integrator_ntemp_interface), public, deferred, pass :: ntemp

A procedure that allows an integrator to tell the equations how much temporary storage is needed.

  • function integrator_ntemp_interface(this) result(ntemp) Prototype

    The return value is the number of temporary storage levels are needed.

    Arguments

    Type IntentOptional AttributesName
    class(integrator), intent(in) :: this

    The routine is called on this object.

    Return Value integer(kind=ip)

    The number of temporary storage levels needed.

procedure(integrator_init_interface), public, deferred, pass :: init

A procedure that initializes an integrator.

  • subroutine integrator_init_interface(this, eqs) Prototype

    Initialize an integrator.

    Arguments

    Type IntentOptional AttributesName
    class(integrator), intent(inout) :: this

    The routine is called on this object.

    type(equation_pointer), intent(in), dimension(:):: eqs

    A 1d array of pointers to the equations that will be integrated.

procedure(integrator_step_interface), public, deferred, pass :: step

A procedure that takes one time step.

  • subroutine integrator_step_interface(this) Prototype

    Take a time step.

    Arguments

    Type IntentOptional AttributesName
    class(integrator), intent(inout) :: this

    The routine is called on this object.

procedure(integrator_shutdown_interface), public, deferred, pass :: shutdown

A procedure that shuts down an integrator.

  • subroutine integrator_shutdown_interface(this) Prototype

    Shut down this integrator.

    Arguments

    Type IntentOptional AttributesName
    class(integrator), intent(inout) :: this

    The routine is called on this object.

Source Code

  type, abstract :: integrator
  !! An abstract class that defines an equation time integrator.
    integer(ip) :: nequations
    !! The number of equations to integrate.
    class(equation_pointer), dimension(:), allocatable :: eqs
    !! A 1d array of equation pointers. Will be of length nequations.
  contains
    procedure (integrator_ntemp_interface), deferred, pass :: ntemp
    !! A procedure that allows an integrator to tell the equations how much
    !! temporary storage is needed.
    procedure (integrator_init_interface), deferred, pass :: init
    !! A procedure that initializes an integrator.
    procedure (integrator_step_interface), deferred, pass :: step
    !! A procedure that takes one time step.
    procedure (integrator_shutdown_interface), deferred, pass :: shutdown
    !! A procedure that shuts down an integrator.
  end type integrator