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

Level: developer

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()

Location:viewreg.c