[SciPy-dev] Re: Splines module

Tim Lahey tjlahey at mud.cgl.uwaterloo.ca
Fri Aug 3 13:56:28 CDT 2001


> 
> Date: Thu, 2 Aug 2001 15:55:24 -0600 (MDT)
> From: Travis Oliphant <oliphant at ee.byu.edu>
> To: <scipy-dev at scipy.org>
> Subject: [SciPy-dev] Spline module
> 
> 
> I'm not necessarily opposed to a separate splines module.  But, splines do
> get used in a number of different ways --- and the algorithms used in each
> domain do tend to differ.
> 
> Perhaps your spline code would be better in a finite-element package,
> rather than a spline module.
> 
> Love to have more help with scipy...
> 
> I don't mind f77 code (but then again I haven't dealt with the Windows
> headaches as much as eric :-) ).
> 
> -Travis

Well, 

I base my code on some general B-spline code (written in F77) from the
SLATEC library in Netlib. I only use less than a half dozen functions 
from the library, but it does include:  

BINT4 - interpolates with splines of order 4
BINTK - interpolates with splines of order k
BSQAD - integrates the B-representation on subintervals
PPQAD - integrates the PP-representation
BFQAD - integrates the product of a function F and any spline
        derivative in the B-representation
PFQAD - integrates the product of a function F and any spline
        derivative in the PP-representation
BVALU - evaluates the B-representation or a derivative
PPVAL - evaluates the PP-representation or a derivative
INTRV - gets the largest index of the knot to the left of x
BSPPP - converts from B- to PP-representation
BSPVD - computes nonzero basis functions and derivatives at x
BSPDR - sets up difference array for BSPEV
BSPEV - evaluates the B-representation and derivatives
BSPVN - called by BSPEV, BSPVD, BSPPP and BINTK for function and
	derivative evaluations

where PP-representation is piecewise polynomial representation, and
B-representation is B-spline representation. These are the basic
functions the spline toolbox are based off of. From BSPVD one can 
get the tensor product B-spline form, which is what I do. There are
some other routines in 

Carl de Boor, A Practical Guide to Splines, Applied
Mathematics Series 27, Springer-Verlag, New York,
1978.

for solving ODEs through co-location. The way I see things is that
we can create a base spline module that includes the above functions
(save BINT4 and BINTK) and have separate modules for:

interpolation, solving ODEs through co-location, and my FEM code (possibly). 

Thoughts ?

Cheers,

Tim. 






More information about the Scipy-dev mailing list