PetscDrawRegister#

Adds a method to the graphics package.

Synopsis#

#include "petscdraw.h" 
#include "petscviewer.h" 
PetscErrorCode PetscDrawRegister(const char *sname, PetscErrorCode (*function)(PetscDraw))

Not Collective

Input Parameters#

  • sname - name of a new user-defined graphics class

  • function - routine to create method context

Note#

PetscDrawRegister() may be called multiple times to add several user-defined graphics classes

Example Usage#

   PetscDrawRegister("my_draw_type", MyDrawCreate);

Then, your specific graphics package can be chosen with the procedural interface via

PetscDrawSetType(ksp, "my_draw_type")

or at runtime via the option

-draw_type my_draw_type

See Also#

PetscDraw, PetscDrawRegisterAll(), PetscDrawRegisterDestroy(), PetscDrawType, PetscDrawSetType()

Level#

developer

Location#

src/sys/classes/draw/interface/drawreg.c


Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages