petsc-3.3-p7 2013-05-11

PetscViewerRegisterDynamic

Adds a viewer

Synopsis

PetscErrorCode PetscViewerRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PetscViewer))
Not Collective

Input Parameters

name_solver - name of a new user-defined viewer
path - path (either absolute or relative) the library containing this viewer
name_create - name of routine to create method context
routine_create - routine to create method context

Notes

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

If dynamic libraries are used, then the fourth input argument (routine_create) is ignored.

Sample usage

   PetscViewerRegisterDynamic("my_viewer_type",/home/username/my_lib/lib/libO/solaris/mylib.a,
               "MyViewerCreate",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/viewer/../../../include/petscviewer.h
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages