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> 14 15 Level: intermediate 16 17 .seealso: TaoCreate(), TaoSetType(), TAOPYTHON, PetscPythonInitialize() 18 @*/ 19 PetscErrorCode TaoPythonSetType(Tao tao, const char pyname[]) 20 { 21 PetscErrorCode ierr; 22 23 PetscFunctionBegin; 24 PetscValidHeaderSpecific(tao,TAO_CLASSID,1); 25 PetscValidCharPointer(pyname,2); 26 ierr = PetscTryMethod(tao,"TaoPythonSetType_C",(Tao,const char[]),(tao,pyname));CHKERRQ(ierr); 27 PetscFunctionReturn(0); 28 } 29 30