Gfsview-batch

From Gerris

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:05, 10 July 2011
Mjthoraval (Talk | contribs)
(Examples)
← Previous diff
Revision as of 15:06, 10 July 2011
Mjthoraval (Talk | contribs)
(Examples)
Next diff →
Line 29: Line 29:
cat file-$i.gfs cat file-$i.gfs
echo "Save file-$i.ppm { width = 1280 height = 800 }" echo "Save file-$i.ppm { width = 1280 height = 800 }"
-done ) | gfsview-batch2D tracer.gfv+done ) | gfsview-batch2D velocity.gfv
</source> </source>

Revision as of 15:06, 10 July 2011

The command line arguments and syntax of GfsView are identical both in batch mode (gfsview-batch2D, gfsview-batch3D) and in interactive mode (gfsview2D, gfsview3D).


Both programs interpret the commands received on their standard input. The following commands are recognised:

.gfs files
entire simulation files (i.e. as generated by GfsOutputSimulation),
.gfv parameter files
description of the visualisation parameters. These are typically generated using the "Save" menu in the interactive version of GfsView,
Save or Append
Saves a visualisation in several formats. The complete syntax is
Save FILE [ GfsGl2PSParams ]

The Append command works the same way but appends to the given file if it already exists (rather than overwriting it).

where FILE is a filename or stdout,

Clear
Removes all the visualisation elements (i.e. defined using a previous .gfv file),
Echo
Copies the argument onto standard output.

Examples

This syntax is often used in combination with GfsEventScript to generate figures while running Gerris. See the examples for GfsEventScript.

It can be used also to produce images from saved simuation files:

(for i in `seq 0 1 9`; do
cat file-$i.gfs
echo "Save file-$i.ppm { width = 1280 height = 800 }"
done ) | gfsview-batch2D velocity.gfv

See also

Many of the functionalities of gfsview-batch can be advantageously replaced by GfsOutputView defined by the gfsview module.</source>

Personal tools
communication