Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval | x coordinate of evaluation point. |
||
integer, | intent(in) | :: | idx | x derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx | sequence of knots defining the piecewise polynomial in the x direction. (same as in last call to db1ink) |
|
integer, | intent(in) | :: | nx | the number of interpolation points in x. (same as in last call to db1ink) |
||
integer, | intent(in) | :: | kx | order of polynomial pieces in x. (same as in last call to db1ink) |
||
real(kind=wp), | intent(in), | dimension(nx) | :: | bcoef | the b-spline coefficients computed by db1ink. |
|
real(kind=wp), | intent(out) | :: | f | interpolated value |
||
integer, | intent(out) | :: | iflag | status flag: 0 : no errors, /=0 : error |
||
integer, | intent(inout) | :: | inbvx | initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
subroutine db1val(xval,idx,tx,nx,kx,bcoef,f,iflag,inbvx)
implicit none
integer,intent(in) :: idx !! x derivative of piecewise polynomial to evaluate.
integer,intent(in) :: nx !! the number of interpolation points in x. (same as in last call to [[db1ink]])
integer,intent(in) :: kx !! order of polynomial pieces in x. (same as in last call to [[db1ink]])
real(wp),intent(in) :: xval !! x coordinate of evaluation point.
real(wp),dimension(nx+kx),intent(in) :: tx !! sequence of knots defining the piecewise polynomial in the x direction. (same as in last call to [[db1ink]])
real(wp),dimension(nx),intent(in) :: bcoef !! the b-spline coefficients computed by [[db1ink]].
real(wp),intent(out) :: f !! interpolated value
integer,intent(out) :: iflag !! status flag: 0 : no errors, /=0 : error
integer,intent(inout) :: inbvx !! initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user.
real(wp),dimension(3*kx) :: work
f = 0.0_wp
if (xval<tx(1) .or. xval>tx(nx+kx)) then
write(error_unit,'(A)') 'db1val - x value out of bounds'
iflag = 1
return
endif
f = dbvalu(tx,bcoef,nx,kx,idx,xval,inbvx,work,iflag)
endsubroutine db1val