
The shell script "sh.makeplots" will make Figures 1-6 for the
solution set for the minimal 1-d hydro code, calling them fig1.ps, etc.
It uses the script "sm.plot" which must be saved in the same directory
as sh.makeplots and made executable (chmod +x sm.plot).
You will need my default sm macros added to your own default
macro set for it to work.  For reference, sh.makeplots is 
appended below.

The files "times1" and "times2" are just lists of the output times
to be plotted, which are different for different plots.  They
are copied into the file "times", which is what sm.plot actually
reads.  

The initial conditions file must be stored in the file "init.out"
or init.out1 or init.out2, depending on the plot (see script below).
Its format is
rho[i] u[i]
for i=1,NBIN  (i.e., 200 lines for 200 bins)

The outputs of the hydro code are presumed to be in files with names like
hydro.t1.g1.dte-3.rho0.02; the naming convention should be obvious
from the assignment.  The format of these files are
t rho[i] u[i]
for i=1,NBIN  where t is the output time
and the outputs for all times are just concatenated into one file.
The total number of lines in the output file is NBIN*N_output, where
NBIN is the number of spatial bins and N_output is the number
of outputs you have recorded.

Once you have done the run for part (a) of the problem set, 
you can plot your results on the screen with the command
sm.plot init.out hydro.t1.g1.dt1e-3 "a label" 20
which will leave it up on your screen for 20 seconds.
(You can use ^Z to keep it up for longer, then restart
the sm.plot script with "fg" when you are done admiring
the results of your work.)

# sh.makeplots

cp times1 times

sm.plot init.out hydro.t1.g1.dt1e-3.rho0.02 \
   "Fig 1: T_1=1, \gamma=1, \Delta t=10^{-3}" 0
mv out.ps fig1.ps

sm.plot init.out hydro.t4.g1.dt1e-3.rho0.02 \
   "Fig 2: T_1=4, \gamma=1, \Delta t=10^{-3}" 0
mv out.ps fig2.ps

sm.plot init.out hydro.t1.g1.67.dt1e-3.rho0.02 \
   "Fig 3: T_1=1, \gamma=5/3, \Delta t=10^{-3}" 0
mv out.ps fig3.ps

sm.plot init.out2 hydro.t1.g1.dt1e-3.u0.02 \
   "Fig 4: T_1=1, \gamma=1, \Delta t=10^{-3}" 0
mv out.ps fig4.ps

cp times2 times

sm.plot init.out1 hydro.t1.g1.dt1e-3.rho0.1 \
   "Fig 5: T_1=1, \gamma=1, \Delta t=10^{-3}" 0
mv out.ps fig5.ps

sm.plot init.out hydro.t1.g1.dt4e-3.rho0.02 \
   "Fig 6: T_1=1, \gamma=1, \Delta t=4\times 10^{-3}" 0
mv out.ps fig6.ps
