CLAWPACK               make_plots.py.html        
 Source file:   make_plots.py
 Directory:   /var/www/html/clawpack/links/shockvacuum10/shockvacuum
 Converted:   Mon Aug 16 2010 at 14:13:32   using clawcode2html
 This documentation file will not reflect any later changes in the source file.

 
"""
Make figures for the paper.
"""

from pyclaw.runclaw import runclaw
from pyclaw.plotters.plotclaw import plotclaw

grav = 1.          # gravitational constant g
sK = 0.5           # constant K 

run_code = True

# For each run, values of (ieos, npoly, nstar, mx, name):
runparams = {}
runparams[0] = (2, 1.0, 1.0, 4800, 'poly_n1.0_4800')
runparams[1] = (1, 1.0, 1.0, 1200, 'euler_n1.0_alpha1.0_1200')
runparams[2] = (1, 1.0, 1.5, 1200, 'euler_n1.0_alpha1.5_1200')
runparams[3] = (1, 1.5, 1.5, 1200, 'euler_n1.5_alpha1.5_1200')

for runno in range(len(runparams)):
    # parameters needed in setrun:
    ieos = runparams[runno][0]
    npoly = runparams[runno][1]
    nstar = runparams[runno][2]
    mx = runparams[runno][3]
    name = runparams[runno][4]
    iout = mx/6       
    ntot = iout*50     

    outdir = '_output_' + name
    if run_code:
        execfile('setrun2.py')  # creates .data files
        runclaw('xclaw', outdir)
        
    plotdir = '_plots_' + name
    execfile('setplot2.py')  # defines function setplot
    plotclaw(outdir, plotdir, setplot = setplot)