Skip to main content
Ctrl+K
PETSc v3.23.6-522-g51b144c619af documentation - Home
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • Overview
  • Install
  • Tutorials
  • User-Guide
  • C/Fortran API
  • petsc4py API
  • FAQ
  • Community
  • Developers
  • Misc.
  • GitLab
  • PetscViewerSetType

PetscViewerSetType#

Builds PetscViewer for a particular implementation.

Synopsis#

#include "petscviewer.h" 
PetscErrorCode PetscViewerSetType(PetscViewer viewer, PetscViewerType type)

Collective

Input Parameters#

  • viewer - the PetscViewer context obtained with PetscViewerCreate()

  • type - for example, PETSCVIEWERASCII

Options Database Key#

  • -viewer_type - Sets the type; use -help for a list of available methods (for instance, ascii)

Note#

See PetscViewerType for possible values

See Also#

Viewers: Looking at PETSc Objects, PetscViewer, PetscViewerCreate(), PetscViewerGetType(), PetscViewerType, PetscViewerPushFormat()

Level#

advanced

Location#

src/sys/classes/viewer/interface/viewreg.c

Examples#

src/dm/tutorials/ex15.c
src/dm/tutorials/ex21.c
src/mat/tutorials/ex10.c
src/sys/classes/viewer/tutorials/ex1.c
src/snes/tutorials/ex12.c
src/ksp/ksp/tutorials/ex43.c
src/ksp/ksp/tutorials/ex70.c
src/ts/tutorials/ex11.c
src/dm/impls/plex/tutorials/ex1f90.F90
src/ts/tutorials/ex11_sa.c


Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages

On this page
  • Synopsis
  • Input Parameters
  • Options Database Key
  • Note
  • See Also
  • Level
  • Location
  • Examples
Edit on GitLab
Show Source

© Copyright 1991-2025, UChicago Argonne, LLC and the PETSc Development Team.

Created using Sphinx 7.3.7.

Built with the PyData Sphinx Theme 0.15.1.

Last updated on 2025-08-31T03:45:21-0500 (v3.23.6-522-g51b144c619af).