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

Stephane Popinet popinet at users.sourceforge.net
Fri May 15 02:51:29 UTC 2009


The following commit has been merged in the upstream branch:
commit 9b3175867c5cffd85c425f6669dbb2f3f7d69162
Author: Stephane Popinet <popinet at users.sourceforge.net>
Date:   Tue Dec 7 09:10:26 2004 +1100

    gfs2oogl profile output now works without -c option (gerris--ocean--0.7--patch-24)
    
    gerris--ocean--0.7--patch-24
    Keywords:
    
    darcs-hash:20041206221026-aabb8-d0cceb0be98985937f2a9307d5777f856833bb96.gz

diff --git a/tools/gfs2oogl.c b/tools/gfs2oogl.c
index 32a04b8..8fa6320 100644
--- a/tools/gfs2oogl.c
+++ b/tools/gfs2oogl.c
@@ -1047,13 +1047,40 @@ int main (int argc, char * argv[])
       }
       printf ("})\n");
     }
-    else if (profile && var) {
+    else if (profile) {
       FttVector p;
 
-      while (fscanf (profile, "%lf %lf %lf", &p.x, &p.y, &p.z) == 3) {
-	FttCell * cell = gfs_domain_locate (domain, p, -1);
-	if (cell)
-	  printf ("%g %g %g %g\n", p.x, p.y, p.z, gfs_interpolate (cell, p, var));
+      if (var)
+	while (fscanf (profile, "%lf %lf %lf", &p.x, &p.y, &p.z) == 3) {
+	  FttCell * cell = gfs_domain_locate (domain, p, -1);
+	  if (cell)
+	    printf ("%g %g %g %g\n", p.x, p.y, p.z, gfs_interpolate (cell, p, var));
+	}
+      else {
+	GfsVariable * v;
+	guint i = 4;
+
+	printf ("# 1:X 2:Y 3:Z ");
+	v = domain->variables;
+	while (v) {
+	  if (v->name)
+	    printf ("%d:%s ", i++, v->name);
+	  v = v->next;
+	}
+	printf ("\n");
+	while (fscanf (profile, "%lf %lf %lf", &p.x, &p.y, &p.z) == 3) {
+	  FttCell * cell = gfs_domain_locate (domain, p, -1);
+	  if (cell) {
+	    printf ("%g %g %g ", p.x, p.y, p.z);
+	    v = domain->variables;
+	    while (v) {
+	      if (v->name)
+		printf ("%g ", gfs_interpolate (cell, p, v));
+	      v = v->next;
+	    }
+	    printf ("\n");
+	  }
+	}
       }
     }
     else if (vector > 0.) {

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list