petsc-3.7.1 2016-05-15
Report Typos and Errors

# SNESRegister

Adds a method to the nonlinear solver package.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode  SNESRegister(const char sname[],PetscErrorCode (*function)(SNES))

Not collective Many br

### Input Parameters

| name_solver | - name of a new user-defined solver Many br
| routine_create | - routine to create method context Many br

### Notes

SNESRegister() may be called multiple times to add several user-defined solvers. Many br

### Sample usage

       SNESRegister("my_solver",MySolverCreate);

Many br

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

        SNESSetType(snes,"my_solver")

or at runtime via the option Many br

        -snes_type my_solver

Many br

Note: If your function is not being put into a shared library then use SNESRegister() instead Many br

### Keywords

SNES, nonlinear, register

### See Also

SNESRegisterAll(), SNESRegisterDestroy()

Many br

Level:advanced
Location:src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages