With this technique the functions to be interpolated (respt. integrated) e.g. pressure, temperature, etc... are approximated by piecewise polynomials which coincide with the function at interpolation points (respt. fulfill the differential equation). With a lattice with points at qi, for algebra, the simplest way for writing piecewise polynomials at the location q, is the use of the canonical basis, i.e., the powers of (q-qi). For the calculations that basis leads to algorithms having poor stability conditions; among the bases available for the linear set of piecewise polynomials, a local basis, the normalized B-spline basis, leads to stable algorithms.
A B-spline is itself, obviously, a piecewise polynomial.
It can be defined either from divided differences (deBoor, loc. cit.;
Gaches, 1988),
or from the algorithm used for their calculation; they are
convolution products of the (door) function (Marchouk & Agochkov 1985).
Before going ahead in the definition of the B-splines, one must
define more precisely what is a piecewise polynomial
of order s, on a given
partition
of [1,n],
:
is defined as a function
which coincides, on each sub-interval
,
with a polynomial of degree s-1.
The existence and uniqueness of
on
results from the knowledge, at each breakpoint qi, of the kind of connection
which is required between the right and the left pieces of polynomials.
As an example, the so-called "natural spline"
is a piecewise polynomial
of order 4
(degree 3), constructed in such a way that, at the inner breakpoints
, the second derivatives
are continuous.
Formally, the rules of connection can differ from one breakpoint
to the next: at some of them,
can be discontinuous, at some others the left and right pieces
can be tied fulfilling
the continuity of their first derivatives or only of
, etc...\
For each qi, the connection is characterized by the so-called
multiplicity mi obtained as follows:
let
be the order of the oscularity of the connection
between the left and right polynomial pieces at the breakpoint qi;
di=0 means
continuity of
, di=1 means
continuity of the first derivative,
di=2 (
) of the second ones etc... and one sets di=-1 for a
discontinuity of the function itself.
At i=1 and i=n (inner and outer boundaries) one fixes the value
of
. This is equivalent to assume that
is
discontinuous at these points. Hence, one has d1=dn=-1.
The multiplicity of the point qi is then defined as:
From the vector of multiplicities:
one constructs the heart of the calculation with B-spline:
the so-called "nodal vector":
associated to a B-spline basis; it is the vector
which has the qi for coordinates, each of them appearing
mi times.
is written:
The dimension of is then S+mn, with
.
A convenient schematic representation of a nodal vector consists in
writing one column of mi elements for each breakpoint qi.
As an example, with s=4, n=7,
continuity of at q3,
of
at q6,
of
at q2 and q5,
and discontinuity of
at q4,
the nodal vector is represented as:
Once given this nodal vector,
the value of the k-th normalized B-spline
on (
) is obtained by induction:
and, for :
Note that its first derivative can easily be calculated:
From these relationships one can see that if
. Hence the B-spline basis
is a local basis. Moreover,
, only s B-splines
of order s are not identically zero and their sum is equal to 1.
For their calculation, algorithms which avoid zero denominator have
been designed. The present work uses the Schumaker's () algorithms
5-5, 5-11 and 5-13.
It can be shown that the set of all
the B-splines
, forms a
basis for the linear space of the set of the piecewise polynomials having
for nodal vector. Thus, the dimension of
is
precisely S.
For discontinuous piecewise polynomials the use of B-spline basis is particularly convenient since only the algorithm which constructs the nodal vector is concerned with the discontinuity.
The extension to several dimensions are found in Schumaker (loc. cit.) and in deBoor (loc. cit.)
There are two standard methods for the calculation of the coordinates pk,j:
i) in the collocation method one fulfills Eq. (B4 (click here)) at a
number of grid points, , equal to the dimension S of the
B-spline basis, ii) in the
Galerkin method one defines an inner product and calculates the
weak solutions which ensure that the residual:
is orthogonal to the basis:
With non-linear differential problems, Eq. (B4 (click here)) and Eq. (B5 (click here)) are also non-linear. They are linearized for the pk,j and solved by iterations (Newton-Raphson method). For the sake of brevity details are omitted.
Figure 8: Normalized B-splines of order s=2 (left panel) and s=3
(right panel) calculated with deBoor basis for n=3
equidistant mesh points. The nodal vectors are indicated by crosses
below both graphs
For each mesh and for each piecewise polynomial, s parameters have
to be known (recall that is, on [qi,qi+1], a
polynomial of degree s-1). The continuity of the function
or the boundary conditions of the problem provide one constraint,
the equations have to be written at s-1 points within each mesh.
These are called the collocation points, noted
, where S=(n-1)(s-1)+1 and are defined as follow:
The quantities can be almost arbitrarily chosen. However,
for the deBoor's nodal vector, they are chosen as the zeros of
the (s-1)-th Legendre polynomial.
Note that the collocation points are therefore different from the mesh
points qi; this disposition is particularly convenient at the center.
For this particular
collocation pattern, it can be demonstrated that, for first order
differential equations, the overall approximation is of order
O(h)s, but that it is of order up to O(h)2(s-1) at the mesh
points (deBoor & Swartz 1973); here h is the size of the mesh. This
is the so-called superconvergence.
Once written the differential equation on this particular basis, including
boundary conditions at both ends, is formally written:
where for the j-th unknown is a function of q and of
the vector
of the coordinates pk,j,
.
The resolution of the non-linear system Eq. (B7 (click here))
is obtained by
linearization (Newton-Raphson method) starting from the initial model.
Since the B-splines basis is a local
basis, the jacobian matrix is block-diagonal.
This allows storage ease and faster calculations.
Here one usually uses either
s=2, s=3 or s=4 for the order of the piecewise polynomials.
As an example for system Eq. (21 (click here)), the linear
system to be solved has then one of the following structures for s=2 (left)
and s=3 (right):
here the "" are
matrix for the collocation
points and the
are
matrix for the boundaries.
As an example from Eq. (21 (click here)) results a jacobian matrix 2s+1 bloc-diagonal
of blocks.
For s=2, the linear
system to be solved has the following structure:
Note that the inner products between two B-splines of
order less or equal to
s are obtained without error with a Gaussian type integration formula with
s points; the same integration formula is also used for all the inner
products; the calculation of these inner products is conveniently made with
the algorithm 5-22 of Schumaker (loc. cit.).
Emphasize is made again on the fact that the values of the functions
are not needed at the grid points, particularly at the center.