[CSC 335] Tridiagonal Solvers
Andrew J. Pounds
pounds_aj at mercer.edu
Sat Sep 27 18:10:30 EDT 2025
So I know some of you are working on Homework 3 and the NMR project --
and you are getting to that part where you have to start computing the
cubic splines. I encourage you to do the homework first -- get your
code working on those smaller problems, and then move to the project.
For both the natural and clamped cubic spline your text provides
pseudocode (Algorithms 3.4 and 3.5). If you look closely at those
algorithms the notes tell you that portions of the algorithm are solving
a tridiagonal linear system using a matrix algorithm from Chapter 6.
You will be fine using the algorithms as they are written, but some of
you asked me about using math/linear algebra libraries for this process.
For those that want to try this, I have examples of how to use three
math libraries: LAPACK (Fortran), GSL (C), and Armadillo (C++). You
will find the example code in the EXAMPLES section of the
https://theochem.mercer.edu/csc335 web page. Cobra was missing the
include files for Armadillo, but I fixed that.
You will find compilation instructions inside all three of the code
sources. I just tested all three on cobra and they work perfectly. If
you need to get more information about these libraries work I have links
to the documentation in the REFERENCE section of
https://theochem.mercer.edu/csc335.
--
*/Andrew J. Pounds, Ph.D./*
/Professor of Chemistry and Computer Science/
/Director of the Computational Science Program/
/Mercer University, Macon, GA 31207 (478) 301-5627/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20250927/7ef0dc2c/attachment.htm>
More information about the csc335
mailing list