Integrate field with LMM-SSP class scheme, fast mode.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_lmm_ssp), | 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_fast(self, U, Dt, t)
!< Integrate field with LMM-SSP class scheme, fast mode.
class(integrator_lmm_ssp), 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 !< Steps counter.
call U%multiply_fast(lhs=U, rhs=0._R_P)
do s=1, self%steps
if (self%a(s) /= 0._R_P) then
call self%buffer%multiply_fast(lhs=self%previous(s), rhs=self%a(s))
call U%add_fast(lhs=U, rhs=self%buffer)
endif
if (self%b(s) /= 0._R_P) then
self%buffer = self%previous(s)
call self%buffer%t_fast(t=self%t(s))
call self%buffer%multiply_fast(lhs=self%buffer, rhs=Dt * self%b(s))
call U%add_fast(lhs=U, rhs=self%buffer)
endif
enddo
if (self%autoupdate) call self%update_previous(U=U, previous=self%previous, Dt=Dt, t=t, previous_t=self%t)
endsubroutine integrate_fast