1 #include <petsc/private/taoimpl.h> /*I "petsctao.h" I*/ 2 3 /*@C 4 TaoPythonSetType - Initialize a Tao object implemented in Python. 5 6 Collective on tao 7 8 Input Parameters: 9 + tao - the optimation solver (Tao) context. 10 - pyname - full dotted Python name [package].module[.{class|function}] 11 12 Options Database Key: 13 . -tao_python_type <pyname> - python class 14 15 Level: intermediate 16 17 .seealso: `TaoCreate()`, `TaoSetType()`, `TAOPYTHON`, `PetscPythonInitialize()` 18 @*/ 19 PetscErrorCode TaoPythonSetType(Tao tao, const char pyname[]) 20 { 21 PetscFunctionBegin; 22 PetscValidHeaderSpecific(tao,TAO_CLASSID,1); 23 PetscValidCharPointer(pyname,2); 24 PetscTryMethod(tao,"TaoPythonSetType_C",(Tao,const char[]),(tao,pyname)); 25 PetscFunctionReturn(0); 26 } 27