Skip to content

MovingParticlesCSH

Adrian Quintana edited this page Dec 11, 2017 · 1 revision

#!/usr/bin/env csh

if ($#argv != 2) then
    echo "you must give two parameters:" 
    echo $0" <MLrootname> <maxiter>"
else
  set rootname=$1
  set max_iter=$2

  rm -f moving_particles.dat
  set i = 1
  while ($i < ${max_iter})
    set ii=`printf '%06d' $i`
    @ i++
    set jj=`printf '%06d' $i`
    echo -n $i" " >>moving_\particles.dat
    grep " 8 " ${rootname}_it${ii}.doc|awk '{print $1,$5,$6,$7,$8,$9}' >t1
    grep " 8 " ${rootname}_it${jj}.doc|awk '{print $1,$5,$6,$7,$8,$9}' >t2
    diff t1 t2|grep ">" |wc -l >>moving_particles.dat
  end
endif


-- Main.RafaelNunezRamirez - 06 Feb 2007

Clone this wiki locally