This page lists some software that I've written or co-wrote, and is available for download. It is
intended to be useful for research purposes.
pyro
pyro is a simple Python/C hydro code that currently implements unsplit
and split versions of a 2nd order Godunov compressible hydrodynamics
scheme. It is written as a testbed, not for performance/production. It is very much beta quality software, but maybe you'll find it interesting...
More information
Numerical Python Notes
Some notes on using python and numarray for numerical analysis.
[numerical python notes]
Multigrid examples
Python
A simple python class for solving 1-d Poisson equations on a
finite-volume grid. The driver program (mg_test.py) solves
uxx = cos(x), u(0)=0, u(1)=1. The discretization is
second order.
multigrid.py (the multigrid class), patch1d.py (the patch class); mg_test.py (a sample driver)
Fortran
A simple example of using multigrid to solve a 1-dimensional
Poisson equation: uxx = cos(x), u(0)=0, u(1)=1, using a
finite-volume discretization. Dirichlet boundary conditions are
supported. This is a nice test case, as it has a simple analytic
solution, and demonstrates how to properly set the boundary conditions
for a cell-centered discretization (otherwise you get only first-order
convergence). A pure relaxation code is provided for comparison,
demonstrating that with enough iterations, you converge, with
second-order accuracy. Residuals are printing out at each step of the
multgrid, showing the effects of the intergrid transfers and
smoothing.
Pure Gauss-Seidel red/black relaxation: relax.f90
Full Multigrid: fmgfvb.f90
Implicit thermal diffusion
A 2nd order accurate, Crank-Nicholson differenced, finite volume
solver for the heat equation, using basic multigrid V-cycles. This
is just to serve as an example. Dirichlet boundary conditions are
supported.
mgheat.f90
FLASH Code
FLASH is a parallel, adaptive mesh, explicit hydrodynamics code,
developed at the Center for Astrophysical Thermodynamical Flashes.
Code request
Monte Carlo demonstration -- poker odds
A simple demonstration of Monte Carlo techniques -- computing the
odds of the different hands in a straight 5-card poker game.
poker.py
FLASH Code Parallel I/O benchmark
The FLASH I/O benchmark routine measures the performance of the
FLASH parallel HDF 5 output. It recreates the primary data structures
in FLASH and produces a checkpoint file, a plotfile with centered
data, and a plotfile with corner data.
[download]
[about the benchmark]
Parallel I/O Tutorial
A simple tutorial showing various ways to output data from a parallel hydrodynamics
code into a single HDF5 file.
I/O tutorial
ApJify
A simple python script that takes a LaTeX ApJ manuscript and renames all the
figures (both in the file and on disk) to conform to the f1.eps, f2.eps, ...
naming convention that ApJ wants. Use at your own risk--this is still beta
quality. See the notes contained within.
[download]
readtab.pro
An IDL routine to read in ASCII tables. Originally written by
Helge Rebhan, this modified version is much faster for large tables,
as it eliminates a very expensive copy by assuming a maximum number of
lines. Also added the /DOUBLE option to read in as double precision.
[download]
updated June 24, 2004
best viewed with Mozilla