Gfsview-batch

From Gerris

Jump to: navigation, search

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 ]

where FILE is a filename or stdout. The Append command works the same way but appends to the given file if it already exists (rather than overwriting it).

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 simulation 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.

Personal tools
communication