Initialize integrator for s-th order formula.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_runge_kutta_lssp), | intent(inout) | :: | self | Integrator. |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
elemental subroutine initialize_order_s(self)
!< Initialize integrator for s-th order formula.
class(integrator_runge_kutta_lssp), intent(inout) :: self !< Integrator.
integer(I_P) :: i !< Counter.
integer(I_P) :: j !< Counter.
associate(alpha=>self%alpha)
alpha(1) = 1._R_P
do i=2, self%stages
alpha(i) = 1._R_P / product([(j, j=1,i)])
do j=i-1, 2, -1
alpha(j) = 1._R_P / (j-1) * alpha(j-1)
enddo
alpha(1) = 1._R_P
do j=2, i
alpha(1) = alpha(1) - alpha(j)
enddo
enddo
endassociate
endsubroutine initialize_order_s