Software for Scientific Applications

Home ] Physics ] Circuit ] Papers ] f2c ] ScienTrivia ] Astronomy ] Magnetics ]

It would be difficult to imagine applications that are better suited to computers than those that arise in the pure and applied sciences. The physical sciences, particularly, have long depended on computers to find solutions for otherwise intractable problems. The need to solve ballistics problems, in fact, provided motivation for early computer development programs. The development of the Fast Fourier Transform stands as a spectacular example of the synergy between algorithms, computers and applications.

The linear and nonlinear links below will take you to a number of downloadable codes in C and C++ on this web site which are particularly well suited for scientific computing.

Ports of FORTRAN Scientific Software to C

Many of the early software packages for the general solution of problems in mathematics, statistics and analysis were written in Algol or  FORTRAN. Amazingly, very few of these have exact counterparts in C or C++, although some of them have been translated by F2C or some similar program. This is unfortunate, if only because C and C++ provide dynamic memory management which offers significant advantages over early FORTRAN. C also supports recursion, which some early FORTRAN compilers did not. Hence, there are some situations for which C can provide a better solution than FORTRAN.

 To provide some relief for the omissions, the author has hand ported several Algol and FORTRAN packages to C. These ports are intended to take advantage of the advanced features of C without compromising the carefully worked out and thoroughly tested algorithms of the original code.

QUADPACK in C

A port of QUADPACK to C can be downloaded from this page.. This is a complete port, including every file in the original package. Modifications are intended to be non-intrusive, but include improved memory management.

MINPACK in C

MINPACK is one of the most robust, complete and thoroughly documented of the non-linear minimization/optimization packages. There are numerous 'paths' possible for solving problems in the full FORTRAN package, depending on the availability of a user provided Jacobian matrix. The path provided here does not require the Jacobian, as it is estimated internally by a finite difference approximation. This path is ideal for solving parameter estimation problems. The C port is here.

EISPACK in C

Like the MINPACK port above, this is a port of one of the paths through the eigensystem package. It includes both HQR and HQR2, along with the BALANC routine. Although the original package provided several codes to convert the input matrix to an upper Hessenberg equivalent, only ELMHES is included in the package.

Jenkins-Traub in C++

The Jenkins-Traub method for finding all roots of polynomials is considered the standard by which all others are judged. It is very robust and often accurately locates roots which defy other methods. Here is a  complete port of the method from TOMS493 to C++. Some other methods for finding real and complex roots of polynomials can be found on this page, including new methods which perform well on polynomials with multiple roots.

Linear and Nonlinear Solvers

Software for linear and nonlinear solvers are available at Linear and Nonlinear, respectively.

Astronomy

This section is currently under construction. Its purpose is to provide a gentle, but thorough introduction to the solar system.

ScienTrivia

The past few centuries have clearly affirmed the triumph of science over superstition. At the same time, a number of interesting or unexpected facts have emerged. Some of my favorites are here.

Physics

Here you will find a collections of physics problems and solutions with novel situations.