FLASH-X
Doxygen Generated Documentation From Interface Source Code
Functions/Subroutines
RungeKutta_step.F90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine RungeKutta_step (method, f, x, y, eFrac, eBase, htry, hused, hnext, yout, eout)
 

Function/Subroutine Documentation

◆ RungeKutta_step()

subroutine RungeKutta_step ( character (len=*), intent(in)  method,
  f,
real, intent(in)  x,
real, dimension (:), intent(in)  y,
real  eFrac,
real  eBase,
real, intent(in)  htry,
real, intent(out)  hused,
real, intent(out)  hnext,
real, dimension (:), intent(out)  yout,
real, dimension (:), intent(out)  eout 
)

This routine performs a single adaptive Runge Kutta step. It copies the appropriate Butcher tableau data from the repository and calls the corresponding RK stepper. The details of the ODE function are contained in the passed array function 'f', which constitutes the link of the general Runge Kutta module to the individual applications. Thus 'f' has to be provided by an application outside of the Runge Kutta unit.

The error vector for the dependent variables is composed of two pieces (as suggested by Numerical Recipies):

e (i) = eFrac * eBase (i)

In this error vector definition, eFrac denotes the fractional value each of the individual eBase (i) values that define the total allowed maximum error for each of the i-th dependent variables.

method : the type of RK method to be applied f : the ODE function containing details of the ODE system to be solved x : the initial value of the independent variable y : the initial values of the dependent variable(s) eFrac : the fractional value for each of the error base values eBase : the error base values for each of the dependent variables htry : the initial step size on the independent variable hused : the final step size applied on the independent variable hnext : the suggested next step size on the independent variable yout : the values of the dependent variable(s) after the accepted RK45 step eout : the returned error of all dependent variable(s)

NOTES

Contains an interfaced function in the declarations (see below).

Definition at line 52 of file RungeKutta_step.F90.