From Gerris

Jump to: navigation, search

This generic object is a GfsEvent which also defines where to write the data to output.

The syntax in parameter files is as follows:

[ GfsEvent ] FILE

where FILE is either a string defining the file in which to write the output, or a shell-script enclosed within braces to which the output will be piped. Two file names have special meaning: "stderr" and "stdout" for the standard error and standard output respectively.

If a C-like formatting string appears in the file name, it is interpreted as follows:

is replaced with the current processor number.
is replaced with the current time step number.
is replaced with the current physical time.

Note that most of the C language format specifiers are recognized (i.e. it is possible to use formatting strings like %05.2f etc...).

If the simulation does not start at time zero the existing files are appended otherwise they are overwritten.

The "pipe" feature of GfsOutput can for example be used to do on-the-flight post-processing of the data stream, as in the following example:

GfsOutputPPM { istep = 1 } { ppm2mpeg > vorticity.mpg } { v = Vorticity }

Commands started in "pipe" mode have access to the same pre-defined shell variables as the GfsEventScript object. This can be useful when using pipes in parallel simulations, e.g.:

GfsOutputScalarNorm { istep = 1 } { awk '{print $3,$9}' > max-$GfsPid } { v = Velocity }

It is important to realize that the pipe is opened during all the simulation (it is not opened and closed every time the object is called)

Personal tools