Integrate field with Adams-Bashforth-Moulton class scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_adams_bashforth_moulton), | intent(inout) | :: | self | Integrator. |
||
class(integrand_object), | intent(inout) | :: | U | Field to be integrated. |
||
real(kind=R_P), | intent(in) | :: | Dt | Time steps. |
||
real(kind=R_P), | intent(in) | :: | t | Times. |
subroutine integrate(self, U, Dt, t)
!< Integrate field with Adams-Bashforth-Moulton class scheme.
class(integrator_adams_bashforth_moulton), intent(inout) :: self !< Integrator.
class(integrand_object), intent(inout) :: U !< Field to be integrated.
real(R_P), intent(in) :: Dt !< Time steps.
real(R_P), intent(in) :: t !< Times.
integer(I_P) :: s !< Step counter.
do s=1, self%steps
self%predictor%previous(s) = self%previous(s)
self%predictor%t(s) = self%t(s)
self%predictor%Dt(s) = self%Dt(s)
enddo
do s=1, self%steps - 1
self%corrector%previous(s) = self%predictor%previous(s+1)
self%corrector%t(s) = self%predictor%t(s+1)
self%corrector%Dt(s) = self%predictor%Dt(s+1)
enddo
call self%predictor%integrate(U=U, Dt=Dt, t=t)
call self%corrector%integrate(U=U, Dt=Dt, t=t)
if (self%autoupdate) &
call self%update_previous(U=U, previous=self%previous, Dt=Dt, t=t, previous_t=self%t)
endsubroutine integrate