RCS Header: /cvsroot/petscgraphics/tsview.c,v 1.35 2004/07/02 20:50:41 hazelsct Exp
This program views the output of a time series saved using
IlluMultiSave().
It basically just switches between timesteps; future versions may be more
interesting. The neat part of it is that it loads multiprocessor data and
displays it on a single CPU.
Included Files
- #include <readline/readline.h>
- #include <readline/history.h>
Preprocessor definitions
#define HELP_STRING "tsview commands:\n <enter> Display next timestep\n b Display previous timestep\n i increment Set the next timestep increment\n ### Jump to timestep ###\n t Toggle Geomview transparency (3-D only)\n v Change field displayed (3-D only)\n p [v1 v2 ...] Set contour values for plotting or \"auto\" (3-D only)\n r Reloads entries in a directory\n s size Set maximum dimension of PETSc viewer windows (2-D only)\n cx, cy, cz Toggle xcut, ycut, zcut (cut last row/plane of periodic DA)\n gx30-90, y,z Set plot x range to 30-90, same for y and z\n h/? Print this information\n q/x Quit tsview\n"
#define DPRINTF( fmt, args... )
#define __FUNCT__ "myfilter"
#define __FUNCT__ "main"
char* basefilename
Local Variables
help
static char help[]
line_read
Functions for reading the command line
and avoiding reading empty lines
Probably this function is not Petsc
safe, but we'll see.
static char* line_read
int PetscSynchronizedFReadline ( MPI_Comm comm, char* message, char* string )
This is
main().
int main ( int argc, char* argv[] )
- int main
- It returns an int to the OS.
- int argc
- Argument count.
- char* argv[]
- Arguments.
After
PETSc
initialization, it gets the list of files matching the basename.
In the main loop, the various timesteps are displayed, with options:
-
A number jumps to that entry in the files table.
- <return>
loads the next file.
- b
goes back one file.
- q
quits the program.
The Illuminator-based 3-D viewer can only display one field at a
time. At the beginning, that is field 0, and is cycled using the
v
command.
This function returns non-zero for "qualifying" file names which start with
the stored files' basename and end with
.cpu0000.meta.
It is used as the
select() function for scandir() in main().
int myfilter ( const struct dirent* direntry )
- int myfilter
- Returns non-zero for qualifying filenames.
- const struct dirent* direntry
- Directory entry with filename to test.
char* rl_gets ( char* message )