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

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


The following commit has been merged in the upstream branch:
commit 324acdd49f7b0d6cc0b608628cae1abace7a691f
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Tue Jan 18 14:53:51 2005 +1100

    Fixed test/poisson
    
    test/poisson/order still gives some inconsistent results.
    
    darcs-hash:20050118035351-fbd8f-064a3035e2b51e7b31cd52a0b548bfb31e8ce9fd.gz

diff --git a/test/poisson/convergence/report.sh b/test/poisson/convergence/report.sh
index d9b1b69..ae73775 100755
--- a/test/poisson/convergence/report.sh
+++ b/test/poisson/convergence/report.sh
@@ -52,7 +52,7 @@ EOF
 for file in $1; do
     testfile=test/`basename $file`
     sname=`basename $file | awk '{print substr ($1, 1, index ($1, ".") - 1)}'`
-    xmgr -hardcopy -noask -hdevice EPS -printfile figures/$sname.eps -param divfig.par $file $testfile
+    xmgrace -hardcopy -noask -hdevice EPS -printfile figures/$sname.eps -param divfig.par $file $testfile
     echo "\\begin{figure}" >> $texfile.tex
     echo "\\begin{center}" >> $texfile.tex
     echo "\\psfig{file=figures/$sname.eps, width=\\hsize}" >> $texfile.tex
diff --git a/test/poisson/order/report.sh b/test/poisson/order/report.sh
index 9de0262..9faee3b 100755
--- a/test/poisson/order/report.sh
+++ b/test/poisson/order/report.sh
@@ -46,7 +46,7 @@ EOF
 for file in $1; do
     testfile=test/`basename $file`
     sname=`basename $file | awk '{print substr ($1, 1, index ($1, ".") - 1)}'`
-    xmgr -hardcopy -noask -hdevice EPS -printfile figures/$sname.eps $file $testfile -param orderfig.par > /dev/null 2>&1
+    xmgrace -hardcopy -noask -hdevice EPS -printfile figures/$sname.eps $file $testfile -param orderfig.par > /dev/null 2>&1
     echo "\\begin{figure}" >> $texfile.tex
     echo "\\begin{center}" >> $texfile.tex
     echo "\\psfig{file=figures/$sname.eps, width=\\hsize}" >> $texfile.tex
diff --git a/test/poisson/poisson.c b/test/poisson/poisson.c
index ec00645..c100748 100644
--- a/test/poisson/poisson.c
+++ b/test/poisson/poisson.c
@@ -444,13 +444,6 @@ static gboolean refine (FttCell * cell, guint * minlevel)
   return FALSE;
 }
 
-static gboolean refine_solid (FttCell * cell, guint * maxlevel)
-{
-  if (GFS_IS_MIXED (cell) && ftt_cell_level (cell) < *maxlevel)
-    return TRUE;
-  return FALSE;
-}
-
 static gboolean refine_inside_solid (FttCell * cell, gpointer * data)
 {
   GNode * tree = data[0];
@@ -496,18 +489,6 @@ static gboolean refine_randomly (FttCell * cell, gpointer * data)
   return FALSE;
 }
 
-static void init_solid_fractions (FttCell * cell, gpointer * data)
-{
-  gboolean * is_open = data[2];
-  GfsDomain * domain = data[3];
-
-  gfs_cell_init (cell, domain);
-  gfs_cell_init_solid_fractions (cell, 
-				 data[0], data[1], *is_open, 
-				 TRUE, (FttCellCleanupFunc) gfs_cell_cleanup,
-				 NULL);
-}
-
 #define GFS_FLAG_MARKED  (1 << 5)
 #define GFS_IS_MARKED(cell) (((cell)->flags & GFS_FLAG_MARKED) != 0)
 
@@ -518,6 +499,15 @@ typedef enum
   CUSTOM
 } Method;
 
+static void refine_cut_cell (FttCell * cell, GtsSurface * s, gpointer * data)
+{
+  GfsDomain * domain = data[0];
+  guint * maxlevel = data[1];
+
+  if (ftt_cell_level (cell) < *maxlevel)
+    ftt_cell_refine_single (cell, (FttCellInitFunc) gfs_cell_init, domain);
+}
+
 static GfsBox * solution (guint levels,
 			  guint levelmax,
 			  gboolean relative,
@@ -576,26 +566,20 @@ static GfsBox * solution (guint levels,
     }
     else {
       gpointer data[4];
-	
-      gfs_cell_init_solid_fractions (box->root, solid, tree, is_open, 
-				     TRUE, 
-				     (FttCellCleanupFunc) gfs_cell_cleanup,
-				     NULL);
 
-      data[0] = solid;
-      data[1] = tree;
-      data[2] = &is_open;
-      data[3] = domain;
+      data[0] = domain;
+      data[1] = &levelmax;
       if (levelmax > 0)
-	ftt_cell_refine (box->root, 
-			 (FttCellRefineFunc) refine_solid, &levelmax,
-			 (FttCellInitFunc) init_solid_fractions, data);	
+	gfs_domain_traverse_cut (domain, solid,
+				 FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS,
+				 (FttCellTraverseCutFunc) refine_cut_cell, data);
       ftt_cell_refine (box->root, 
 		       (FttCellRefineFunc) ftt_refine_corner, NULL,
-		       (FttCellInitFunc) init_solid_fractions, data);
+		       (FttCellInitFunc) gfs_cell_init, domain);
+      gfs_domain_init_solid_fractions (domain, solid, 
+				       TRUE, (FttCellCleanupFunc) gfs_cell_cleanup, NULL);
+      g_assert (gfs_cell_check_solid_fractions (box->root));
 
-      g_assert (gfs_cell_check_solid_fractions (box->root, 
-						solid, tree, is_open));
       if (fix_vol)
 	gfs_domain_cell_traverse (domain, 
 				  FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS, -1,

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list