| 55 | 1. Sets up problem scales |
| 56 | 2. Initializes the grid with the prescribed perturbations for Jeans instability |
| 57 | 2. Sets boundary conditions on box |
| 58 | 3. Finds max speed and uses CFL condition to get dt |
| 59 | 4. Takes a hydro step; i.e. solves the local Riemann problem, gets fluxes, updates cells |
| 60 | 5. Takes a source step, finds the mean of the density distribution, sets up the source term vector f=4 Pi G (rho-rhoavg), sends to the Jacobi solver, finds the solution for the gravitational potential phi, using phi, updates the velocity and energy of the cells |
| 61 | 6. Updates time and checks whether tfinal has been reached |
| 62 | 7. Sets boundary conditions on box |
| 63 | 8. Gets dt |
| 64 | 9. ... |
| 65 | |
| 66 | = Update Formulas = |