ode Module

Module for solving first order explicit ordinary differential equations, expressed in the form: where, is the unknown function, is the independent variable and is the initial condition.


Used by

  • module~~ode~~UsedByGraph module~ode ode program~test_ode test_ode program~test_ode->module~ode

Functions

public function forward_euler(F, t, U0) result(U)

function for integrating vector first order ODEs of the form: using the forward (explicit) euler method.

Arguments

Type IntentOptional Attributes Name
public function F(U, t) result(dU)

function of the system

Arguments
Type IntentOptional Attributes Name
real, intent(in) :: U(:)

value of the unknown function

real, intent(in) :: t

independent variable

Return Value real, (size(U))

derivative of

real, intent(in) :: t(0:)

array of times where the numerical solution will be evaluated.

real, intent(in) :: U0(:)

initial conditions

Return Value real, (0:ubound(t,1),size(U0))

solution array such that the the row and column stands for the th component of the vector solution at time .

public function Runge_Kutta2(F, t, U0) result(U)

function for integrating vector first order ODEs of the form: using the Runke-Kutta (2) method.

Arguments

Type IntentOptional Attributes Name
public function F(U, t) result(dU)

function of the system

Arguments
Type IntentOptional Attributes Name
real, intent(in) :: U(:)

value of the unknown function

real, intent(in) :: t

independent variable

Return Value real, (size(U))

derivative of

real, intent(in) :: t(0:)

array of times where the numerical solution will be evaluated.

real, intent(in) :: U0(:)

initial conditions

Return Value real, (0:ubound(t,1),size(U0))

solution array such that the the row and column stands for the th component of the vector solution at time .