# PetscViewerGLVisOpen Opens a `PETSCVIEWERGLVIS` `PetscViewer` ## Synopsis ``` #include "petscviewer.h" #include "petscsys.h" PetscErrorCode PetscViewerGLVisOpen(MPI_Comm comm, PetscViewerGLVisType type, const char name[], PetscInt port, PetscViewer *viewer) ``` Collective; No Fortran Support ## Input Parameters - ***comm -*** the MPI communicator - ***type -*** the viewer type: `PETSC_VIEWER_GLVIS_SOCKET` for real-time visualization or `PETSC_VIEWER_GLVIS_DUMP` for dumping to a file - ***name -*** either the hostname where the GLVis server is running or the base filename for dumping the data for subsequent visualizations - ***port -*** socket port where the GLVis server is listening. Not referenced when type is `PETSC_VIEWER_GLVIS_DUMP` ## Output Parameters - ***viewer -*** the `PetscViewer` object ## Options Database Keys - ***-glvis_precision -*** Sets number of digits for floating point values - ***-glvis_size -*** Sets the window size (in pixels) - ***-glvis_pause -*** Sets time (in seconds) that the program pauses after each visualization (0 is default, -1 implies every visualization) - ***-glvis_keys -*** Additional keys to configure visualization - ***-glvis_exec -*** Additional commands to configure visualization ## See Also [](sec_viewers), `PETSCVIEWERGLVIS`, `PetscViewerCreate()`, `PetscViewerSetType()`, `PetscViewerGLVisType` ## Level beginner ## Location src/sys/classes/viewer/impls/glvis/glvis.c ## Examples src/ksp/ksp/tutorials/ex43.c.html
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/glvis/glvis.c) [Index of all Viewer routines](index.md) [Table of Contents for all manual pages](/docs/manualpages/index.md) [Index of all manual pages](/docs/manualpages/singleindex.md)