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

# PetscViewerGetSubViewer

Creates a new PetscViewer (same type as the old) that lives on a subcommunicator

### Synopsis

    #include "petscviewer.h"
    PetscErrorCode  PetscViewerGetSubViewer(PetscViewer viewer,MPI_Comm comm,PetscViewer *outviewer)

Collective on PetscViewer Many br

### Input Parameter

viewer -the PetscViewer to be reproduced Many br

### Output Parameter

outviewer -new PetscViewer Many br

Many br

Notes: Call PetscViewerRestoreSubViewer() to return this PetscViewer, NOT PetscViewerDestroy() Many br

This is most commonly used to view a sequential object that is part of a Many brparallel object. For example block Jacobi PC view could use this to obtain a Many brPetscViewer that is used with the sequential KSP on one block of the preconditioner. Many br

### See Also

PetscViewerSocketOpen(), PetscViewerASCIIOpen(), PetscViewerDrawOpen(), PetscViewerRestoreSubViewer()

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

### Examples

src/sys/examples/tutorials/ex15.c.html