ViewerDrawOpen

Opens an X window for use as a viewer. If you want to do graphics in this window, you must call ViewerDrawGetDraw() and perform the graphics on the Draw object.

Synopsis

int ViewerDrawOpen(MPI_Comm comm,const char display[],const char title[],int x,int y,
                    int w,int h,Viewer *viewer)
Collective on MPI_Comm

Input Parameters

comm - communicator that will share window
display - the X display on which to open, or null for the local machine
title - the title to put in the title bar, or null for no title
x, y - the screen coordinates of the upper left corner of window
w, h - the screen width and height in pixels

Output Parameters

viewer -the viewer

Format Options

VIEWER_FORMAT_DRAW_BASIC - displays with basic format
VIEWER_FORMAT_DRAW_LG - displays using a line graph

Options Database Keys

ViewerDrawOpen() calls DrawOpen(), so see the manual page for DrawOpen() for runtime options, including
-draw_type x or null- . -nox - Disables all x-windows output
-display <name> - Specifies name of machine for the X display
-draw_pause <pause> - Sets time (in seconds) that the program pauses after DrawPause() has been called (0 is default, -1 implies until user input).

Note for Fortran Programmers

Whenever indicating null character data in a Fortran code, PETSC_NULL_CHARACTER must be employed; using PETSC_NULL is not correct for character data! Thus, PETSC_NULL_CHARACTER can be used for the display and title input parameters.

Keywords

draw, open, x, viewer

See Also

DrawOpen(), ViewerDestroy(), ViewerDrawGetDraw(), ViewerCreate(), VIEWER_DRAW_,
VIEWER_DRAW_WORLD, VIEWER_DRAW_SELF

Examples

src/vec/examples/tutorials/ex3f.F
src/vec/examples/tutorials/ex3.c
src/snes/examples/tutorials/ex2.c
src/snes/examples/tutorials/ex3.c

Level:beginner
Location:src/sys/src/viewer/impls/draw/drawv.c
Viewer Index
Table of Contents