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

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


The following commit has been merged in the upstream branch:
commit 6d69184a0245cd35ff05907c188560f801717786
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed Apr 11 15:20:53 2007 +1000

    New adaptive coastally-trapped wave test case
    
    darcs-hash:20070411052053-d4795-ee7f5fb155e3ee9fa1093e2111d264ccbeff66b3.gz

diff --git a/test/template.tex b/test/template.tex
index 968f11b..c64683b 100644
--- a/test/template.tex
+++ b/test/template.tex
@@ -75,6 +75,7 @@ current stable branch of the version-controlled source code.
 \input{geo/geo.tex}
 \input{geo/beta/beta.tex}
 \input{waves/waves.tex}
+\input{waves/adaptive/adaptive.tex}
 \input{nz/nz.tex}
 
 \bibliographystyle{plain}
diff --git a/test/waves/waves.gfs b/test/waves/adaptive/adaptive.gfs
similarity index 95%
copy from test/waves/waves.gfs
copy to test/waves/adaptive/adaptive.gfs
index 0803511..2ee872b 100644
--- a/test/waves/waves.gfs
+++ b/test/waves/adaptive/adaptive.gfs
@@ -1,29 +1,17 @@
-# Title: Coastally-trapped waves
+# Title: Coastally-trapped waves with adaptive refinement
 #
 # Description:
 #
-# A simulation is initialised with an exact solution found by Lamb
-# \cite{lamb} for inertia-gravity waves in a circular, flat-bottomed
-# basin on an $f$-plane.
-#
-# The waves should rotate unchanged around the basin. This is a good
-# test of the shallow-water solver with Coriolis terms and non-trivial
-# coastlines.
+# Same test case as before but with adaptive refinement (using the
+# vorticity criterion).
 #
 # Figure \ref{solution} illustrates the solution obtained after three
 # wave periods.
 #
-# Following \cite{rutgers-waves}, Table \ref{correlation} presents the
-# phase error and the maximum correlation between the computed
-# solution and the exact solution. Note that these results are not
-# directly comparable to \cite{rutgers-waves}, because the timestep
-# used is much larger. The time-explicit codes tested in
-# \cite{rutgers-waves} have stronger stability requirements than
-# Gerris.
-#
 # \begin{figure}[htbp]
-# \caption{\label{solution}Surface-height after a rotation of 3 wave periods for a
-# resolution of 9.375 km.}
+# \caption{\label{solution}Surface-height after a rotation of 3 wave
+# periods. The maximum resolution is 9.375 km (dark red), the minimum
+# resolution is 150 km (dark blue).}
 # \begin{center}
 # \includegraphics[width=0.6\hsize]{solution.eps}
 # \end{center}
@@ -37,9 +25,9 @@
 # \end{table}
 #
 # Author: St\'ephane Popinet
-# Command: sh waves.sh waves.gfs
+# Command: sh ../waves.sh adaptive.gfs
 # Version: 1.0.0
-# Required files: waves.sh solution.gfv correlation.ref
+# Required files: solution.gfv correlation.ref
 # Generated files: correlation correlation.tex solution.eps
 #
 1 0 GfsOcean GfsBox GfsGEdge {} {
@@ -92,6 +80,7 @@
     H = 1
   }
   Refine LEVEL
+  AdaptVorticity { istep = 1 } { cmax = 5e-2 maxlevel = LEVEL }
   GtsSurfaceFile basin.gts
   AdvectionParams { scheme = none }
   ApproxProjectionParams { tolerance = 1e-9 weighted = 0 }
@@ -630,4 +619,6 @@
   }
   OutputSimulation { start = end } sim-LEVEL {}
 }
-GfsBox {}
+GfsBox {
+  front = Boundary
+}
diff --git a/test/waves/adaptive/correlation.ref b/test/waves/adaptive/correlation.ref
new file mode 100644
index 0000000..77b33a9
--- /dev/null
+++ b/test/waves/adaptive/correlation.ref
@@ -0,0 +1,3 @@
+5		2.7			0.8664
+6		0.3			0.9745
+7		0			0.9958
diff --git a/test/waves/solution.gfv b/test/waves/adaptive/solution.gfv
similarity index 85%
copy from test/waves/solution.gfv
copy to test/waves/adaptive/solution.gfv
index 589388d..7d6285d 100644
--- a/test/waves/solution.gfv
+++ b/test/waves/adaptive/solution.gfv
@@ -1,6 +1,7 @@
-# GfsView 2D
+# GfsView 3D
 View {
   tx = 0 ty = 0
+  sx = 1 sy = 1 sz = 1
   q0 = 0 q1 = 0 q2 = 0 q3 = 1
   fov = 30
   r = 0.3 g = 0.4 b = 0.6
@@ -14,8 +15,8 @@ Squares {
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
-  pos = 0
-} P {
+  pos = -0.5
+} Level {
   amin = 1
   amax = 1
   cmap = Jet
@@ -26,7 +27,7 @@ Isoline {
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
-  pos = 0
+  pos = -0.5
 } P {
   amin = 1
   amax = 1
diff --git a/test/waves/correlation.ref b/test/waves/correlation.ref
index 0661cf5..aa737b4 100644
--- a/test/waves/correlation.ref
+++ b/test/waves/correlation.ref
@@ -1,3 +1,3 @@
-5		2.3			0.9252
-6		0.3			0.9995
-7		0.1			1
+5		2.6			0.8644
+6		0.5			0.9712
+7		0.2			0.9922
diff --git a/test/waves/solution.gfv b/test/waves/solution.gfv
index 589388d..e1a6d01 100644
--- a/test/waves/solution.gfv
+++ b/test/waves/solution.gfv
@@ -1,6 +1,7 @@
-# GfsView 2D
+# GfsView 3D
 View {
   tx = 0 ty = 0
+  sx = 1 sy = 1 sz = 1
   q0 = 0 q1 = 0 q2 = 0 q3 = 1
   fov = 30
   r = 0.3 g = 0.4 b = 0.6
@@ -14,7 +15,7 @@ Squares {
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
-  pos = 0
+  pos = -0.5
 } P {
   amin = 1
   amax = 1
@@ -26,7 +27,7 @@ Isoline {
   maxlevel = -1
 } {
   n.x = 0 n.y = 0 n.z = 1
-  pos = 0
+  pos = -0.5
 } P {
   amin = 1
   amax = 1
diff --git a/test/waves/waves.gfs b/test/waves/waves.gfs
index 0803511..d0f1b82 100644
--- a/test/waves/waves.gfs
+++ b/test/waves/waves.gfs
@@ -630,4 +630,6 @@
   }
   OutputSimulation { start = end } sim-LEVEL {}
 }
-GfsBox {}
+GfsBox {
+  front = Boundary
+}
diff --git a/test/waves/waves.sh b/test/waves/waves.sh
index e09ecf1..4d566dd 100644
--- a/test/waves/waves.sh
+++ b/test/waves/waves.sh
@@ -2,7 +2,7 @@ if ! $donotrun; then
     rm -f correlation res-* sim-*
     shapes -n 500 ellipse | transform -s 1.999 -i > basin.gts
     for level in 5 6 7; do
-	if sed "s/LEVEL/$level/g" < $1 | gerris2D - | \
+	if sed "s/LEVEL/$level/g" < $1 | gerris2D3 - | \
 	    awk '{ print $1 " " $5 }' > res-$level && \
 	    awk -v l=$level 'BEGIN { min1 = 0. } {
          if ($2 > min1) {
@@ -18,7 +18,7 @@ if ! $donotrun; then
     done
 fi
 
-echo "Save solution.eps { format = EPS }" | gfsview-batch2D sim-7 solution.gfv
+echo "Save solution.eps { format = EPS }" | gfsview-batch2D3 sim-7 solution.gfv
 
 awk 'BEGIN {
   print "\\begin{tabular}{|c|c|c|}"

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list