Skip to main content
`Ctrl`+`K`

# PetscViewersGetViewer

Gets a `PetscViewer` from a `PetscViewers` collection

## Synopsis

    PetscErrorCode PetscViewersGetViewer(PetscViewers viewers, PetscInt n, PetscViewer *viewer)

Collective if the viewer has not previously be obtained.

## Input Parameters

- viewers - object created with `PetscViewersCreate()`

- n - number of `PetscViewer` you want

## Output Parameter

- viewer - the `PetscViewer`

## See Also

Viewers: Looking at PETSc Objects, `PetscViewer`, `PetscViewers`, `PetscViewersCreate()`, `PetscViewersDestroy()`

## Level

intermediate

## Location

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

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