# PetscViewerSetUp
Sets up the internal viewer data structures for the later use. 
## Synopsis
```
#include "petscviewer.h" 
PetscErrorCode PetscViewerSetUp(PetscViewer viewer)
```
Collective


## Input Parameters

- ***viewer -*** the `PetscViewer` context



## Note
For basic use of the `PetscViewer` classes the user need not explicitly call
`PetscViewerSetUp()`, since these actions will happen automatically.




## See Also
 [](sec_viewers), `PetscViewer`, `PetscViewerCreate()`, `PetscViewerDestroy()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/interface/view.c.html#PetscViewerSetUp">src/sys/classes/viewer/interface/view.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexexodusii.c.html#PetscViewerSetUp_ExodusII">PetscViewerSetUp_ExodusII in src/dm/impls/plex/plexexodusii.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/binary/binv.c.html#PetscViewerSetUp_Binary">PetscViewerSetUp_Binary in src/sys/classes/viewer/impls/binary/binv.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/hdf5/hdf5v.c.html#PetscViewerSetUp_HDF5">PetscViewerSetUp_HDF5 in src/sys/classes/viewer/impls/hdf5/hdf5v.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/interface/view.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)  
