#!/bin/sh

#cd propagate_to_given_f
#./makein.sh
#cd ..

cp propagate_to_given_f/dump_pl.dat pl.in

# set number of TPs in pr.awk
./pr.awk < /dev/null > pr.in

# set number of TPs in genvel3.in!
./genvel3 < genvel3.in > genvel3.out
./genvel3.awk genvel3.out propagate_to_given_f/dump_tp.dat > tp.in

xvpl2el < pl.in > pl.elmts
xvtp2el < tp.in > tp.elmts

#./aei.plt
./xvtp2el.plt

# histogram of velocities:
awk '!/^#/{ print sqrt($1**2+$2**2+$3**2); }' genvel3.out > genvel3.out_v 
echo -e "20\n0 300\ngenvel3.out_v" > hist3.in
hist3 < hist3.in > genvel3.out_vhist
./genvel3.plt


