MS Research PhD Research Curriculum Vitae
On-line Stores Cycling Medicine & Health LaTeX OOP & C++ Sony PCM-R500 DAT |
![]() |
Next: Interpolation of q', and Up: Implementation of the interface Previous: Implementation of the interface   Contents   Index Interpolation with cubic splines
A cubic spline is a set of 3rd degree polynomials, s(x), one for each function
value given by
which satisfies where the superscript (p) indicate the pth derivative of s with respect to x and the superscripts + and - indicate right-hand limits and left-hand limits respectively..
In order to fit the cubic spline to the function values we require that
where si is defined by
If we furthermore assume that
we can transform the problem of finding the d-values in (13.3) which satisfies (13.4), (13.5) and (13.7) to a cubic spline of the form
where si'' is defined by
and hi is defined by
If we apply the continuity conditions (13.4) to (13.8) we find that the constants si'' have to fulfill
Equation (13.11) can be cast into the following matrix equation where Since the tri-diagonal coefficient matrix is positive definite we can employ the efficient double-sweep method13.1 (see [6]) which is based on simple Gaussian elimination in order to solve the equations (13.12).
In conclusion we can state that the interpolation of a set of (M+1) points
{xi,yi} with a cubic spline is achieved by solving a simple tri-diagonal
system of equation which has an order of (M-1). A cubic spline is
implemented as a structure of the three vectors
With j* known we calculate the function value, s(x*), by (13.8). Let us for the moment assume that the interpolated function values yi originate from some function f(x), ie yi = f(xi).
We can now define the interpolation error, EI(x), as
The maximum interpolation error associated with the cubic spline interpolation described above can be stated as ([62]) where H is defined by We can conclude that the interpolation error associated with the cubic spline interpolation in the general case where we cannot guarantee f''(x0) = f''(xM) = 0 is of order Note that in our case the points {xi,yi} on which the interpolating function s(x) is based originate from a numerical solution to a given problem13.3which implies that the points from the start is distorted mostly by discretization errors. It is therefore of major importance that the order of the interpolation error is not smaller than the order of the numerical method which produces the points {xi,yi}. If this requirement is not fulfilled the order of the numerical method would be destroyed by interpolation errors. As we saw in sections 1.5 and 7.2 the order of the numerical methods employed in the coupled model do not exceed 2 and we can therefore state that interpolation with cubic splines is adequate for our case.
Next: Interpolation of q', and Up: Implementation of the interface Previous: Implementation of the interface   Contents   Index Revision 2.0, Copyright © 1999-2004 Jakob Christensen http://www.JakobCHR.com E-Mail: webmaster@JakobCHR.com
|