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

Stephane Popinet popinet at users.sf.net
Fri May 15 02:53:12 UTC 2009


The following commit has been merged in the upstream branch:
commit 72bac6a8c9d1ede4e91e04f6e65157c11eb7667c
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Tue Apr 25 16:14:22 2006 +1000

    Added "dumbbell" Poisson test case
    
    darcs-hash:20060425061422-d4795-0ab9c44b2b5869bd1c40fbfdb88d69bba5a2deda.gz

diff --git a/test/Makefile.am b/test/Makefile.am
index fc4c14f..6de72b7 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -15,7 +15,8 @@ TESTDIRS = \
 	geo \
 	lid \
 	couette \
-	plate
+	plate \
+	dumbell
 
 EXTRA_DIST = \
 	template.tex \
diff --git a/test/dumbell/dumbell.gfs b/test/dumbell/dumbell.gfs
new file mode 100644
index 0000000..41e649e
--- /dev/null
+++ b/test/dumbell/dumbell.gfs
@@ -0,0 +1,20 @@
+# Title: Poisson solution in a dumbbell-shaped domain
+#
+# Description:
+#
+# Domains with a dumbbell topology can trigger an instability in the
+# Poisson solver if care is not taken.
+#
+# Author: St\'ephane Popinet
+# Command: sh dumbell.sh
+# Version: 0.9.3
+# Required files: dumbell.sh
+#
+1 0 GfsPoisson GfsBox GfsGEdge {} {
+  Refine 3
+  ApproxProjectionParams { nitermax = 1000 minlevel = 1 tolerance = 1e-30 }
+  GtsSurfaceFile dumbell.gts
+  Init {} { Div = y }
+  OutputProjectionStats { istep = 1 } stdout
+}
+GfsBox {}
diff --git a/test/dumbell/dumbell.sh b/test/dumbell/dumbell.sh
new file mode 100755
index 0000000..32bcc64
--- /dev/null
+++ b/test/dumbell/dumbell.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+bottom=.255
+top=.49
+
+tac <<EOF | shapes -v - > dumbell.gts
+-0.51 -0.51
+-0.51 $bottom
+-0.1 $bottom
+-0.1 $top
+0.1 $top
+0.1 $bottom
+0.51 $bottom
+0.51 -0.51
+EOF
+
+if gerris2D dumbell.gfs | awk '{
+    if ($1 == "residual.infty:" && $3 > 6.621e-02)
+      exit (1);
+  }'; then
+    :
+else
+    exit 1
+fi
diff --git a/test/template.tex b/test/template.tex
index 392cc40..ec18457 100644
--- a/test/template.tex
+++ b/test/template.tex
@@ -34,6 +34,7 @@ current stable branch of the version-controlled source code.
 \input{circle/star/star.tex}
 \input{circle/refined/refined.tex}
 \input{circle/thin/thin.tex}
+\input{dumbell/dumbell.tex}
 
 \section{Advection}
 
diff --git a/tools/shapes.c b/tools/shapes.c
index 2391b90..09e3511 100644
--- a/tools/shapes.c
+++ b/tools/shapes.c
@@ -552,7 +552,8 @@ int main (int argc, char * argv[])
     surface_add_ellipse_shape (s, 0., 0., 0.25, 0.001, 2.*PI,
 			       1., - 1., 1., number, closed);
   }
-  else if ((sfp = fopen (shape, "rt")) != NULL) {
+  else if ((!strcmp (shape, "-") && (sfp = stdin)) || 
+	   (sfp = fopen (shape, "rt")) != NULL) {
     while (!feof (sfp))
       if (!surface_add_file_shape (s, -1., 1., zextrude, sfp)) {
 	fprintf (stderr, 

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list