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

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


The following commit has been merged in the upstream branch:
commit 9588de7beafe5088ce559e5db4eba1c198bd9f42
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Wed May 23 09:18:42 2007 +1000

    GfsFunction does not use variable index anymore
    
    The index of a variable can vary during the simulation. Use the
    variable's address instead.
    
    darcs-hash:20070522231842-d4795-9c1347e197c5977e95be4f162e09d7a1dcce3460.gz

diff --git a/src/utils.c b/src/utils.c
index 362032f..bbd092b 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -662,14 +662,16 @@ static void function_read (GtsObject ** o, GtsFile * fp)
 	  i = lv;
 	  while (i) {
 	    GfsVariable * v = i->data;
-	    fprintf (fin, "    %s = GFS_VARIABLE (cell, %d);\n", v->name, v->i);
+	    fprintf (fin, "    %s = GFS_VARIABLE (cell, GFS_VARIABLE1 (%p)->i);\n", 
+		     v->name, v);
 	    i = i->next;
 	  }
 	  fputs ("  } else {\n", fin);
 	  i = lv;
 	  while (i) {
 	    GfsVariable * v = i->data;
-	    fprintf (fin, "    %s = gfs_face_interpolated_value (face, %d);\n", v->name, v->i);
+	    fprintf (fin, "    %s = gfs_face_interpolated_value (face, GFS_VARIABLE1 (%p)->i);\n", 
+		     v->name, v);
 	    i = i->next;
 	  }
 	  fputs ("  }\n", fin);

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list