#!/bin/csh -f
onintr error

if ( -e $1.H ) then
goto good1
elseif (-e $1) then
atoF < $1  > $1.H
else
echo "error"
goto error
endif

good1:

if ( -e $2.H ) then
goto good2
elseif (-e $2) then
atoF < $2  > $2.H
else
echo "error"
goto error
endif

good2:



rotate.x < $1.H  >temp.sillyH degx=90
rotate.x < $2.H  >temp2.sillyH degx=90
crack.x <temp.sillyH inp2=temp2.sillyH >temp.sillyH2 $4
rotate.x <temp.sillyH2 >$3.H  degx=-90


Rm  temp.sillyH
Rm  temp2.sillyH
Rm  temp.sillyH2

error:
