Actual source code: pythontao.c

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

  3: /*@C
  4:    TaoPythonSetType - Initialize a Tao object implemented in Python.

  6:    Collective on tao

  8:    Input Parameters:
  9: +  tao - the optimation solver (Tao) context.
 10: -  pyname - full dotted Python name [package].module[.{class|function}]

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

 15:    Level: intermediate

 17: .seealso: TaoCreate(), TaoSetType(), TAOPYTHON, PetscPythonInitialize()
 18: @*/
 19: PetscErrorCode TaoPythonSetType(Tao tao, const char pyname[])
 20: {
 23:   PetscTryMethod(tao,"TaoPythonSetType_C",(Tao,const char[]),(tao,pyname));
 24:   return 0;
 25: }