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

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:51:40 UTC 2009


The following commit has been merged in the upstream branch:
commit bd93c1c184fb3bc36cb76f49929bc4d5c5ffda99
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Tue Feb 15 10:03:56 2005 +1100

    Spurious current test with adaptivity
    
    darcs-hash:20050214230356-fbd8f-bc85982aedd4e43366a02c50604b20433a46ec0d.gz

diff --git a/test/tension/spurious.sh b/test/tension/spurious.sh
index 0e8cd59..6e0617d 100755
--- a/test/tension/spurious.sh
+++ b/test/tension/spurious.sh
@@ -8,11 +8,17 @@ fi
 
 param=`mktemp /tmp/spurious.XXXXXX`
 
-for La in 12000 1200 120; do
-    mu=`echo $La | awk '{print sqrt (0.4/$1)}'`
-    tmax=`echo $mu | awk '{print 1000.*$1*0.4}'`
-    du=`echo $mu | awk '{print 1e-7/$1}'`
-    cat <<EOF > $param
+for adapt in "" "AdaptFunction { istep = 1 } { cmax = 0.1 maxlevel = 5 } { return _Tx*_Tx + _Ty*_Ty; }"; do
+  if test "$adapt"; then
+    echo "Adaptive refinement"
+  else
+    echo "Constant refinement"
+  fi
+  for La in 12000 1200 120; do
+      mu=`echo $La | awk '{print sqrt (0.4/$1)}'`
+      tmax=`echo $mu | awk '{print 1000.*$1*0.4}'`
+      du=`echo $mu | awk '{print 1e-7/$1}'`
+      cat <<EOF > $param
 1 2 GfsSimulation GfsBox GfsGEdge {} {
   Time {
     end = $tmax
@@ -27,6 +33,7 @@ for La in 12000 1200 120; do
   SourceDiffusion {} U $mu
   SourceDiffusion {} V $mu
   InitFraction {} T circle.gts
+  $adapt
   EventStop { istep = 1 } U $du
   OutputScalarStats {istep = 1} spurious-$La { v = P }
   OutputScalarNorm {istep = 1} spurious-$La { v = Velocity }
@@ -36,17 +43,18 @@ GfsBox {}
 1 1 right 
 1 1 top
 EOF
-    gerris2D $param
-    if awk -v La=$La -v mu=$mu '{if ($1 == "Velocity") {max1 = max; max = $9;}} END {
+      gerris2D $param
+      if awk -v La=$La -v mu=$mu '{if ($1 == "Velocity") {max1 = max; max = $9;}} END {
       printf ("Laplace number: %6g max(U)*mu/sigma: %g\n", La, max1*mu);
       if (max1*mu > 2.5e-3)
         exit 1;
     }' < spurious-$La; then
-	:
-    else
-	rm -f $param
-	exit 1
-    fi
+	  :
+      else
+	  rm -f $param
+	  exit 1
+      fi
+  done
 done
 
 rm -f $param

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list