petsc-3.7.1 2016-05-15
Report Typos and Errors

# PetscViewerFileSetMode

Sets the type of file to be open

### Synopsis

    #include "petscviewer.h"
    PetscErrorCode PetscViewerFileSetMode(PetscViewer viewer,PetscFileMode type)

Logically Collective on PetscViewer Many br

### Input Parameters

| viewer | - the PetscViewer; must be a binary, Matlab, hdf, or netcdf PetscViewer Many br
| type | - type of file Many br

       FILE_MODE_WRITE - create new file for binary output

       FILE_MODE_READ - open existing file for binary input

       FILE_MODE_APPEND - open existing file for binary output

Many br

### See Also

PetscViewerFileSetMode(), PetscViewerCreate(), PetscViewerSetType(), PetscViewerBinaryOpen()

Level:advanced
Location:src/sys/classes/viewer/impls/binary/binv.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/ex1.c.html
src/dm/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex43.c.html
src/snes/examples/tutorials/ex12.c.html