Docsity

ASTR 5540 Problem Set 4: Error-controlled Numerical Integrator - Prof. Andrew J. S. Hamilt, Assignments of Astronomy

Toggle sidebar
bg1
ASTR 5540 Math Meth Fall 2008. Problem Set 4. Due Mon Sep 22
1. Error-controlled numerical integrator
(a) Code
Write a routine that calls the integrator that you wrote in Problem Set 2, that carries out
automatic stepsize control to specified relative and absolute error. As before, you are free
to choose the algorithm and language of your choice, the defaults being the c language, and
the 4th-order Runge-Kutta algorithm.
You are welcome to use the template routines on the class website at http://casa.colorado.
edu/∼ajsh/astr5540 08/prob.html. Since I want you to focus your energies on the routine
that does automatic stepsize control, the template routines include a complete, debugged
test driver routine test rk4e.c.
(b) Test
Test your code by integrating the equations for the evolution of hydrogen in a fast shock
from Problem Set 3.
1

Partial preview of the text

Download ASTR 5540 Problem Set 4: Error-controlled Numerical Integrator - Prof. Andrew J. S. Hamilt and more Assignments Astronomy in PDF only on Docsity!

ASTR 5540 Math Meth Fall 2008. Problem Set 4. Due Mon Sep 22

  1. Error-controlled numerical integrator

(a) Code

Write a routine that calls the integrator that you wrote in Problem Set 2, that carries out automatic stepsize control to specified relative and absolute error. As before, you are free to choose the algorithm and language of your choice, the defaults being the c language, and the 4th-order Runge-Kutta algorithm.

You are welcome to use the template routines on the class website at http://casa.colorado. edu/∼ajsh/astr5540 08/prob.html. Since I want you to focus your energies on the routine that does automatic stepsize control, the template routines include a complete, debugged test driver routine test rk4e.c.

(b) Test

Test your code by integrating the equations for the evolution of hydrogen in a fast shock from Problem Set 3.