Integrate field with explicit Euler scheme, 1st order.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integrator_euler_explicit), | 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. |
||
real(kind=R_P), | intent(out), | optional | :: | new_Dt | New adapted time step. |
subroutine integrate(self, U, Dt, t, new_Dt)
!< Integrate field with explicit Euler scheme, 1st order.
class(integrator_euler_explicit), 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), optional, intent(out) :: new_Dt !< New adapted time step.
U = U + (U%t(t=t) * Dt)
if (present(new_Dt)) new_Dt = Dt
endsubroutine integrate