Integrate field with LMM-SSP-VSS 2nd 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_2_fast(self, U, Dt, t)
!< Integrate field with LMM-SSP-VSS 2nd 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.
real(R_P) :: omega_sq !< Square of omega coefficient.
omega_ = omega(Dt=self%Dt, s=self%steps-1)
omega_sq = omega_ * omega_
call U%multiply_fast(lhs=self%previous(1), rhs=1._R_P / omega_sq)
call self%buffer%multiply_fast(lhs=self%previous(self%steps), rhs=(omega_sq - 1._R_P) / omega_sq)
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) / omega_)
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_2_fast