petsc-3.10.5 2019-03-28
Report Typos and Errors

# PetscViewerRegister

Adds a viewer

### Synopsis

    #include "petscviewer.h"
    PetscErrorCode  PetscViewerRegister(const char *sname,PetscErrorCode (*function)(PetscViewer))

Not Collective

### Input Parameters

| name_solver | - name of a new user-defined viewer
| routine_create | - routine to create method context

### Notes

PetscViewerRegister() may be called multiple times to add several user-defined viewers.

### Sample usage

       PetscViewerRegister("my_viewer_type",MyViewerCreate);

Then, your solver can be chosen with the procedural interface via

        PetscViewerSetType(viewer,"my_viewer_type")

or at runtime via the option

        -viewer_type my_viewer_type

### See Also

PetscViewerRegisterAll(), PetscViewerRegisterDestroy()

### Level

developer

### Location

src/sys/classes/viewer/interface/viewreg.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages