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

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


The following commit has been merged in the upstream branch:
commit 2b0bc4ad77fd304385f91309047dc1f51705e0ea
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Thu Oct 11 09:50:12 2007 +1000

    New pre-defined implicit surface 'cube'
    
    darcs-hash:20071010235012-d4795-db0fa8a636d0b70cef145788f413fb9a512ead8b.gz

diff --git a/doc/examples/tangaroa/tangaroa.gfs b/doc/examples/tangaroa/tangaroa.gfs
index 4902ace..1fd070c 100644
--- a/doc/examples/tangaroa/tangaroa.gfs
+++ b/doc/examples/tangaroa/tangaroa.gfs
@@ -22,6 +22,8 @@
 #
 2 1 GfsSimulation GfsBox GfsGEdge {} {
   Time { end = 2 }
+  # Insert the solid boundary defined explicitly by the
+  # triangulated surface contained in the GTS file tangaroa.gts
   Solid tangaroa.gts
   Refine 5
   RefineSolid 9
diff --git a/src/spatial.h b/src/spatial.h
index c990e33..931dea0 100644
--- a/src/spatial.h
+++ b/src/spatial.h
@@ -37,4 +37,14 @@ static double sphere (double xc, double yc, double zc, double r)
   return (_x - xc)*(_x - xc) + (_y - yc)*(_y - yc) + (_z - zc)*(_z - zc) - r*r;
 }
 
+static double cube (double xc, double yc, double zc, double h)
+{
+  double vmax = (_x - xc)*(_x - xc) - h*h/4.;
+  double v = (_y - yc)*(_y - yc) - h*h/4.;
+  if (v > vmax) vmax = v;
+  v = (_z - zc)*(_z - zc) - h*h/4.;
+  if (v > vmax) vmax = v;
+  return vmax;
+}
+
 #endif /* __SPATIAL_H__ */
diff --git a/test/plate/plate.gfs b/test/plate/plate.gfs
index ed9d5ea..0f4ad83 100644
--- a/test/plate/plate.gfs
+++ b/test/plate/plate.gfs
@@ -9,14 +9,14 @@
 #
 # Author: St\'ephane Popinet
 # Command: sh plate.sh plate.gfs
-# Version: 0.9.1
+# Version: 1.1.2
 # Required files: plate.sh
 #
 1 0 GfsSimulation GfsBox GfsGEdge {} {
   Time { iend = 30 dtmax = 1e-2 }
   Refine 5
   RefineSolid 6
-  Solid square.gts
+  Solid (cube(0,0,0,0.5)) { sy = 0.06251 tx = 0.031249 ty = -0.015 }
   AdvectionParams { scheme = none }
   Init {} { U = 1 }
   OutputScalarNorm { start = end } stdout { v = Velocity } 
diff --git a/test/plate/plate.sh b/test/plate/plate.sh
index d43dcc2..954f0df 100644
--- a/test/plate/plate.sh
+++ b/test/plate/plate.sh
@@ -1,4 +1,3 @@
-shapes square | transform --sy 0.06251 | transform --tx .031249 | transform --ty -.015 > square.gts
 if gerris2D $1 | awk '{ if ($9 < 10.) exit (1); }'; then :
     exit 1
 else

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list