Multidimensional (1D-6D) B-spline interpolation of data on a regular grid. Basic pure subroutine interface.
This module is based on the B-spline and spline routines from [1]. The original Fortran 77 routines were converted to free-form source. Some of them are relatively unchanged from the originals, but some have been extensively refactored. In addition, new routines for 1d, 4d, 5d, and 6d interpolation were also created (these are simply extensions of the same algorithm into higher dimensions).
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=ip), | public, | parameter | :: | bspline_order_linear | = | 2_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_quadratic | = | 3_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_cubic | = | 4_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_quartic | = | 5_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_quintic | = | 6_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_hexic | = | 7_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_heptic | = | 8_ip |
spline order |
integer(kind=ip), | public, | parameter | :: | bspline_order_octic | = | 9_ip |
spline order |
1D initialization routines.
Determines the parameters of a function that interpolates the one-dimensional gridded data The interpolating function and its derivatives may subsequently be evaluated by the function db1val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
Number of abcissae |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
Alternate version of db1ink_default, where the boundary conditions can be specified.
Note
Currently, this only works for 3rd order (k=4).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
vector of abscissae of length |
|
integer(kind=ip), | intent(in) | :: | nx |
number of data points, |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
vector of ordinates of length |
|
integer(kind=ip), | intent(in) | :: | kx |
spline order (Currently, this must be |
||
integer(kind=ip), | intent(in) | :: | ibcl |
selection parameter for left boundary condition: |
||
integer(kind=ip), | intent(in) | :: | ibcr |
selection parameter for right boundary condition: |
||
real(kind=wp), | intent(in) | :: | fbcl |
left boundary values governed by |
||
real(kind=wp), | intent(in) | :: | fbcr |
right boundary values governed by |
||
integer(kind=ip), | intent(in) | :: | kntopt |
knot selection parameter: |
||
real(kind=wp), | intent(out), | dimension(:) | :: | tx |
knot array of length |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
b spline coefficient array of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
Alternate version of db1ink_alt, where the first and last 3 knots are specified by the user.
Note
Currently, this only works for 3rd order (k=4).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
vector of abscissae of length |
|
integer(kind=ip), | intent(in) | :: | nx |
number of data points, |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
vector of ordinates of length |
|
integer(kind=ip), | intent(in) | :: | kx |
spline order (Currently, this must be |
||
integer(kind=ip), | intent(in) | :: | ibcl |
selection parameter for left boundary condition: |
||
integer(kind=ip), | intent(in) | :: | ibcr |
selection parameter for right boundary condition: |
||
real(kind=wp), | intent(in) | :: | fbcl |
left boundary values governed by |
||
real(kind=wp), | intent(in) | :: | fbcr |
right boundary values governed by |
||
real(kind=wp), | intent(in), | dimension(3) | :: | tleft |
|
|
real(kind=wp), | intent(in), | dimension(3) | :: | tright |
|
|
real(kind=wp), | intent(out), | dimension(:) | :: | tx |
knot array of length |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
b spline coefficient array of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
1D evaluation routines.
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db1ink or one of its
derivatives at the point xval
.
To evaluate the interpolant itself, set idx=0
,
to evaluate the first partial with respect to x
, set idx=1
, and so on.
db1val returns 0.0 if (xval
,yval
) is out of range. that is, if
xval < tx(1) .or. xval > tx(nx+kx)
if the knots tx
were chosen by db1ink, then this is equivalent to:
xval < x(1) .or. xval > x(nx)+epsx
where
epsx = 0.1*(x(nx)-x(nx-1))
The input quantities tx
, nx
, kx
, and bcoef
should be
unchanged since the last call of db1ink.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db1ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db1ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (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(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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(kind=wp), | intent(inout), | dimension(3_ip*kx) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Alternate version of db1val_default for use with db1ink_alt and db1ink_alt_2.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(n+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . |
||
integer(kind=ip), | intent(in) | :: | n |
length of |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db1ink) |
||
real(kind=wp), | intent(in), | dimension(n) | :: | bcoef |
the b-spline coefficients computed by db1ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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(kind=wp), | intent(inout), | dimension(3_ip*kx) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
interface for the input function in dbfqad
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
f(x)
Checks if the value is withing the range of the knot vectors.
This is called by the various db*val
routines.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
the value to check |
||
real(kind=wp), | intent(in), | dimension(:) | :: | t |
the knot vector |
|
integer(kind=ip), | intent(in) | :: | i |
1=x, 2=y, 3=z, 4=q, 5=r, 6=s |
||
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
returns 0 if value is OK, otherwise returns 600+i
Returns the value of x
to use for computing the interval
in t
, depending on if extrapolation is allowed or not.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | x |
variable value |
||
real(kind=wp), | intent(in) | :: | tmin |
first knot vector element for b-splines |
||
real(kind=wp), | intent(in) | :: | tmax |
last knot vector element for b-splines |
||
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
The value returned (it will either
be tmin
, x
, or tmax
)
Returns a message string associated with the status code.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | iflag |
return code from one of the routines |
status message associated with the flag
Determines the parameters of a function that interpolates the one-dimensional gridded data The interpolating function and its derivatives may subsequently be evaluated by the function db1val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
Number of abcissae |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
Alternate version of db1ink_default, where the boundary conditions can be specified.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
vector of abscissae of length |
|
integer(kind=ip), | intent(in) | :: | nx |
number of data points, |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
vector of ordinates of length |
|
integer(kind=ip), | intent(in) | :: | kx |
spline order (Currently, this must be |
||
integer(kind=ip), | intent(in) | :: | ibcl |
selection parameter for left boundary condition: |
||
integer(kind=ip), | intent(in) | :: | ibcr |
selection parameter for right boundary condition: |
||
real(kind=wp), | intent(in) | :: | fbcl |
left boundary values governed by |
||
real(kind=wp), | intent(in) | :: | fbcr |
right boundary values governed by |
||
integer(kind=ip), | intent(in) | :: | kntopt |
knot selection parameter: |
||
real(kind=wp), | intent(out), | dimension(:) | :: | tx |
knot array of length |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
b spline coefficient array of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
Alternate version of db1ink_alt, where the first and last 3 knots are specified by the user.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
vector of abscissae of length |
|
integer(kind=ip), | intent(in) | :: | nx |
number of data points, |
||
real(kind=wp), | intent(in), | dimension(:) | :: | fcn |
vector of ordinates of length |
|
integer(kind=ip), | intent(in) | :: | kx |
spline order (Currently, this must be |
||
integer(kind=ip), | intent(in) | :: | ibcl |
selection parameter for left boundary condition: |
||
integer(kind=ip), | intent(in) | :: | ibcr |
selection parameter for right boundary condition: |
||
real(kind=wp), | intent(in) | :: | fbcl |
left boundary values governed by |
||
real(kind=wp), | intent(in) | :: | fbcr |
right boundary values governed by |
||
real(kind=wp), | intent(in), | dimension(3) | :: | tleft |
|
|
real(kind=wp), | intent(in), | dimension(3) | :: | tright |
|
|
real(kind=wp), | intent(out), | dimension(:) | :: | tx |
knot array of length |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
b spline coefficient array of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db1ink or one of its
derivatives at the point xval
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db1ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db1ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (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(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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(kind=wp), | intent(inout), | dimension(3_ip*kx) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Alternate version of db1val_default for use with db1ink_alt and db1ink_alt_2.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(n+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . |
||
integer(kind=ip), | intent(in) | :: | n |
length of |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db1ink) |
||
real(kind=wp), | intent(in), | dimension(n) | :: | bcoef |
the b-spline coefficients computed by db1ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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(kind=wp), | intent(inout), | dimension(3_ip*kx) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Computes the integral on (x1,x2)
of a kx
-th order b-spline.
Orders kx
as high as 20 are permitted by applying a 2, 6, or 10
point gauss formula on subintervals of (x1,x2)
which are
formed by included (distinct) knots.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
knot array |
|
real(kind=wp), | intent(in), | dimension(nx) | :: | bcoef |
b-spline coefficient array |
|
integer(kind=ip), | intent(in) | :: | nx |
length of coefficient array |
||
integer(kind=ip), | intent(in) | :: | kx |
order of b-spline, |
||
real(kind=wp), | intent(in) | :: | x1 |
left point of quadrature interval in |
||
real(kind=wp), | intent(in) | :: | x2 |
right point of quadrature interval in |
||
real(kind=wp), | intent(out) | :: | f |
integral of the b-spline over ( |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
real(kind=wp), | intent(inout), | dimension(3*kx) | :: | w0 |
work array for dbsqad |
Computes the integral on (x1,x2)
of a product of a
function fun
and the idx
-th derivative of a kx
-th order b-spline,
using the b-representation (tx,bcoef,nx,kx)
, with an adaptive
8-point Legendre-Gauss algorithm.
(x1,x2)
must be a subinterval of t(kx) <= x <= t(nx+1)
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(b1fqad_func) | :: | fun |
external function of one argument for the
integrand |
|||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
knot array |
|
real(kind=wp), | intent(in), | dimension(nx) | :: | bcoef |
b-spline coefficient array |
|
integer(kind=ip), | intent(in) | :: | nx |
length of coefficient array |
||
integer(kind=ip), | intent(in) | :: | kx |
order of b-spline, |
||
integer(kind=ip), | intent(in) | :: | idx |
order of the spline derivative, |
||
real(kind=wp), | intent(in) | :: | x1 |
left point of quadrature interval in |
||
real(kind=wp), | intent(in) | :: | x2 |
right point of quadrature interval in |
||
real(kind=wp), | intent(in) | :: | tol |
desired accuracy for the quadrature, suggest
|
||
real(kind=wp), | intent(out) | :: | f |
integral of |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
real(kind=wp), | intent(inout), | dimension(3_ip*kx) | :: | w0 |
work array for dbfqad |
Determines the parameters of a function that interpolates the two-dimensional gridded data The interpolating function and its derivatives may subsequently be evaluated by the function db2val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
Number of abcissae |
||
real(kind=wp), | intent(in), | dimension(:) | :: | y |
|
|
integer(kind=ip), | intent(in) | :: | ny |
Number of abcissae |
||
real(kind=wp), | intent(in), | dimension(:,:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ky |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ty |
The |
|
real(kind=wp), | intent(out), | dimension(:,:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db2ink or one of its
derivatives at the point (xval
,yval
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | yval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idy |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db2ink) |
|
real(kind=wp), | intent(in), | dimension(ny+ky) | :: | ty |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db2ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db2ink) |
||
integer(kind=ip), | intent(in) | :: | ny |
the number of interpolation points in . (same as in last call to db2ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db2ink) |
||
integer(kind=ip), | intent(in) | :: | ky |
order of polynomial pieces in . (same as in last call to db2ink) |
||
real(kind=wp), | intent(in), | dimension(nx,ny) | :: | bcoef |
the b-spline coefficients computed by db2ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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. |
||
integer(kind=ip), | intent(inout) | :: | inbvy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
real(kind=wp), | intent(inout), | dimension(ky) | :: | w1 |
work array |
|
real(kind=wp), | intent(inout), | dimension(3_ip*max(kx,ky)) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Determines the parameters of a function that interpolates the three-dimensional gridded data The interpolating function and its derivatives may subsequently be evaluated by the function db3val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | y |
|
|
integer(kind=ip), | intent(in) | :: | ny |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | z |
|
|
integer(kind=ip), | intent(in) | :: | nz |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:,:,:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ky |
The order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kz |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ty |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tz |
The |
|
real(kind=wp), | intent(out), | dimension(:,:,:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db3ink or one of its
derivatives at the point (xval
,yval
,zval
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | yval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | zval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idy |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idz |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db3ink) |
|
real(kind=wp), | intent(in), | dimension(ny+ky) | :: | ty |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db3ink) |
|
real(kind=wp), | intent(in), | dimension(nz+kz) | :: | tz |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db3ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db3ink) |
||
integer(kind=ip), | intent(in) | :: | ny |
the number of interpolation points in . (same as in last call to db3ink) |
||
integer(kind=ip), | intent(in) | :: | nz |
the number of interpolation points in . (same as in last call to db3ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db3ink) |
||
integer(kind=ip), | intent(in) | :: | ky |
order of polynomial pieces in . (same as in last call to db3ink) |
||
integer(kind=ip), | intent(in) | :: | kz |
order of polynomial pieces in . (same as in last call to db3ink) |
||
real(kind=wp), | intent(in), | dimension(nx,ny,nz) | :: | bcoef |
the b-spline coefficients computed by db3ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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. |
||
integer(kind=ip), | intent(inout) | :: | inbvy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
real(kind=wp), | intent(inout), | dimension(ky,kz) | :: | w2 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kz) | :: | w1 |
work array |
|
real(kind=wp), | intent(inout), | dimension(3_ip*max(kx,ky,kz)) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Determines the parameters of a function that interpolates the four-dimensional gridded data The interpolating function and its derivatives may subsequently be evaluated by the function db4val.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | y |
|
|
integer(kind=ip), | intent(in) | :: | ny |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | z |
|
|
integer(kind=ip), | intent(in) | :: | nz |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | q |
|
|
integer(kind=ip), | intent(in) | :: | nq |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:,:,:,:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ky |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kz |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kq |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ty |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tz |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tq |
The |
|
real(kind=wp), | intent(out), | dimension(:,:,:,:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db4ink or one of its
derivatives at the point (xval
,yval
,zval
,qval
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | yval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | zval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | qval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idy |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idz |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idq |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db4ink) |
|
real(kind=wp), | intent(in), | dimension(ny+ky) | :: | ty |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db4ink) |
|
real(kind=wp), | intent(in), | dimension(nz+kz) | :: | tz |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db4ink) |
|
real(kind=wp), | intent(in), | dimension(nq+kq) | :: | tq |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db4ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | ny |
the number of interpolation points in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | nz |
the number of interpolation points in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | nq |
the number of interpolation points in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | ky |
order of polynomial pieces in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | kz |
order of polynomial pieces in . (same as in last call to db4ink) |
||
integer(kind=ip), | intent(in) | :: | kq |
order of polynomial pieces in . (same as in last call to db4ink) |
||
real(kind=wp), | intent(in), | dimension(nx,ny,nz,nq) | :: | bcoef |
the b-spline coefficients computed by db4ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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. |
||
integer(kind=ip), | intent(inout) | :: | inbvy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
real(kind=wp), | intent(inout), | dimension(ky,kz,kq) | :: | w3 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kz,kq) | :: | w2 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kq) | :: | w1 |
work array |
|
real(kind=wp), | intent(inout), | dimension(3_ip*max(kx,ky,kz,kq)) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Determines the parameters of a function that interpolates the five-dimensional gridded data:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | y |
|
|
integer(kind=ip), | intent(in) | :: | ny |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | z |
|
|
integer(kind=ip), | intent(in) | :: | nz |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | q |
|
|
integer(kind=ip), | intent(in) | :: | nq |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | r |
|
|
integer(kind=ip), | intent(in) | :: | nr |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:,:,:,:,:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ky |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kz |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kq |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kr |
the order of spline pieces in ( ). (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ty |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tz |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tq |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tr |
The |
|
real(kind=wp), | intent(out), | dimension(:,:,:,:,:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db5ink or one of its
derivatives at the point (xval
,yval
,zval
,qval
,rval
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | yval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | zval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | qval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | rval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idy |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idz |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idq |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idr |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db5ink) |
|
real(kind=wp), | intent(in), | dimension(ny+ky) | :: | ty |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db5ink) |
|
real(kind=wp), | intent(in), | dimension(nz+kz) | :: | tz |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db5ink) |
|
real(kind=wp), | intent(in), | dimension(nq+kq) | :: | tq |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db5ink) |
|
real(kind=wp), | intent(in), | dimension(nr+kr) | :: | tr |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db5ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | ny |
the number of interpolation points in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | nz |
the number of interpolation points in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | nq |
the number of interpolation points in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | nr |
the number of interpolation points in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | ky |
order of polynomial pieces in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | kz |
order of polynomial pieces in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | kq |
order of polynomial pieces in . (same as in last call to db5ink) |
||
integer(kind=ip), | intent(in) | :: | kr |
order of polynomial pieces in . (same as in last call to db5ink) |
||
real(kind=wp), | intent(in), | dimension(nx,ny,nz,nq,nr) | :: | bcoef |
the b-spline coefficients computed by db5ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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. |
||
integer(kind=ip), | intent(inout) | :: | inbvy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvr |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | ilor |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
real(kind=wp), | intent(inout), | dimension(ky,kz,kq,kr) | :: | w4 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kz,kq,kr) | :: | w3 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kq,kr) | :: | w2 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kr) | :: | w1 |
work array |
|
real(kind=wp), | intent(inout), | dimension(3_ip*max(kx,ky,kz,kq,kr)) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Determines the parameters of a function that interpolates the six-dimensional gridded data:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
|
|
integer(kind=ip), | intent(in) | :: | nx |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | y |
|
|
integer(kind=ip), | intent(in) | :: | ny |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | z |
|
|
integer(kind=ip), | intent(in) | :: | nz |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | q |
|
|
integer(kind=ip), | intent(in) | :: | nq |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | r |
|
|
integer(kind=ip), | intent(in) | :: | nr |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:) | :: | s |
|
|
integer(kind=ip), | intent(in) | :: | ns |
number of abcissae ( ) |
||
real(kind=wp), | intent(in), | dimension(:,:,:,:,:,:) | :: | fcn |
|
|
integer(kind=ip), | intent(in) | :: | kx |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ky |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kz |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kq |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | kr |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | ks |
the order of spline pieces in ( ) (order = polynomial degree + 1) |
||
integer(kind=ip), | intent(in) | :: | iknot |
knot sequence flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | tx |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ty |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tz |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tq |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | tr |
The |
|
real(kind=wp), | intent(inout), | dimension(:) | :: | ts |
The |
|
real(kind=wp), | intent(out), | dimension(:,:,:,:,:,:) | :: | bcoef |
|
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the tensor product piecewise polynomial
interpolant constructed by the routine db6ink or one of its
derivatives at the point (xval
,yval
,zval
,qval
,rval
,sval
).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | xval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | yval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | zval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | qval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | rval |
coordinate of evaluation point. |
||
real(kind=wp), | intent(in) | :: | sval |
coordinate of evaluation point. |
||
integer(kind=ip), | intent(in) | :: | idx |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idy |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idz |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idq |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | idr |
derivative of piecewise polynomial to evaluate. |
||
integer(kind=ip), | intent(in) | :: | ids |
derivative of piecewise polynomial to evaluate. |
||
real(kind=wp), | intent(in), | dimension(nx+kx) | :: | tx |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
real(kind=wp), | intent(in), | dimension(ny+ky) | :: | ty |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
real(kind=wp), | intent(in), | dimension(nz+kz) | :: | tz |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
real(kind=wp), | intent(in), | dimension(nq+kq) | :: | tq |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
real(kind=wp), | intent(in), | dimension(nr+kr) | :: | tr |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
real(kind=wp), | intent(in), | dimension(ns+ks) | :: | ts |
sequence of knots defining the piecewise polynomial in the direction. (same as in last call to db6ink) |
|
integer(kind=ip), | intent(in) | :: | nx |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | ny |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | nz |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | nq |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | nr |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | ns |
the number of interpolation points in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | kx |
order of polynomial pieces in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | ky |
order of polynomial pieces in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | kz |
order of polynomial pieces in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | kq |
order of polynomial pieces in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | kr |
order of polynomial pieces in . (same as in last call to db6ink) |
||
integer(kind=ip), | intent(in) | :: | ks |
order of polynomial pieces in . (same as in last call to db6ink) |
||
real(kind=wp), | intent(in), | dimension(nx,ny,nz,nq,nr,ns) | :: | bcoef |
the b-spline coefficients computed by db6ink. |
|
real(kind=wp), | intent(out) | :: | f |
interpolated value |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
integer(kind=ip), | 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. |
||
integer(kind=ip), | intent(inout) | :: | inbvy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvr |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | inbvs |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloy |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloz |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | iloq |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | ilor |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
integer(kind=ip), | intent(inout) | :: | ilos |
initialization parameter which must be set to 1 the first time this routine is called, and must not be changed by the user. |
||
real(kind=wp), | intent(inout), | dimension(ky,kz,kq,kr,ks) | :: | w5 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kz,kq,kr,ks) | :: | w4 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kq,kr,ks) | :: | w3 |
work array |
|
real(kind=wp), | intent(inout), | dimension(kr,ks) | :: | w2 |
work array |
|
real(kind=wp), | intent(inout), | dimension(ks) | :: | w1 |
work array |
|
real(kind=wp), | intent(inout), | dimension(3_ip*max(kx,ky,kz,kq,kr,ks)) | :: | w0 |
work array |
|
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Check the validity of the inputs to the db*ink
routines.
Prints warning message if there is an error,
and also sets iflag and status_ok.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | iknot |
= 0 if the |
||
integer(kind=ip), | intent(out) | :: | iflag | |||
integer(kind=ip), | intent(in), | optional | :: | nx | ||
integer(kind=ip), | intent(in), | optional | :: | ny | ||
integer(kind=ip), | intent(in), | optional | :: | nz | ||
integer(kind=ip), | intent(in), | optional | :: | nq | ||
integer(kind=ip), | intent(in), | optional | :: | nr | ||
integer(kind=ip), | intent(in), | optional | :: | ns | ||
integer(kind=ip), | intent(in), | optional | :: | kx | ||
integer(kind=ip), | intent(in), | optional | :: | ky | ||
integer(kind=ip), | intent(in), | optional | :: | kz | ||
integer(kind=ip), | intent(in), | optional | :: | kq | ||
integer(kind=ip), | intent(in), | optional | :: | kr | ||
integer(kind=ip), | intent(in), | optional | :: | ks | ||
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | x | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | y | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | z | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | q | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | r | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | s | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tx | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | ty | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tz | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tq | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tr | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | ts | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | f1 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:) | :: | f2 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:) | :: | f3 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:) | :: | f4 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:,:) | :: | f5 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:,:,:) | :: | f6 | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | bcoef1 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:) | :: | bcoef2 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:) | :: | bcoef3 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:) | :: | bcoef4 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:,:) | :: | bcoef5 | |
real(kind=wp), | intent(in), | optional, | dimension(:,:,:,:,:,:) | :: | bcoef6 | |
logical, | intent(in), | optional | :: | alt |
using the alt routine where 1st or 2nd deriv is fixed at endpoints [default is False] |
|
logical, | intent(out) | :: | status_ok |
dbknot chooses a knot sequence for interpolation of order k at the data points x(i), i=1,..,n. the n+k knots are placed in the array t. k knots are placed at each endpoint and not-a-knot end conditions are used. the remaining knots are placed at data points if n is even and between data points if n is odd. the rightmost knot is shifted slightly to the right to insure proper interpolation at x(n) (see page 350 of the reference).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
integer(kind=ip), | intent(in) | :: | n |
dimension of |
||
integer(kind=ip), | intent(in) | :: | k | |||
real(kind=wp), | intent(out), | dimension(:) | :: | t |
dbtpcf computes b-spline interpolation coefficients for nf sets of data stored in the columns of the array fcn. the b-spline coefficients are stored in the rows of bcoef however. each interpolation is based on the n abcissa stored in the array x, and the n+k knots stored in the array t. the order of each interpolation is k.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | ||
integer(kind=ip), | intent(in) | :: | n |
dimension of |
||
real(kind=wp), | intent(in), | dimension(ldf,nf) | :: | fcn | ||
integer(kind=ip), | intent(in) | :: | ldf | |||
integer(kind=ip), | intent(in) | :: | nf | |||
real(kind=wp), | intent(in), | dimension(:) | :: | t | ||
integer(kind=ip), | intent(in) | :: | k | |||
real(kind=wp), | intent(out), | dimension(nf,n) | :: | bcoef | ||
real(kind=wp), | intent(out), | dimension(*) | :: | work |
work array of size >= |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
dbintk produces the b-spline coefficients, bcoef, of the b-spline of order k with knots t(i), i=1,...,n+k, which takes on the value y(i) at x(i), i=1,...,n. the spline or any of its derivatives can be evaluated by calls to dbvalu.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(n) | :: | x |
vector of length n containing data point abscissa in strictly increasing order. |
|
real(kind=wp), | intent(in), | dimension(n) | :: | y |
corresponding vector of length n containing data point ordinates. |
|
real(kind=wp), | intent(in), | dimension(*) | :: | t |
knot vector of length n+k since t(1),..,t(k) <= x(1) and t(n+1),..,t(n+k) |
|
integer(kind=ip), | intent(in) | :: | n |
number of data points, n >= k |
||
integer(kind=ip), | intent(in) | :: | k |
order of the spline, k >= 1 |
||
real(kind=wp), | intent(out), | dimension(n) | :: | bcoef |
a vector of length n containing the b-spline coefficients |
|
real(kind=wp), | intent(out), | dimension(*) | :: | q |
a work vector of length (2k-1)n, containing the triangular factorization of the coefficient matrix of the linear system being solved. the coefficients for the interpolant of an additional data set (x(i),yy(i)), i=1,...,n with the same abscissa can be obtained by loading yy into bcoef and then executing call dbnslv(q,2k-1,n,k-1,k-1,bcoef) |
|
real(kind=wp), | intent(out), | dimension(*) | :: | work |
work vector of length 2*k |
|
integer(kind=ip), | intent(out) | :: | iflag |
|
Returns in w the LU-factorization (without pivoting) of the banded matrix a of order nrow with (nbandl + 1 + nbandu) bands or diagonals in the work array w .
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(inout), | dimension(nroww,nrow) | :: | w |
work array. See header for details. |
|
integer(kind=ip), | intent(in) | :: | nroww |
row dimension of the work array w. must be >= nbandl + 1 + nbandu. |
||
integer(kind=ip), | intent(in) | :: | nrow |
matrix order |
||
integer(kind=ip), | intent(in) | :: | nbandl |
number of bands of a below the main diagonal |
||
integer(kind=ip), | intent(in) | :: | nbandu |
number of bands of a above the main diagonal |
||
integer(kind=ip), | intent(out) | :: | iflag |
indicating success(=1) or failure (=2) |
Companion routine to dbnfac. it returns the solution x of the linear system a*x = b in place of b, given the lu-factorization for a in the work array w from dbnfac.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(nroww,nrow) | :: | w |
describes the lu-factorization of a banded matrix a of
order |
|
integer(kind=ip), | intent(in) | :: | nroww |
describes the lu-factorization of a banded matrix a of order |
||
integer(kind=ip), | intent(in) | :: | nrow |
describes the lu-factorization of a banded matrix a of order |
||
integer(kind=ip), | intent(in) | :: | nbandl |
describes the lu-factorization of a banded matrix a of order |
||
integer(kind=ip), | intent(in) | :: | nbandu |
describes the lu-factorization of a banded matrix a of order |
||
real(kind=wp), | intent(inout), | dimension(nrow) | :: | b |
|
Calculates the value of all (possibly) nonzero basis functions at x of order max(jhigh,(j+1)*(index-1)), where t(k) <= x <= t(n+1) and j=iwork is set inside the routine on the first call when index=1. ileft is such that t(ileft) <= x < t(ileft+1). a call to dintrv(t,n+1,x,ilo,ileft,mflag) produces the proper ileft. dbspvn calculates using the basic algorithm needed in dbspvd. if only basis functions are desired, setting jhigh=k and index=1 can be faster than calling dbspvd, but extra coding is required for derivatives (index=2) and dbspvd is set up for this purpose.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(*) | :: | t |
knot vector of length |
|
integer(kind=ip), | intent(in) | :: | jhigh |
order of b-spline, |
||
integer(kind=ip), | intent(in) | :: | k |
highest possible order |
||
integer(kind=ip), | intent(in) | :: | index |
index = 1 gives basis functions of order |
||
real(kind=wp), | intent(in) | :: | x |
argument of basis functions, |
||
integer(kind=ip), | intent(in) | :: | ileft |
largest integer such that |
||
real(kind=wp), | intent(out), | dimension(k) | :: | vnikx |
vector of length |
|
real(kind=wp), | intent(inout), | dimension(*) | :: | work |
a work vector of length |
|
integer(kind=ip), | intent(inout) | :: | iwork |
a work parameter. both |
||
integer(kind=ip), | intent(out) | :: | iflag |
|
Evaluates the b-representation (t
,a
,n
,k
) of a b-spline
at x
for the function value on ideriv=0
or any of its
derivatives on ideriv=1,2,...,k-1
. right limiting values
(right derivatives) are returned except at the right end
point x=t(n+1)
where left limiting values are computed. the
spline is defined on t(k)
x
t(n+1)
.
dbvalu returns a fatal error message when x
is outside of this
interval.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | t |
knot vector of length |
|
real(kind=wp), | intent(in), | dimension(n) | :: | a |
b-spline coefficient vector of length |
|
integer(kind=ip), | intent(in) | :: | n |
number of b-spline coefficients.
(sum of knot multiplicities- |
||
integer(kind=ip), | intent(in) | :: | k |
order of the b-spline, |
||
integer(kind=ip), | intent(in) | :: | ideriv |
order of the derivative, |
||
real(kind=wp), | intent(in) | :: | x |
argument, |
||
integer(kind=ip), | intent(inout) | :: | inbv |
an initialization parameter which must be set
to 1 the first time dbvalu is called.
|
||
real(kind=wp), | intent(inout), | dimension(:) | :: | work |
work vector of length at least |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
real(kind=wp), | intent(out) | :: | val |
the interpolated value |
||
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
Computes the largest integer ileft
in 1
ileft
lxt
such that xt(ileft)
x
where xt(*)
is a subdivision of
the x
interval.
precisely,
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | xt |
a knot or break point vector of length |
|
integer(kind=ip), | intent(in) | :: | lxt |
length of the |
||
real(kind=wp), | intent(in) | :: | xx |
argument |
||
integer(kind=ip), | intent(inout) | :: | ilo |
an initialization parameter which must be set
to 1 the first time the spline array |
||
integer(kind=ip), | intent(out) | :: | ileft |
largest integer satisfying |
||
integer(kind=ip), | intent(out) | :: | mflag |
signals when |
||
logical, | intent(in), | optional | :: | extrap |
if extrapolation is allowed (if not present, default is False) |
DBINT4 computes the B representation (t
,bcoef
,n
,k
) of a
cubic spline (k=4
) which interpolates data (x(i)
,y(i)
),i=1,ndata
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x |
x vector of abscissae of length |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y |
y vector of ordinates of length ndata |
|
integer(kind=ip), | intent(in) | :: | ndata |
number of data points, |
||
integer(kind=ip), | intent(in) | :: | ibcl |
selection parameter for left boundary condition: |
||
integer(kind=ip), | intent(in) | :: | ibcr |
selection parameter for right boundary condition: |
||
real(kind=wp), | intent(in) | :: | fbcl |
left boundary values governed by |
||
real(kind=wp), | intent(in) | :: | fbcr |
right boundary values governed by |
||
integer(kind=ip), | intent(in) | :: | kntopt |
knot selection parameter: |
||
real(kind=wp), | intent(in), | dimension(3) | :: | tleft |
when |
|
real(kind=wp), | intent(in), | dimension(3) | :: | tright |
when |
|
real(kind=wp), | intent(out), | dimension(:) | :: | t |
knot array of length |
|
real(kind=wp), | intent(out), | dimension(:) | :: | bcoef |
b spline coefficient array of length |
|
integer(kind=ip), | intent(out) | :: | n |
number of coefficients, |
||
integer(kind=ip), | intent(out) | :: | k |
order of spline, |
||
real(kind=wp), | intent(inout), | dimension(5,ndata+2) | :: | w |
work array |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
DBSPVD calculates the value and all derivatives of order
less than nderiv
of all basis functions which do not
(possibly) vanish at x
. ileft
is input such that
t(ileft) <= x < t(ileft+1)
. A call to dintrv(t
,n+1
,x
,
ilo
,ileft
,mflag
) will produce the proper ileft
. The output of
dbspvd is a matrix vnikx(i,j)
of dimension at least (k,nderiv)
whose columns contain the k
nonzero basis functions and
their nderiv-1
right derivatives at x
, i=1,k, j=1,nderiv
.
These basis functions have indices ileft-k+i
, i=1,k,
k <= ileft <= n
. The nonzero part of the i
-th basis
function lies in (t(i),t(i+k)), i=1,n)
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | t |
knot vector of length |
|
integer(kind=ip), | intent(in) | :: | k |
order of the b-spline, |
||
integer(kind=ip), | intent(in) | :: | nderiv |
number of derivatives = |
||
real(kind=wp), | intent(in) | :: | x |
argument of basis functions,
|
||
integer(kind=ip), | intent(in) | :: | ileft |
largest integer such that
|
||
integer(kind=ip), | intent(in) | :: | ldvnik |
leading dimension of matrix |
||
real(kind=wp), | intent(out), | dimension(ldvnik,nderiv) | :: | vnikx |
matrix of dimension at least |
|
real(kind=wp), | intent(out), | dimension(*) | :: | work |
a work vector of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
DBSQAD computes the integral on (x1,x2)
of a k
-th order
b-spline using the b-representation (t,bcoef,n,k)
. orders
k
as high as 20 are permitted by applying a 2, 6, or 10
point gauss formula on subintervals of (x1,x2)
which are
formed by included (distinct) knots.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | t |
knot array of length |
|
real(kind=wp), | intent(in), | dimension(:) | :: | bcoef |
b-spline coefficient array of length |
|
integer(kind=ip), | intent(in) | :: | n |
length of coefficient array |
||
integer(kind=ip), | intent(in) | :: | k |
order of b-spline, |
||
real(kind=wp), | intent(in) | :: | x1 |
end point of quadrature interval
in |
||
real(kind=wp), | intent(in) | :: | x2 |
end point of quadrature interval
in |
||
real(kind=wp), | intent(out) | :: | bquad |
integral of the b-spline over ( |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | work |
work vector of length |
|
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
dbfqad computes the integral on (x1,x2)
of a product of a
function f
and the id
-th derivative of a k
-th order b-spline,
using the b-representation (t,bcoef,n,k)
. (x1,x2)
must be a
subinterval of t(k) <= x <= t(n+1)
. an integration routine,
dbsgq8 (a modification of gaus8
), integrates the product
on subintervals of (x1,x2)
formed by included (distinct) knots
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(b1fqad_func) | :: | f |
external function of one argument for the
integrand |
|||
real(kind=wp), | intent(in), | dimension(n+k) | :: | t |
knot array |
|
real(kind=wp), | intent(in), | dimension(n) | :: | bcoef |
coefficient array |
|
integer(kind=ip), | intent(in) | :: | n |
length of coefficient array |
||
integer(kind=ip), | intent(in) | :: | k |
order of b-spline, |
||
integer(kind=ip), | intent(in) | :: | id |
order of the spline derivative, |
||
real(kind=wp), | intent(in) | :: | x1 |
left point of quadrature interval in |
||
real(kind=wp), | intent(in) | :: | x2 |
right point of quadrature interval in |
||
real(kind=wp), | intent(in) | :: | tol |
desired accuracy for the quadrature, suggest
|
||
real(kind=wp), | intent(out) | :: | quad |
integral of |
||
integer(kind=ip), | intent(out) | :: | iflag |
status flag: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | work |
work vector of length |
DBSGQ8, a modification of gaus8,
integrates the product of fun(x)
by the id
-th derivative of a spline
dbvalu between limits a
and b
using an adaptive 8-point Legendre-Gauss
algorithm.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(b1fqad_func) | :: | fun |
name of external function of one argument which multiplies dbvalu. |
|||
real(kind=wp), | intent(in), | dimension(:) | :: | xt |
knot array for dbvalu |
|
real(kind=wp), | intent(in), | dimension(n) | :: | bc |
b-coefficient array for dbvalu |
|
integer(kind=ip), | intent(in) | :: | n |
number of b-coefficients for dbvalu |
||
integer(kind=ip), | intent(in) | :: | kk |
order of the spline, |
||
integer(kind=ip), | intent(in) | :: | id |
Order of the spline derivative, |
||
real(kind=wp), | intent(in) | :: | a |
lower limit of integral |
||
real(kind=wp), | intent(in) | :: | b |
upper limit of integral (may be less than |
||
integer(kind=ip), | intent(inout) | :: | inbv |
initialization parameter for dbvalu |
||
real(kind=wp), | intent(inout) | :: | err |
IN: is a requested pseudorelative error
tolerance. normally pick a value of
|
||
real(kind=wp), | intent(out) | :: | ans |
computed value of integral |
||
integer(kind=ip), | intent(out) | :: | iflag |
a status code: |
||
real(kind=wp), | intent(inout), | dimension(:) | :: | work |
work vector of length |