C Library Functions - spli2d (3)
|
from |
* a practical guide to splines * by c. de boor
|
calls bsplvb, banfac/slv
|
this is an extended version of |
|
splint , for the use in tensor prod-
uct interpolation.
|
|
spli2d produces the b-spline coeff.s bcoef(j,.) of the spline of
order k with knots t (i), i=1,..., n + k , which takes on the
value gtau (i,j) at tau (i), i=1,..., n , j=1,..., m .
****** |
i n p u t ******
|
tau.....array of length | |
n , containing data point abscissae.
|
a s s u m p t i o n . . . | |
tau is strictly increasing
|
|
|
gtau(.,j)..corresponding array of length | |
n , containing data point
ordinates, j=1,...,m
|
t.....knot sequence, of length | |
n+k
|
n.....number of data points and dimension of spline space | |
s(k,t)
k.....order of spline
m.....number of data sets
|
|
|
****** |
w o r k a r e a ******
|
work |
a vector of length n
|
|
|
****** |
o u t p u t ******
|
q.....array of size | |
(2*k-1)*n , containing the triangular factoriz-
ation of the coefficient matrix of the linear system for the b-
coefficients of the spline interpolant.
the b-coeffs for the interpolant of an additional data set
|
(tau(i),htau(i)), i=1,...,n | |
with the same data abscissae can
be obtained without going through all the calculations in this
|
routine, simply by loading | |
htau into bcoef and then execut-
|
ing the | |
call banslv ( q, 2*k-1, n, k-1, k-1, bcoef )
|
|
|
bcoef.....the b-coefficients of the interpolant, of length
iflag.....an integer indicating success (= 1) | |
or failure (= 2)
the linear system to be solved is (theoretically) invertible if
and only if
|
t(i) .lt. tau(i) .lt. tau(i+k), | |
all i.
|
|
|
violation of this condition is certain to lead to | |
iflag = 2 .
|
|
|
****** |
m e t h o d ******
|
the i-th equation of the linear system | |
a*bcoef = b for the b-co-
|
|
|
effs of the interpolant enforces interpolation at |
|
tau(i), i=1,...,n.
|
hence, |
b(i) = gtau(i), all i, and a is a band matrix with 2k-1
bands (if it is invertible).
|
the matrix | |
a is generated row by row and stored, diagonal by di-
|
|
|
agonal, in the | |
r o w s of the array q , with the main diagonal go-
|
ing into row | |
k . see comments in the program below.
|
the banded system is then solved by a call to | |
banfac (which con-
|
|
|
structs the triangular factorization for | |
a and stores it again in
|
q ), followed by a call to | |
banslv (which then obtains the solution
|
bcoef |
by substitution).
|
banfac |
does no pivoting, since the total positivity of the matrix
|
|
|
|
|
a |
makes this unnecessary.
|
dimension q(2*k-1,n), t(n+k)
current fortran standard makes it impossible to specify precisely the
|
dimension of | |
q and t without the introduction of otherwise super-
fluous additional arguments.
|
|
|
|
Nemo Release 3.1 | spli2d (3) | June 29, 2025 |
Generated by manServer 1.08 from 5ac62116-c409-4fd0-85b9-f25b5123fc2d using man macros.