I have been writing an adaptive mesh refinement (amr) code. As a prototype for the code, I have been looking at an adaptive mesh refinement code written by my adviser (written in c). I find looking at their code to be useful, but the code also does things like make heavy use of global variables, and I am wondering if there are potentially better ways of implementing Berger and Oliger syle amr.
Could someone point me to some source code for a simple (say one dimensional) amr code for hyperbolic pde? I'd like to compare and contrast with what my adviser wrote (which is not publicly available so I unfortunately cannot link to it here). I have been looking at the websites of other amr codes (e.g. chombo) but I haven't found a simple example implementation of the basic Berger and Oliger algorithm.
EDIT: while there is now an "accepted" answer (a link to Berger's website which includes good documentation), that code is mostly written in Fortran; I would certainly appreciate links to example amr codes with documentation written in other languages (e.g. c++)!
Another EDIT: Perhaps this a bit shameless but I finally wrote my own simple amr code (in c), which you can find here. I'd still appreciate more links to other AMR codes that have relatively simple apis and good documentation (I should say my code meets neither of those criteria...)