petsc-3.6.2 2015-10-02
Report Typos and Errors

# PetscViewerPushFormat

Sets the format for file PetscViewers.

### Synopsis

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

Logically Collective on PetscViewer

### Input Parameters

| viewer | - the PetscViewer
| format | - the format

### Notes

Available formats include

| PETSC_VIEWER_DEFAULT | - default format
| PETSC_VIEWER_ASCII_MATLAB | - MATLAB format
| PETSC_VIEWER_ASCII_IMPL | - implementation-specific format (which is in many cases the same as the default)
| PETSC_VIEWER_ASCII_INFO | - basic information about object
| PETSC_VIEWER_ASCII_INFO_DETAIL | - more detailed info about object
| PETSC_VIEWER_ASCII_COMMON | - identical output format for all objects of a particular type
| PETSC_VIEWER_ASCII_INDEX | - (for vectors) prints the vector element number next to each vector entry
| PETSC_VIEWER_NATIVE | - store the object to the binary file in its native format (for example, dense matrices are stored as dense), for DMDA vectors displays vectors in DMDA ordering, not natural
| PETSC_VIEWER_DRAW_BASIC | - views the vector with a simple 1d plot
| PETSC_VIEWER_DRAW_LG | - views the vector with a line graph
| PETSC_VIEWER_DRAW_CONTOUR | - views the vector with a contour plot

These formats are most often used for viewing matrices and vectors. Currently, the object name is used only in the MATLAB format.

### See Also

PetscViewerASCIIOpen(), PetscViewerBinaryOpen(), MatView(), VecView(),
PetscViewerSetFormat(), PetscViewerPopFormat()

Level:intermediate
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

### Examples

src/sys/classes/viewer/examples/tutorials/ex2.c.html
src/vec/vec/examples/tutorials/ex3.c.html
src/vec/is/sf/examples/tutorials/ex1.c.html
src/ksp/ksp/examples/tutorials/ex4.c.html