Interpolation function. Can be used for dense output after a step. It calls the low-level routine dintp.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ddeabm_class), | intent(inout) | :: | me | |||
| real(kind=wp), | intent(in) | :: | tc |
point at which solution is desired |
||
| real(kind=wp), | intent(out), | dimension(me%neq) | :: | yc |
interpolated state at |
|
| integer, | intent(out), | optional | :: | istat |
status flag:
If not present, an error message is printed in this case. |
subroutine ddeabm_interp(me, tc, yc, istat) implicit none class(ddeabm_class), intent(inout) :: me real(wp), intent(in) :: tc !! point at which solution is desired real(wp), dimension(me%neq), intent(out) :: yc !! interpolated state at `tc` integer, intent(out), optional :: istat !! status flag: !! !! * 0 : success !! * -1 : no integration step is available !! to interpolate (`yc` is set to the !! current integrator state, which is zero !! before the first call to `integrate`). !! !! If not present, an error message is !! printed in this case. if (present(istat)) istat = 0 ! the interpolating polynomial is not defined until a step ! has been taken (and the step size must be nonzero): if (me%kold < 1 .or. me%x == me%xold) then yc = me%yy if (present(istat)) then istat = -1 else call report_error('ddeabm_interp', & 'no integration step is available for interpolation.', 0, 0) end if return end if ! interpolate to get the state at tc: call dintp(me%x, me%yy, tc, yc, & me%ypout, me%neq, me%kold, me%phi, & me%ivc, me%iv, me%kgi, me%gi, me%alpha, & me%g, me%w, me%xold, me%p) end subroutine ddeabm_interp