next up previous
Next: Making a hydrodynamics code Up: Introduction Previous: Numerical approach

Roe solver routine

Since programming this solver is a lot of work and requires even more knowledge of the mathematics behind the equations than I described above, I provide subroutines which contains the Roe solver, one in FORTRAN, the other in C++. Both can be found in the anonymous ftp directory

ftp://ftp.strw.leidenuniv.nl/pub/mellema/Num_Hydro.

The FORTRAN version can be found in the file roesol.f. This subroutine takes as input

The grid is assumed to be meshr cells, with meshr given in as an argument to the the subroutine. meshr should be smaller than the maximum size, meshmax, a parameter of the subroutine (currently set to 2000). The points 0 and meshr+1 are the boundary points.

There is also a C++ version of the routine, which can be found in the file roesol.cpp. This version also needs the incldue files Euler.h and EulerMath.h.


next up previous
Next: Making a hydrodynamics code Up: Introduction Previous: Numerical approach
Garrelt Mellema 2003-01-20