# PetscViewerCreate

Creates a viewing context

### Synopsis

    #include "petsc.h"
    PetscErrorCode  PetscViewerCreate(MPI_Comm comm,PetscViewer *inviewer)

Collective on MPI_Comm

### Input Parameter

comm -MPI communicator

### Output Parameter

inviewer -location to put the PetscViewer context

### C++ variants

| PetscViewerCreate(PetscViewer *v) |  | -> |  | PetscViewerCreate(PETSC_COMM_SELF,v)

### See Also

PetscViewerDestroy(), PetscViewerSetType()

Level:advanced
Location: src/sys/viewer/interface/viewreg.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex33.c.html