Skip to main content
`Ctrl`+`K`

# SNESPythonSetType

Initialize a `SNES` object implemented in Python.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESPythonSetType(SNES snes, const char pyname[])

Collective

## Input Parameters

- snes - the nonlinear solver (`SNES`) context.

- pyname - full dotted Python name [package].module[.{class|function}]

## Options Database Key

- -snes_python_type <pyname> - python class

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESCreate()`, `SNESSetType()`, `SNESPYTHON`, `PetscPythonInitialize()`, `SNESPythonGetType()`

## Level

intermediate

## Location

src/snes/impls/python/pythonsnes.c

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