#=== script ./frame for flowfileld visualisation ===

#--- get step number and copy files "step.N" into ./results/frames directory ---

echo "Enter step number"
read step

rcp root@node1:/home/andrei/mpi_layer2/$step.1 $step.1
rcp root@node2:/home/andrei/mpi_layer2/$step.2 $step.2
rcp root@node3:/home/andrei/mpi_layer2/$step.3 $step.3
rcp root@node4:/home/andrei/mpi_layer2/$step.4 $step.4

mv $step.0  /home/andrei/mpi_layer2/results/frames/$step.0
mv $step.1  /home/andrei/mpi_layer2/results/frames/$step.1
mv $step.2  /home/andrei/mpi_layer2/results/frames/$step.2
mv $step.3  /home/andrei/mpi_layer2/results/frames/$step.3
mv $step.4  /home/andrei/mpi_layer2/results/frames/$step.4

#--- collect several files into one ASCII winfield.dat file ---

cd ./results/frames
./mb2dat $step 5 

#--- go to winfield and visualize flowfield ---

cp winfield.dat ../winfield/winfield.dat
cd ../winfield/
wine ./winfield.exe

#--- change directory back ---
cd /home/andrei/mpi_layer2

#=== end script ./frame  ===