rk45 Subroutine

private subroutine rk45(xi, dh, ax_func, bx_func, yi, ysolrk4, ysolrk5)

Calculates the Runge-Kutta coefficients and calculates the fourth and fifth order solutions for step i+1 based on the values at step i.

Arguments

TypeIntentOptionalAttributesName
real(kind=dp), intent(in) :: xi

current x value

real(kind=dp), intent(in) :: dh

current step size

procedure(func) :: ax_func

function to calculate A(x)

procedure(func) :: bx_func

function to calculate B(x)

real(kind=dp), intent(in) :: yi

current y value

real(kind=dp), intent(out) :: ysolrk4

fourth order solution

real(kind=dp), intent(out) :: ysolrk5

fifth order solution


Contents

None