begin_html [use: jsMath] [use: doc/doc.css]

AMRCLAW Sample Code

Description

Advection equation for 2d solid body rotation in an annulus. $q_t + u(x,y)q_x + v(x,y)q_x = 0$, with \[ u(x,y) = -2\pi y, \qquad v(x,y) = 2\pi x. \] Solid body rotation with period 1. Polar coordinates.

Plots of results

After running this code and creating plots via "make .plots", you should be able to view the plots in [link: _plots/_PlotIndex.html].

Fortran files

[code: Makefile]
Determines which version of fortran files are used when compiling the code with make.
Other Fortran files are either up one level (see [code: ../README]) or in the AMRCLAW library [claw:amrclaw/2d/lib].

Data files

[code: amr2ez.data]
Standard parameter values that are read by library routine [clawcode:amrclaw/2d/lib/amr2ez.f] Each line contains one or more values to be read in, followed by comments that are ignored by the Fortran code but used by the Python read or write methods of class clawtools.ClawData. Some parameters that you might want to modify are described in the [http://www.clawpack.org/users documentation].

[code: setprob.data]
Problem-specific parameters.

Python files

[code:mapc2p.py]
Maps the computational rectangular domain to the physical grid.
[code: setrun.py]
This file contains a function that specifies what run-time parameters will be used.
[code: setplot.py]
This file contains a function that specifies what plots will be done and sets various plotting parameters.

Library routines

In addition to the Fortran routines in this library, several library routines from [claw:amrclaw/2d/lib] are used. See the [code: Makefile] to determine which ones are used. end_html