MATHEMATICAL METHODS
ASTR5540
Software
Here you can get my codes that I used throughout this class. There is
no copyright on them, so you are free to do with them whatever you want.
- Evaluation of integrals using the Simpson rule
with reuse of the function values.
- Solution to a system of ODEs using the
embedded Runge-Kutta solver. Two sets of parameters are supplied: Fehlberg
(the better one, contrary to the claim by "Numerical Recipes") and Cash-Karp
(the worse, but faster one).
- Solution to a system of stiff ODEs using the
incomplete Jacobian method of Gnedin & Gnedin
(
Astrophysical Journal, 509, 11 or
astro-ph 9712199).
Be aware that the ApJ text contains a typo: the last number in the second
row of Table 4 (typed in as -2.78108...) should be -3.049038105676658006.
The code has the correct number.
- Minimization of functions: a small wrapper
around the "Numerical Recipes" amoeba routine (which implements
downhill simplex method) that runs amoeba several times in an
attempt to find the best minimum.