Polylib: routines for polynomial integration, differentiation and interpolation


Source Code


The above c-code and header file contains all the routine for numerical integration and collocation differentiation as discussed in Chapter 2 and Appendices B and C. The routine include Guassian quadrature using classical Gauss, Gauss Radau and Gauss Lobatto for all Jacobi weights.

Documentation

The code has been documented using Doxygen which generates html from the source line code. To view the documentation on click the following link: Documentation of polylib.c.

C++ Compilation

If the file polylib.c is compiled using a C++ compiler the routines have been wrapped in a namespace called polylib.

Testing

To test the routines the following file the file polylib_test.c (13.5Kb) contains a series of routines which perform a series of three test. The first of which test the Guassian quadrature on a known polynomial for all rules (i.e. Guass, Gauss-Radau and Gauss-Lobatto) at a range of different Jacobi weights. The second series of tests check the collocation differentiation of a known polynomial function at different sets of zeros corresponding to the different integration rules. The final test performs a series of interpolation rules by interpolating a known polynomial from the zeros of the Gaussian quadrature to equispaced points. Details of the test are given in the header file as well as example of how to compile the file when placed in the same directory as polylib.c and polylib.h.