tvd_runge_kutta_integrator Derived Type

type, public :: tvd_runge_kutta_integrator

TVD RK integrator.



Components

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

\(\alpha\) Butcher's coefficients.

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

\(\beta\) Butcher's coefficients.

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

\(\gamma\) Butcher's coefficients.

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

Number of stages.


Type-Bound Procedures

procedure, public, pass(self) :: destroy => destroy_rk

Destroy the integrator.

  • private elemental subroutine destroy_rk(self)

    Destoy the integrator.

    Arguments

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

    Integrator.

procedure, public, pass(self) :: init => init_rk

Initialize (create) the integrator.

  • private elemental subroutine init_rk(self, stages)

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

    Arguments

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

    RK integrator.

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

    Number of stages used.

procedure, public, pass(self) :: integrate => integrate_rk

Integrate integrand field.

  • private subroutine integrate_rk(self, U, stage, Dt, t)

    Integrate field with explicit TVD (or SSP) Runge-Kutta scheme.

    Arguments

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

    Actual RK integrator.

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

    Field to be integrated.

    class(euler_1D_caf_nf), intent(inout) :: stage(1:)

    Runge-Kutta stages [1:stages].

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

    Time step.

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

    Time.

Source Code

type :: tvd_runge_kutta_integrator
  !< TVD RK integrator.
  !<
  !< @note The integrator must be created or initialized (initialize the RK coeficients) before used.
  integer(I_P)           :: stages=0  !< Number of stages.
  real(R_P), allocatable :: alph(:,:) !< \(\alpha\) Butcher's coefficients.
  real(R_P), allocatable :: beta(:)   !< \(\beta\) Butcher's coefficients.
  real(R_P), allocatable :: gamm(:)   !< \(\gamma\) Butcher's coefficients.
  contains
    procedure, pass(self), public :: destroy => destroy_rk     !< Destroy the integrator.
    procedure, pass(self), public :: init => init_rk           !< Initialize (create) the integrator.
    procedure, pass(self), public :: integrate => integrate_rk !< Integrate integrand field.
endtype tvd_runge_kutta_integrator