#! /bin/sh ############################################################ # This shell script is a "front-end" to twobody which # expedites the analysis of the results from that code, # including the generation of Postscript plots of the # particle position, d(energy), d(angular momentum) as a # function of time using gnuplot. ############################################################ P=`basename $0` ############################################################ # Set defaults ############################################################ tmax=5.0 dt=0.05 tol=1.0d-6 ############################################################ # Usage ############################################################ Usage() { cat< [] Default tol: $tol y0 = 1.0 will produce circular orbit. To enable automatic previewing of Postscript files set GV environment variable to any non-blank value, e.g. setenv GV on END exit 1 } ############################################################ # Subroutine (fcn) to produce postscript version of # supermongo ('sm') plot of data stored in file $1 # Postscript file will be called $1_sm.ps. If optional # second argument is supplied, the resulting Postscript file # will be 'gv'ed. ############################################################ sm_it(){ smit_psname="$1_sm.ps" ylab=`echo $1 | tr '_' '-'` sm< $ofile nth 2 3 < $ofile > xcyc_$tag nth 1 2 < $ofile > xc_$tag nth 1 3 < $ofile > yc_$tag nth 1 4 < $ofile > dEtot_$tag nth 1 5 < $ofile > dJtot_$tag for f in xcyc_$tag xc_$tag yc_$tag dEtot_$tag dJtot_$tag; do sm_it $f $GV /bin/rm $f done /bin/ls -l *$tag*.ps exit 0