equation Derived Type

type, public, abstract :: equation

An abstract equation interface.


Inherited by

type~~equation~~InheritedByGraph type~equation equation type~cpde_equation cpde_equation type~cpde_equation->type~equation type~equation_pointer equation_pointer type~equation_pointer->type~equation p type~ode_equation ode_equation type~ode_equation->type~equation type~circular_orbit circular_orbit type~circular_orbit->type~equation type~integrator integrator type~integrator->type~equation_pointer eqs type~scal_schw scal_schw type~scal_schw->type~cpde_equation type~osc_schw osc_schw type~osc_schw->type~ode_equation type~geod_schw geod_schw type~geod_schw->type~ode_equation type~abmv5 abmv5 type~abmv5->type~integrator type~rk5 rk5 type~rk5->type~integrator type~rk4 rk4 type~rk4->type~integrator type~sf_observer sf_observer type~sf_observer->type~scal_schw p

Contents

Source Code


Components

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

The number of temporary storage variables to allocate.

character(len=:), public, allocatable:: ename

The name of the system of equations


Type-Bound Procedures

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

The initialization routine. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_init_interface(this) Prototype

    The initialization routine. There are no additional input arguments. The routine gets it's input from the run-time parameters.

    Arguments

    Type IntentOptional AttributesName
    class(equation), intent(inout), target:: this

    The equation that is being initialized.

procedure(eq_rhs_interface), public, deferred, pass :: rhs

The right hand side (RHS) routine. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_rhs_interface(this) Prototype

    The RHS routine that sets the RHS variables from the current state of the system.

    Arguments

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

    The equation for which the RHS is calculated.

procedure(eq_set_to_zero_interface), public, deferred, pass :: set_to_zero

Routine to set the main, rhs or temporary variables to zero. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_set_to_zero_interface(this, dest) Prototype

    Set either the main, RHS or temporary variables to zero.

    Arguments

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

    The routine is called on this equation.

    integer(kind=ip), intent(in) :: dest

    Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

procedure(eq_update_vars_interface), public, deferred, pass :: update_vars

Routine to update the main or temporary variables. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_update_vars_interface(this, source, dest, source2, scalar, scalar2) Prototype

    The routine that updates the variables defined in an equation. This is used to make the time integrator agnostic to how storage for the variables in the system of equations are set up.

    Read more…

    Arguments

    Type IntentOptional AttributesName
    class(equation), intent(inout), target:: this

    The routine is called on this equation.

    integer(kind=ip), intent(in) :: source

    The first source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    integer(kind=ip), intent(in) :: dest

    The destination for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    integer(kind=ip), intent(in), optional :: source2

    The second source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    real(kind=wp), intent(in), optional :: scalar

    The scalar multiplying the first source.

    real(kind=wp), intent(in), optional :: scalar2

    The scalar multiplying the second source.

procedure(eq_save_globals_1), public, deferred, pass :: save_globals_1

First of 2 routines to set global variables to interact with other equation systems. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_save_globals_1(this) Prototype

    The routine where the equation can set global variables (for communication with other equations) for the first time.

    Arguments

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

    The routine is called on this equation.

procedure(eq_save_globals_2), public, deferred, pass :: save_globals_2

Second of 2 routines to set global variables to interact with other equation systems. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_save_globals_2(this) Prototype

    The routine where the equation can set global variables (for communication with other equations) for the first time.

    Arguments

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

    The routine is called on this equation.

procedure(eq_load_globals), public, deferred, pass :: load_globals

Routine to get global variables from other equation systems. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_load_globals(this) Prototype

    The routine where the equation can get global variables (for communication with other equations).

    Arguments

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

    The routine is called on this equation.

procedure(eq_output), public, deferred, pass :: output

Routine to perform output of the equation systems variables. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_output(this) Prototype

    The routine where output of the equation's variables is done.

    Arguments

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

    The routine is called on this equation.

procedure(eq_print_data), public, deferred, pass :: print_data

Routine to perform debug output of the equation systems variables. Implementation is deferred to the derived class that actually implements an equation system.

  • subroutine eq_print_data(this) Prototype

    The routine where debug output (to stdout) of the equation's variables is done.

    Arguments

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

    The routine is called on this equation.

Source Code

  type, abstract :: equation
  !! An abstract equation interface.
    integer(ip) :: ntmp
    !! The number of temporary storage variables to allocate.
    character(:), allocatable :: ename
    !! The name of the system of equations
  contains
    procedure (eq_init_interface), deferred, pass :: init
    !! The initialization routine. Implementation is deferred to the
    !! derived class that actually implements an equation system.
    procedure (eq_rhs_interface), deferred, pass :: rhs
    !! The right hand side (RHS) routine. Implementation is deferred to the
    !! derived class that actually implements an equation system.
    procedure (eq_set_to_zero_interface), deferred, pass :: set_to_zero
    !! Routine to set the main, rhs or temporary variables to zero.
    !! Implementation is deferred to the derived class that actually
    !! implements an equation system.
    procedure (eq_update_vars_interface), deferred, pass :: update_vars
    !! Routine to update the main or temporary variables. Implementation is
    !! deferred to the derived class that actually implements an equation
    !! system.
    procedure (eq_save_globals_1), deferred, pass :: save_globals_1
    !! First of 2 routines to set global variables to interact with other
    !! equation systems. Implementation is deferred to the derived class that
    !! actually implements an equation system.
    procedure (eq_save_globals_2), deferred, pass :: save_globals_2
    !! Second of 2 routines to set global variables to interact with other
    !! equation systems. Implementation is deferred to the derived class that
    !! actually implements an equation system.
    procedure (eq_load_globals), deferred, pass :: load_globals
    !! Routine to get global variables from other equation systems.
    !! Implementation is deferred to the derived class that actually
    !! implements an equation system.
    procedure (eq_output), deferred, pass :: output
    !! Routine to perform output of the equation systems variables.
    !! Implementation is deferred to the derived class that actually
    !! implements an equation system.
    procedure (eq_print_data), deferred, pass :: print_data
    !! Routine to perform debug output of the equation systems variables.
    !! Implementation is deferred to the derived class that actually
    !! implements an equation system.
  end type equation