ode_equations Module

Module that defines an ODE equation. It is derived from the equation class and provides the routines that are common for all ODE equation systems while deferring implementation of the routines that are specific to a given ODE equation system.

The implementation is found in submodule_ode_equations_implementation.f90.


Uses

  • module~~ode_equations~~UsesGraph module~ode_equations ode_equations module~kinds kinds module~ode_equations->module~kinds module~equations equations module~ode_equations->module~equations module~equations->module~kinds

Used by

  • module~~ode_equations~~UsedByGraph module~ode_equations ode_equations module~osculating_schwarzschild osculating_schwarzschild module~osculating_schwarzschild->module~ode_equations module~ode_equations_implementation ode_equations_implementation module~ode_equations_implementation->module~ode_equations module~geodesic_schwarzschild geodesic_schwarzschild module~geodesic_schwarzschild->module~ode_equations module~osculating_schwarzschild_implementation osculating_schwarzschild_implementation module~osculating_schwarzschild_implementation->module~osculating_schwarzschild module~geodesic_schwarzschild_implementation geodesic_schwarzschild_implementation module~geodesic_schwarzschild_implementation->module~geodesic_schwarzschild program~test test program~test->module~osculating_schwarzschild program~test->module~geodesic_schwarzschild

Contents


Interfaces

interface

  • public module subroutine ode_set_to_zero(this, dest)

    The interface for the ODE version of set_to_zero. This interface is consistent with eq_set_to_zero_interface.

    Arguments

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

interface

  • public module subroutine ode_update_vars(this, source, dest, source2, scalar, scalar2)

    The interface for the ODE version of update_vars. This interface is consistent with eq_update_vars_interface.

    Arguments

    Type IntentOptional AttributesName
    class(ode_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.

interface

  • public module subroutine ode_print_data(this)

    The interface for the ODE version of print_data. This interface is consistent with eq_print_data.

    Arguments

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

    The routine is called on this equation.


Abstract Interfaces

abstract interface

  • public subroutine ode_eq_init_interface(this)

    The interface for the ODE version of init. This interface is consistent with eq_init_interface.

    Arguments

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

    The equation that is being initialized.

abstract interface

  • public subroutine ode_eq_rhs_interface(this)

    The interface for the ODE version of rhs. This interface is consistent with eq_rhs_interface.

    Arguments

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

    The equation for which the RHS is calculated.

abstract interface

  • public subroutine ode_eq_save_globals_1(this)

    The interface for the ODE version of save_globals_1. This interface is consistent with eq_save_globals_1.

    Arguments

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

    The routine is called on this equation.

abstract interface

  • public subroutine ode_eq_save_globals_2(this)

    The interface for the ODE version of save_globals_2. This interface is consistent with eq_save_globals_2.

    Arguments

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

    The routine is called on this equation.

abstract interface

  • public subroutine ode_eq_load_globals(this)

    The interface for the ODE version of load_globals. This interface is consistent with eq_load_globals.

    Arguments

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

    The routine is called on this equation.

abstract interface

  • public subroutine ode_eq_output(this)

    The interface for the ODE version of output. This interface is consistent with eq_output.

    Arguments

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

    The routine is called on this equation.


Derived Types

type, public, abstract, extends(equation) :: ode_equation

A class derived from equation specific for ODE equations.

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

integer(kind=ip), public :: nvars

The number of variables in the ODE system.

real(kind=wp), public, dimension(:), allocatable:: var_data

A 1d array of reals that contains the data variables.

real(kind=wp), public, dimension(:), allocatable:: rhs_data

A 1d array of reals that contains the RHS variables.

real(kind=wp), public, dimension(:,:), allocatable:: tmp_data

A 2d array of reals that contains the temporary variables needed by the time integrator.

integer(kind=ip), public :: io_id

The file unit id used for output for this system of ODE's.

Type-Bound Procedures

procedure(ode_eq_init_interface), public, pass :: init

The init routine is deferred.

procedure(ode_eq_rhs_interface), public, pass :: rhs

The rhs routine is deferred.

procedure, public :: set_to_zero => ode_set_to_zero

The set_to_zero routine is provided by ode_set_to_zero.

procedure, public :: update_vars => ode_update_vars

The update_vars routine is provided by ode_update_vars.

procedure(ode_eq_save_globals_1), public, pass :: save_globals_1

The save_globals_1 routine is deferred.

procedure(ode_eq_save_globals_2), public, pass :: save_globals_2

The save_globals_2 routine is deferred.

procedure(ode_eq_load_globals), public, pass :: load_globals

The load_globals routine is deferred.

procedure(ode_eq_output), public, pass :: output

The output routine is deferred.

procedure, public :: print_data => ode_print_data

The print_data routine is provided by ode_print_data.