[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:54:00 UTC 2009
The following commit has been merged in the upstream branch:
commit 9952532e3330ffb0911d547a5a664466ee8ff991
Author: Stephane Popinet <popinet at users.sf.net>
Date: Fri Mar 2 14:42:49 2007 +1100
Added Gerris logo example
darcs-hash:20070302034249-d4795-e51b47d409e073d33c616580eca40ddd53d52a76.gz
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
index 92a0ec8..4159ef6 100644
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -5,7 +5,8 @@ EXAMPLES = \
shear \
rt \
boussinesq \
- tangaroa
+ tangaroa \
+ logo
EXTRA_DIST = \
template.tex \
diff --git a/doc/examples/logo/logo.gfs b/doc/examples/logo/logo.gfs
new file mode 100644
index 0000000..7c25de5
--- /dev/null
+++ b/doc/examples/logo/logo.gfs
@@ -0,0 +1,60 @@
+# Title: Coalescence of a pair of Gaussian vortices (Gerris logo)
+#
+# Description:
+#
+# This example generates the Gerris desktop logo (Figure \ref{logo}).
+#
+# A pair of Gaussian vortices slowly merge. This is the primary
+# mechanism controlling the evolution of two-dimensional turbulence
+# and consequently has been studied in some detail.
+#
+# \begin{figure}[htbp]
+# \caption{\label{logo}Gerris logo and animation.}
+# \begin{center}
+# \htmladdnormallinkfoot{\includegraphics[width=0.15\hsize]{logo.eps}}{logo.mpg}
+# \end{center}
+# \end{figure}
+#
+# Author: St\'ephane Popinet
+# Command: gerris2D logo.gfs | gfsview2D logo.gfv
+# Required files: logo.gfv
+# Version: 1.0.0
+# Running time: 5 minutes
+# Generated files: logo.mpg logo.png logo.eps
+#
+1 0 GfsSimulation GfsBox GfsGEdge {} {
+ Time { end = 4 }
+ Refine 6
+ # Take a large domain to minimise the influence of boundaries but
+ # refine only in a small central disk.
+ Refine (sqrt(x*x + y*y) < 0.0625 ? 12 : 6)
+ # Initialise a vorticity field given by two gaussian distributions
+ InitVorticity {} {
+ # We use nested functions for simplicity (this will not work on MACOSX)
+ double vortex (double xc, double yc, double r) {
+ double r2 = (x - xc)*(x - xc) + (y - yc)*(y - yc);
+ return 2.*M_PI*exp (- 2.*r2/(r*r));
+ }
+ double r = 0.01, theta = 30.*M_PI/180.;
+ return vortex (-r*sin(theta), r*cos(theta), 0.01) +
+ vortex (r*sin(theta), -r*cos(theta), 0.01);
+ }
+ AdaptVorticity { istep = 1 } { cmax = 1e-2 maxlevel = 12 }
+ OutputTime { istep = 1 } stderr
+ OutputProjectionStats { istep = 1 } stderr
+ OutputSimulation { istep = 10 } stdout {}
+ OutputPPM { istep = 2 } { ppm2mpeg > logo.mpg } {
+ v = Vorticity
+ min = -0.1348 max = 6.22219
+ # Only generate the movie in a small box centered on the origin
+ box = -0.025,-0.025,0.025,0.025
+ }
+ EventScript { start = end } {
+ echo "Save logo.ppm { width = 1024 height = 1024 }"
+ sleep 5 # to wait for GfsView to finish writing the image
+ convert -transparent "#0000FF" logo.ppm -geometry 156x156 logo.png
+ montage -background white -geometry +0+0 logo.png logo.eps
+ rm -f logo.ppm
+ }
+}
+GfsBox {}
diff --git a/test/waves/solution.gfv b/doc/examples/logo/logo.gfv
similarity index 67%
copy from test/waves/solution.gfv
copy to doc/examples/logo/logo.gfv
index 589388d..c293438 100644
--- a/test/waves/solution.gfv
+++ b/doc/examples/logo/logo.gfv
@@ -1,36 +1,37 @@
# GfsView 2D
View {
tx = 0 ty = 0
+ sx = 1 sy = 1 sz = 1
q0 = 0 q1 = 0 q2 = 0 q3 = 1
- fov = 30
+ fov = 1.37889
r = 0.3 g = 0.4 b = 0.6
res = 1
lc = 0.001
reactivity = 0.1
}
-Squares {
- r = 0 g = 0 b = 0
+Isoline {
+ r = 0 g = 0 b = 1
shading = Constant
maxlevel = -1
} {
n.x = 0 n.y = 0 n.z = 1
pos = 0
-} P {
+} Vorticity {
amin = 1
amax = 1
cmap = Jet
+} {
+ n = 0 levels = 0.555
}
-Isoline {
+Squares {
r = 0 g = 0 b = 0
shading = Constant
maxlevel = -1
} {
n.x = 0 n.y = 0 n.z = 1
pos = 0
-} P {
- amin = 1
- amax = 1
+} Vorticity > 0.55 ? Vorticity : 0.55 {
+ amin = 0 min = -0.1348
+ amax = 0 max = 6.22219
cmap = Jet
-} {
- n = 16
}
diff --git a/doc/examples/template.tex b/doc/examples/template.tex
index 4d99b49..809d961 100644
--- a/doc/examples/template.tex
+++ b/doc/examples/template.tex
@@ -50,6 +50,7 @@ The usefulness and quality of this document very much depend on the contribution
\input{shear/shear.tex}
\input{rt/rt.tex}
\input{boussinesq/boussinesq.tex}
+\input{logo/logo.tex}
\section{3D}
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list