1: #include "private/snesimpl.h" /*I "petscsnes.h" I*/
5: /*@C
6: SNESPythonSetType - Initalize a SNES object implemented in Python.
8: Collective on SNES
10: Input Parameter:
11: + snes - the nonlinear solver (SNES) context.
12: - pyname - full dotted Python name [package].module[.{class|function}]
14: Options Database Key:
15: . -snes_python_type <pyname>
17: Level: intermediate
19: .keywords: SNES, Python
21: .seealso: SNESCreate(), SNESSetType(), SNESPYTHON, PetscPythonInitialize()
22: @*/
23: PetscErrorCode SNESPythonSetType(SNES snes,const char pyname[])
24: {
25: PetscErrorCode (*f)(SNES, const char[]) = 0;
30: PetscObjectQueryFunction((PetscObject)snes,"SNESPythonSetType_C",
31: (PetscVoidFunction*)&f);
32: if (f) {(*f)(snes,pyname);}
33: return(0);
34: }