[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Daniel Fuster dfuster at gmail.com
Fri May 15 02:54:54 UTC 2009


The following commit has been merged in the upstream branch:
commit eea6a21017f92404f59b6fd0c0a42a4bf6713586
Author: Daniel Fuster <dfuster at gmail.com>
Date:   Thu Dec 20 21:45:56 2007 +1100

    gfsjoin201207
    
    Gfsjoin bug: fixed
    
    darcs-hash:20071220104556-f217f-cc90774dc35ca4b7db14a7057fec7e8dc314d002.gz

diff --git a/tools/gfsjoin b/tools/gfsjoin
index ed3e5bd..446d616 100755
--- a/tools/gfsjoin
+++ b/tools/gfsjoin
@@ -105,10 +105,11 @@ sed -n '/SurfaceFile/ p' $c3
 # As I have already inserted the solid, this information is also removed from the files
 i=0
 while [ $i -lt $numproc ]; do
-    nend=$(awk '$1 ~ /Gfs/ && $7 ~ /U/ {print NR}' ${mainfile[$i]})
+    nend=$(echo -n $(sed -n '/GtsSurface/,/Gfs/ p' ${mainfile[$i]} | tail -1 | awk '{print $1}' ))
+    nend=$(echo -n $(awk '$1 ~ /'$nend'/ {print NR}' ${mainfile[$i]} | head -1 ))
     nend=$[$nend+0]
     if [ $nend -ne 0 ]; then
-	sed -e '1,2 d' -e '/GfsSolid/,'$[$nend-1]' d' ${mainfile[$i]} > $tmp/tmpfile$i
+	sed -e '1,2 d' -e '/GtsSurface/,'$[$nend-1]' d' ${mainfile[$i]} > $tmp/tmpfile$i
     else
 	more +3 ${mainfile[$i]} > $tmp/tmpfile$i
     fi
@@ -175,7 +176,7 @@ while [ $i -le $numboxes ]; do
         i=$[$i+1]
     else
 	message -n "$i ,"
-        nf=$(awk '$1 ~ /GfsBox/ && $5 ~ /'$i'/ && $3 ~ /id/ {print NR}' $tmp/tmp.tmp)
+        nf=$(awk '$1 ~ /GfsBox/ && $5 == '$i' && $3 ~ /id/ {print NR}' $tmp/tmp.tmp)
         more +$nf $tmp/tmp.tmp
         i=$[$i+1]
     fi

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list