Interpolate values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(interpolator), | intent(inout) | :: | self | Interpolator. |
||
integer(kind=I_P), | intent(in) | :: | S | Number of stencils actually used. |
||
real(kind=R_P), | intent(in) | :: | stencil(1:,1-S:) | Stencil of the interpolation [1:2, 1-S:-1+S]. |
||
character(len=*), | intent(in) | :: | location | Location of interpolation: left, right, both. |
||
real(kind=R_P), | intent(out) | :: | interpolation(1:) | Result of the interpolation, [1:2]. |
pure subroutine interpolate(self, S, stencil, location, interpolation)
!< Interpolate values.
class(interpolator), intent(inout) :: self !< Interpolator.
integer(I_P), intent(in) :: S !< Number of stencils actually used.
real(R_P), intent(in) :: stencil(1:, 1 - S:) !< Stencil of the interpolation [1:2, 1-S:-1+S].
character(*), intent(in) :: location !< Location of interpolation: left, right, both.
real(R_P), intent(out) :: interpolation(1:) !< Result of the interpolation, [1:2].
#ifndef DEBUG
! error stop in pure procedure is a F2015 feature not yet supported in debug mode
error stop 'interpolator%interpolate to be implemented by your concrete interpolator object'
#endif
endsubroutine interpolate