[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:53:21 UTC 2009
The following commit has been merged in the upstream branch:
commit 46e78c7cb11fcdc9d4745adf515f85c01388d26e
Author: Stephane Popinet <popinet at users.sf.net>
Date: Thu Nov 2 09:41:33 2006 +1100
gfs2oogl can output all variables in mixed cells
Not just P and Vorticity.
darcs-hash:20061101224133-d4795-ccbd1eebf623250db07277f23feea77c07948bd2.gz
diff --git a/tools/gfs2oogl.c b/tools/gfs2oogl.c
index 41887d7..0d90bb4 100644
--- a/tools/gfs2oogl.c
+++ b/tools/gfs2oogl.c
@@ -157,6 +157,14 @@ static void output_mixed_pressure (FttCell * cell, GfsVariable * p)
gfs_cell_dirichlet_value (cell, p, -1));
}
+static void output_mixed_variable (FttCell * cell, GfsVariable * v)
+{
+ GfsSolidVector * s = GFS_STATE (cell)->solid;
+
+ printf ("%g %g %g %g\n", s->ca.x, s->ca.y, s->ca.z,
+ GFS_VARIABLE (cell, v->i));
+}
+
/* SVertex: Header */
typedef struct _SVertex SVertex;
@@ -1033,12 +1041,17 @@ int main (int argc, char * argv[])
stats.min = stats.max = 0.;
if (var != NULL && gnuplot) {
- if (level < 0)
- gfs_write_gnuplot (domain, var,
- FTT_TRAVERSE_LEAFS, -1, box, stdout);
- else
- gfs_write_gnuplot (domain, var,
- FTT_TRAVERSE_LEVEL, level, box, stdout);
+ if (mixed)
+ gfs_domain_traverse_mixed (domain, FTT_PRE_ORDER, FTT_TRAVERSE_LEAFS,
+ (FttCellTraverseFunc) output_mixed_variable, var);
+ else {
+ if (level < 0)
+ gfs_write_gnuplot (domain, var,
+ FTT_TRAVERSE_LEAFS, -1, box, stdout);
+ else
+ gfs_write_gnuplot (domain, var,
+ FTT_TRAVERSE_LEVEL, level, box, stdout);
+ }
}
else if (box && var != NULL) {
if (squares) {
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list