Integrate integrand field by s-th order formula.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_runge_kutta_lssp), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(inout) | :: | U | Field to be integrated. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time step. |
||
real(kind=R_P), | intent(in) | :: | t | Time. |
subroutine integrate_order_s(self, U, Dt, t)
!< Integrate integrand field by s-th order formula.
class(integrator_runge_kutta_lssp), intent(inout) :: self !< Integrator.
class(integrand_object), intent(inout) :: U !< Field to be integrated.
real(R_P), intent(in) :: Dt !< Time step.
real(R_P), intent(in) :: t !< Time.
integer(I_P) :: s !< First stages counter.
! computing stages
self%stage(1) = U
do s=2, self%stages
self%stage(s) = self%stage(s-1) + (self%stage(s-1)%t(t=t) * Dt)
enddo
self%stage(self%stages) = self%stage(self%stages) + (self%stage(self%stages)%t(t=t) * Dt)
! computing new time step
U = U * 0._R_P
do s=1, self%stages
U = U + (self%stage(s) * self%alpha(s))
enddo
endsubroutine integrate_order_s