PETSc version 3.17.4
Fix/Edit manual page

# 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

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

### Notes

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

### Sample 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

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