Extract previous time solution of Euler field.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(euler_1D), | intent(in) | :: | self | Euler field. |
||
integer(kind=I_P), | intent(in) | :: | n | Time level. |
Previous time solution of Euler field.
function previous_step(self, n) result(previous)
!---------------------------------------------------------------------------------------------------------------------------------
!< Extract previous time solution of Euler field.
!---------------------------------------------------------------------------------------------------------------------------------
class(euler_1D), intent(IN) :: self !< Euler field.
integer(I_P), intent(IN) :: n !< Time level.
class(integrand), allocatable :: previous !< Previous time solution of Euler field.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
allocate(euler_1D :: previous)
select type(previous)
class is(euler_1D)
previous = self
previous%U = self%previous(:, :, n)
endselect
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction previous_step