Actual source code: pythonpc.c

  1: #include <petsc/private/pcimpl.h>

  3: /*@C
  4:    PCPythonSetType - Initialize a PC object implemented in Python.

  6:    Collective on PC

  8:    Input Parameters:
  9: +  pc - the preconditioner (PC) context.
 10: -  pyname - full dotted Python name [package].module[.{class|function}]

 12:    Options Database Key:
 13: .  -pc_python_type <pyname> - python class

 15:    Level: intermediate

 17: .seealso: PCCreate(), PCSetType(), PCPYTHON, PetscPythonInitialize()
 18: @*/
 19: PetscErrorCode  PCPythonSetType(PC pc,const char pyname[])
 20: {
 23:   PetscTryMethod(pc,"PCPythonSetType_C",(PC, const char[]),(pc,pyname));
 24:   return 0;
 25: }