Books with Fortran code, other than textbooks

Many books that are not Fortran textbooks and may not have Fortran in the title do reference Fortran code. Here is a list of Related Topics books from the Fortran Wiki. Links to code are provided when they are not at the book site. Suggestions for other books using Fortran are welcome.

Anagnostopoulos, Konstantinos (2016). Computational Physics freely available in Fortran and C++ versions

Antia, H.M. (2012) Numerical methods for scientists and engineers, 3rd ed. Hindustan Book Agency.

Berg, Bernd A (2004). Markov Chain Monte Carlo Simulations and Their Statistical Analysis – With Web-Based Fortran Code World Scientific

Bestehorn, Michael (2018). Computational Physics With Worked Out Examples in FORTRAN and MATLAB De Gruyter

Boor, Carl de (1978) A Practical Guide to Splines Springer. PPPACK Fortran 90 code here

Bose, Sujit Kumar (2019). Numerical Methods of Mathematics Implemented in Fortran Springer. reviewed here

Burden, Richard, L., J. Douglas Faires and Annette M. Burden (2016). Numerical Analysis, 10th ed. Cengage. FORTRAN 77 code here

Clerman, Norman S. and Spector, Walter (2011). Modern Fortran - Style and Usage. Cambridge University Press. reviewed in the Journal of Statistical Software

Chapman, Barbara et al. (2007). Using OpenMP - Portable Shared Memory Parallel Programming. The MIT Press.

Dennis, Jr., J.E., and Robert B. Schnabel (1996). Numerical Methods for Unconstrained Optimization and Nonlinear Equations SIAM. Fortran 90 code for UNCMIN at Alan Miller’s site

Paul Dierckx, Paul (1993). Curve and Surface Fitting with Splines Oxford. code here

Engeln-Müllges, Gisela and Uhlig, Frank (2013). Numerical Algorithms with Fortran. Springer.

Fehr, Hans and Kindermann, Fabian (2018). Introduction to Computational Economics Using Fortran. Oxford University Press.

Giordano, Nicholas J., and Hisao Nakanishi (2005). Computational Physics Prentice-Hall

Gropp W., Lusk, E. and Skjellum, A. (1999). Using MPI - Portable Parallel Programming with the Message Passing Interface. The MIT Press.

Hairer, Erns, Syvert P. Nørsett, and Gerhard Wanner (1993). Solving Ordinary Differential Equations I: Nonstiff Problems Springer. code at Hairer’s site

Hairer, Ernst, and Gerhard Wanner (1996). Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems Springer. code at Hairer’s site

Hjorth-Jensen, Morton (2008). Computational Physics

Kahaner, David, Cleve Moler, and Stephen Nash (1998) Numerical Methods and Software Prentice Hall. Fortran 90 code here

Kampf, Jochen (2010). Advanced Ocean Modelling: Using Open-Source Software Springer

Kernighan, Brian W. and Pike, Rob (1999). The Practice of Programming. Addison-Wesley.

Lee, H.J., and W.E. Schiesser (2003). Ordinary and Partial Differential Equation Routines in C, C++, Fortran, Java, Maple, and MATLAB Chapman and Hall/CRC

Marazzi, Alfio (1993). Algorithms, Routines, and S-Functions for Robust Statistics Chapman and Hall/CRC. FORTRAN 77 code available in robeth R package

Markus, Arjen (2012). Modern Fortran in Practice Cambridge University Press.

Mielke, Jr., Paul W., and Kenneth J. Berry (2007). Permutation Methods: A Distance Function Approach Springer. code at Mielke’s site

Miller, Alan (2002). Subset Selection in Regression, 2nd ed. Chapman and Hall/CRC. code at Miller’s site

Oliveira, Suely and Stewart, David (2006). Writing Scientific Software - A Guide to Good Style. Cambridge University Press.

Pang, Tao (2006) An Introduction to Computational Physics, 2nd Edition Cambridge University Press

Press, Flannery, Teukolsky, and Vetterling (1992). Numerical Recipes in Fortran 77. Cambridge University Press.

Press, Teukolsky, Vetterling and Flannery (1996). Numerical Recipes in Fortran 90 - The Art of Parallel Scientific Computing. Cambridge University Press

Rouson, D., J. Xia, and X. Xu (2011). Scientific Software Design - The Object-Oriented Way. Cambridge University Press.

Ramos, Juan Antonio Hernandez, and Lopez, Javier Escoto (2020) How to learn Applied Mathematics through modern FORTRAN. Independently published code and text

Ruetsch, Gregory and Fatica, Massimiliano (2013). CUDA Fortran for Scientists and Engineers. Morgan Kaufmann.

Saad, Yousef (2003). Iterative Methods for Sparse Linear Systems, 2nd Edition SIAM

Saad, Yousef (2011). Numerical Methods for Large Eigenvalue Problems - 2nd Edition SIAM

Smith, I.M., D. V. Griffiths, and L. Margetts (2013) Programming the Finite Element Method, 5th Edition Wiley.

Snir, Marc and Gropp, William (1998). MPI - The Complete Reference. The MIT Press.

Tanizaki, Hisashi (2004) Computational Methods in Statistics and Econometrics CRC Press

Willé, David R. (1995). Advanced Scientific Fortran. Wiley…

5 Likes

I know of a few more, but in many cases the code samples follow F77 conventions (or older) and would benefit from refactoring before being put to use again:

  • Finlayson, Bruce A. (1980). Nonlinear Analysis in Chemical Engineering. McGraw-Hill.

  • Davis, Mark E. (1984). Numerical Methods & Modeling for Chemical Engineers. John Wiley & Sons.

  • Forsythe, George E., Malcolm, Michael A., and Moler, Cleve B. (1977). Computer Methods for Mathematical Computations. Prentice-Hall. (code can be found in the fmm folder at Netlib)

  • Lawson, Charles L., and Hanson, Richard J. (1974). Solving Least Squares Problems. Prentice-Hall. (original code can be found in the lawson-hanson folder at Netlib; I’ve done some preliminary work to produce a modern interface here)

  • Bierman, Gerald J. (1977). Factorization Methods for Discrete Sequential Estimation. Dover Publications. (contains Fortran pseudo-code for numerically stable Kalman filters)

  • Prausnitz, J., Anderson, T., Grens, E., Eckert C., Hsieh, R., and O’Connell, J. (1980). Computer Calculations for Multicomponent Vapor-Liquid and Liquid-Liquid Equilibria. Prentice-Hall.

  • Siouris, George M. (1996). An Engineering Approach to Optimal Control and Estimation Theory. John Wiley & Sons.

  • Villadsen, John, and Michelsen, Michael L. (1978). Solution of Differential Equations Models by Polynomial Approximation. Prentice-Hall. (I’ve extracted the code from the book previously, and can provide it upon request).

  • Fletcher, C. A. J. (1984). Computational Galerkin Methods. Springer-Verlag.

  • Fornberg, Bengt (1998). A Practical Guide to Pseudospectral Methods. Cambridge University Press.

  • Boyd, John P. (2001). Chebyshev and Fourier Spectral Methods. Dover Publications. (a small example of a Chebyshev collocation solver is given, I have a modified version of the code here).

  • Kopriva, David A. (2009). Implementing Spectral Methods for Partial Differential Equations. Springer. (contains Fortran-friendly pseudo-code; the author has contributed routines to the HORSES2D high-order spectral element solver in Fortran)

  • Schwarz, H. R. (1991). FORTRAN-Programme zur Methode der finiten Elemente. B. G. Teubner. (in German)

  • Alexandrou, Andreas (2001). Principles of Fluid Mechanics. Prentice-Hall. (my favourite undergraduate textbook on fluid mechanics; contains a few simple root-solving, ODE, and PDE examples)

  • Ferziger, Joel H., Perić, Milovan, Street, Robert L. (2020). Computational Methods for Fluid Dynamics. Springer. (another great textbook; CFD codes in Fortran 77 available at the website http://cfd-peric.de/)

  • Blazek, Jiri (2015). Computational Fluid Dynamics: Principles and Applications. Elsevier Ltd. (companion codes in Fortran can be downloaded at https://booksite.elsevier.com/9780080999951/; the author also offers a free CFD solver called Snas3D)

  • Huang, Haibo, Sukop, Michael C., and Lu, Xi-Yun (2015). Multiphase Lattice Boltzmann Methods: Theory and Application. Wiley Blackwell. (full example programs in Visual Fortran available at a companion website)

4 Likes

One more:

1 Like

My “go to” book/reference for introducting MPI to students is an old IBM Redbook that is
very Fortran centric. It covers MPI 1 but MPI’s dirty little secret is there are only about
15 or so function calls you need to know to write the majority of MPI codes and they were all part
of MPI 1. I can’t find it on IBM’s Redbook site but there is a copy available here:

RS/6000 SP: Practical MPI Progrmming (SG24-5380=00)

For my fellow Aerospace Engineers, I also recommend the following

Katz and Plotkin, 2nd Ed., (2010), Low-Speed Aerodynamics, Cambridge University Press
C.A.J. Fletcher, Computational Techniques for Fluid Dynamics, Vol 1 and 2, Springer-Verlag

Both have Fortran code for things like grid generation, panel codes etc. A grid generation specific book that has Fortran code for most ot the methods discussed is

Farrashkalvat and Miles (2002), Basic Structured Grid Generation, Butterworth-Heinemann

Also, although a textbook , the following (if you can find a copy) has several complete programs/procedures that are useful. Plus I’ve always liked this book’s structure and clarity. Unfortunatly, the only Modern Fortran text that I know of that comes close to it is Chapmans books but they are horribly expensive for a hardcover etc. edition (and the eBooks aren’t much cheaper).

Ellis, Phillips, Lahey (1994), Fortran 90 Programming, Addison-Wesley

Sorry, I don’t know how to associate the book titles with links.

RW

4 Likes

Almost forgot Robin Vowels book

Vowels (1999), Algorithms and Data Structures in F and Fortran, Unicomp

1 Like

Great post! I was actually looking for books on mathematical software design when saw this post. Does anyone recommend one over the other?

Looks like Oliveira, Suely and Stewart, David (2006). Writing Scientific Software - A Guide to Good Style. Cambridge University Press. is what I’m looking for.

Maybe Rouson, D., J. Xia, and X. Xu (2011). Scientific Software Design - The Object-Oriented Way. Cambridge University Press. too.

Does anyone recommend any of those, or maybe a different one? My biggest concern if it’s too dedicated to Fortran is that it might be in old Fortran style… and I’d like to write nice modular mathematical software I the bleeding edge modern Fortran.

1 Like

I work with @rouson, and I’d say his book holds up pretty well to what we’re still teaching people. It’s modern Fortran, with some C++ too.

2 Likes

This book is not that heavily Fortran oriented. Some of the chapters give examples in C. There is a rather incomplete example of a Fortran cubic spline library. Overall, the content is still pretty good.

I feel like the book by Rouson takes more time to sink in fully. I only understood certain chapters once I encountered the same problems in practice. The part about interfacing between C++ and Fortran is slightly outdated already, but other than that I’d say the material is still more than relevant.

4 Likes

It’s a shame this book is out of print. It contains several interesting algorithms which are rarely seen in Fortran (e.g. red and black tree).

For Finite Element Analysis
Programming the Finite Element Method

1 Like

Cool! Thanks for the info. I just saw a not-so-good review (quite long and extended) in Amazon and now I doubt. But thanks anyway. I’ll give it a try.

Great to have comment from someone close to the author. Thanks a lot! At the beginning Olivera’s one looked more attractive to me (maybe because of the content and chapters), but reviews seem to be like “it’s ok but…”, so I’ll have a look at Rouson’s one too.

Georg Hager and Gerhard Wellein. 2010. Introduction to High Performance Computing for Scientists and Engineers (1st. ed.). CRC Press, Inc., USA.

The opening chapter uses a “vector triad” Fortran code to demonstrate SIMD vectorization. Throughout the book, it uses Fortran alongside C and C++ to illustrate many computing methods in HPC scientific computing. It was my first proper introduction to many of these concepts and was invaluable to helping me transition to this field.

Several older editions of some classic Finite Element texts
have either listings of complete 1D and 2D programs. Unfortunately
I think later editions have moved to Matlab or Python. Also
some of these might be out of print but any decent University
library will have a copy.

Hinton and Owens, Finite Element Programming, Academic Press (1977)
Fortran routines for forming stiffness matrix, frontal solvers etc.

J.N. Reddy, An Introduction to the Finite Element Method, 2nd Edition, McGraw Hill, 1993
Listings of two complete 1D and 2D FEM programs. I think they were removed in later editions
and you have to contact the author for the code.

K. Bathe, Finite Element Procedures, Prentice Hall (1996)

Complete FEM program (STAP) plus some nice implementations of Jacobi and Subspace Iteration
eigenvalue/vector solvers

T.J.R. Hughes, The Finite Element Method: Linear, Static and Dynamic Finite Element Analysis, Dover Edition (2000)

The DLEARN program referenced in the book can be downloaded from:
DLEARN – Zace Services SA, ZSoil.PC – software for geotechnics and geomechanics

J.E. Akins, Finite Elements for Analysis and Design, Academic Press (1998)

Lots of listing of subroutines in the book for the usual FEM related things (calculating shape functions,
solvers, etc). The book came with a 3.5 floppy with source for the MODEL FEM program but the MODEL
program is available at:
http://softlib.rice.edu/finite_elem.htm

Finally, another CFD related book with some very useful Fortran programs is

J. Moran, An Introduction to Theoretical and Computational Aerodynamics, Dover Edition (2003)

Yes, I wish the author would consider an updated version with
a Modern Fortran focus and include info on newer sorting methods
(merge sort, tim sort etc), some geometric tree algorithms
(quad tree, octree, k-d trees etc) and associated fast nearest-neighbor
N-body search algorithms.

Two brilliant books on splines by Helmuth Spaeth. The code is in F77, but quite useful. I’ve never found the code from the book in a file, but all the routines are fairly short and easy to type and modernized if necessary.

Spaeth, Two Dimensional Spline Interpolation Algorithms, 1993

Spaeth, One Dimensional Spline Interpolation Algorithms, 1995