multistep_m Module

Time-integration methods based on multistep methods

multistep_storage_t: - takes care of storage and shift of data at previous timestep

karniadakis_t - Explicit part of time-stepping according to Karniadakis scheme - Implicit part not treated within this module but must be handled explicitly by yourself - Automatic order reduction for initial time-stepd - Generic implementation, i.e. independent of mesh, equilibria, variable, etc...


Used by


Contents


Interfaces

interface

  • public pure module function get_ndim(self)

    Returns ndim

    Arguments

    Type IntentOptional Attributes Name
    class(multistep_storage_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_nstorage(self)

    Returns nstorage

    Arguments

    Type IntentOptional Attributes Name
    class(multistep_storage_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_nfields(self)

    Returns nfields

    Arguments

    Type IntentOptional Attributes Name
    class(multistep_storage_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public module subroutine init_storage(self, ndim, nstorage, nfields, vstore_firsts)

    Initialises a Karniadakis scheme

    Arguments

    Type IntentOptional Attributes Name
    class(multistep_storage_t), intent(inout) :: self

    Instance of the type

    integer, intent(in) :: ndim

    Dimension of storage values

    integer, intent(in) :: nstorage

    Number of storage points

    integer, intent(in) :: nfields

    Number of fields to be stored

    real(kind=GP), intent(in), optional, dimension(ndim, nstorage, nfields) :: vstore_firsts

    Initial values for storage (default = 0)

interface

  • public module subroutine shift_storage(self, vals_new)

    Shifts storage and vals_new will be placed at vsore(:,1,:)

    Arguments

    Type IntentOptional Attributes Name
    class(multistep_storage_t), intent(inout) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%ndim, self%nfields) :: vals_new

    New storage value

interface

  • public module subroutine destructor_storage(self)

    Frees memory associated with multistep_storage

    Arguments

    Type IntentOptional Attributes Name
    type(multistep_storage_t), intent(inout) :: self

    Instance of the type

interface

  • public pure module function get_ncount(self)

    Returns ncount

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_order(self)

    Returns order that eventually approached (after initial time-steps)

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public pure module function get_current_order(self)

    Returns order used for last time-step

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

    Return Value integer

interface

  • public module function get_dtau(self)

    Returns dtau

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=gp)

interface

  • public module function get_dtau_bdf(self)

    Returns dtau_bdf

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

    Return Value real(kind=gp)

interface

  • public module subroutine init_karniadakis(self, ndim, order, dtau, y_firsts, dy_firsts)

    Initialises a Karniadakis scheme

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(inout) :: self

    Instance of the type

    integer, intent(in) :: ndim

    Dimension of problem

    integer, intent(in) :: order

    Order of time-stepping scheme

    real(kind=GP), intent(in) :: dtau

    Time step size

    real(kind=GP), intent(in), optional, dimension(ndim, order-1) :: y_firsts

    Values for initial time steps in descending order

    real(kind=GP), intent(in), optional, dimension(ndim, order-1) :: dy_firsts

    Right hand side for initial time-steps in descending order

interface

  • public module subroutine advance(self, dy, y, yn, dbgout)

    Advances variable from t -> t+1

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(inout) :: self

    Instance of the type

    real(kind=GP), intent(in), dimension(self%ndim) :: dy

    Right hand side of differential equation at time-step t

    real(kind=GP), intent(in), dimension(self%ndim) :: y

    Variable at time point t, on output advanced to t+1

    real(kind=GP), intent(out), dimension(self%ndim) :: yn

    Variable advanced to time point t+1

    integer, intent(in), optional :: dbgout

    debug output level, default: 0

interface

  • public module subroutine display_karniadakis(self)

    Displays basic information of karniadakis

    Arguments

    Type IntentOptional Attributes Name
    class(karniadakis_t), intent(in) :: self

    Instance of the type

interface

  • public module subroutine destructor_karniadakis(self)

    Frees memory associated with karniadakis

    Arguments

    Type IntentOptional Attributes Name
    type(karniadakis_t), intent(inout) :: self

    Instance of the type


Derived Types

type, public ::  multistep_storage_t

Datatype for storage

Components

Type Visibility Attributes Name Initial
real(kind=GP), public, allocatable, dimension(:,:,:) :: vstore

Values of storage (ndim, nstorage, nfields)

Finalizations Procedures

final :: destructor_storage

Type-Bound Procedures

procedure , public :: init_storage Interface
procedure , public :: get_ndim Interface
procedure , public :: get_nstorage Interface
procedure , public :: get_nfields Interface
procedure , public :: shift_storage Interface

type, public, extends(multistep_storage_t) ::  karniadakis_t

Datatype for karniadakis

Components

Type Visibility Attributes Name Initial
real(kind=GP), public, allocatable, dimension(:,:,:) :: vstore

Values of storage (ndim, nstorage, nfields)

Finalizations Procedures

final :: destructor_karniadakis

Type-Bound Procedures

procedure , public :: init_storage Interface
procedure , public :: get_ndim Interface
procedure , public :: get_nstorage Interface
procedure , public :: get_nfields Interface
procedure , public :: shift_storage Interface
procedure , public :: init => init_karniadakis Interface
procedure , public :: get_ncount Interface
procedure , public :: get_order Interface
procedure , public :: get_current_order Interface
procedure , public :: get_dtau Interface
procedure , public :: get_dtau_bdf Interface
procedure , public :: advance Interface
procedure , public :: display => display_karniadakis Interface