Skip to main content
`Ctrl`+`K`

# PetscViewerSetFormat

Sets the format for a `PetscViewer`.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscViewerSetFormat(PetscViewer viewer, PetscViewerFormat format)

Logically Collective, No Fortran Support

This routine is deprecated, you should use `PetscViewerPushFormat()`/`PetscViewerPopFormat()`

## Input Parameters

- viewer - the `PetscViewer`

- format - the format

## Note

See `PetscViewerFormat` for available values

## See Also

Viewers: Looking at PETSc Objects, `PetscViewerGetFormat()`, `PetscViewerASCIIOpen()`, `PetscViewerBinaryOpen()`, `MatView()`, `VecView()`, `PetscViewerType`, `PetscViewerPushFormat()`, `PetscViewerPopFormat()`, `PetscViewerDrawOpen()`, `PetscViewerSocketOpen()`

## Level

deprecated

## Location

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

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