Integrate field with LMM-SSP-VSS 3rd order class scheme, fast mode.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_lmm_ssp_vss), | 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. |
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.
subroutine integrate_order_3_fast(self, U, Dt, t)
!< Integrate field with LMM-SSP-VSS 3rd order class scheme, fast mode.
class(integrator_lmm_ssp_vss), 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.
real(R_P) :: omega_ !< Omega coefficient.
omega_= omega(Dt=self%Dt, s=self%steps-1)
call U%multiply_fast(lhs=self%previous(1), rhs=(3._R_P * omega_ + 2._R_P) / (omega_ ** 3))
call self%buffer%multiply_fast(lhs=self%previous(self%steps), rhs=(((omega_ + 1._R_P) ** 2) * (omega_ - 2._R_P) / (omega_ ** 3)))
call U%add_fast(lhs=U, rhs=self%buffer)
self%buffer = self%previous(1)
call self%buffer%t_fast(t=self%t(1))
call self%buffer%multiply_fast(lhs=self%buffer, rhs=self%Dt(self%steps) * (omega_ + 1._R_P) / (omega_ ** 2))
call U%add_fast(lhs=U, rhs=self%buffer)
self%buffer = self%previous(self%steps)
call self%buffer%t_fast(t=self%t(self%steps))
call self%buffer%multiply_fast(lhs=self%buffer, rhs=(self%Dt(self%steps) * (omega_ + 1._R_P) ** 2 / (omega_ ** 2)))
call U%add_fast(lhs=U, rhs=self%buffer)
if (self%autoupdate) call self%update_previous(U=U, previous=self%previous, Dt=Dt, t=t, previous_Dt=self%Dt, previous_t=self%t)
endsubroutine integrate_order_3_fast