Fourth-order Runge-Kutta scheme


INTERFACE:

    subroutine runge_kutta_4(dt,numc,nlev,cc,right_hand_side)
DESCRIPTION:

Here, the fourth-order Runge-Kutta (RK4) scheme is coded, with four evaluations of the right hand sides per time step:

$\displaystyle \left. \begin{array}{rcl} c_i^{(1)} &=& \displaystyle c_i^n+\Delt...
...\left\{c_i^{(1)}+2c_i^{(2)}+2c_i^{(3)}+c_i^{(4)} \right\}. \end{array} \right\}$ (250)


USES:

    IMPLICIT NONE
INPUT PARAMETERS:
    REALTYPE, intent(in)                :: dt
    integer, intent(in)                 :: numc,nlev
   !INPUT/OUTPUT PARAMETER:
    REALTYPE, intent(inout)             :: cc(1:numc,0:nlev)
 
    interface
       subroutine right_hand_side(first,numc,nlev,cc,rhs)
          logical, intent(in)                  :: first
          integer, intent(in)                  :: numc,nlev
          REALTYPE, intent(in)                 :: cc(1:numc,0:nlev)
          REALTYPE, intent(out)                :: rhs(1:numc,0:nlev)
       end
    end interface
REVISION HISTORY:
    Original author(s): Hans Burchard, Karsten Bolding
LOCAL VARIABLES:
   logical  :: first
   REALTYPE :: rhs(1:numc,0:nlev),rhs1(1:numc,0:nlev)
   REALTYPE :: rhs2(1:numc,0:nlev),rhs3(1:numc,0:nlev)
   REALTYPE :: cc1(1:numc,0:nlev)
   integer  :: i,ci



Karsten Bolding 2012-01-24