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