1 #include <petsc/private/tsimpl.h> /*I "petscts.h" I*/ 2 3 #undef __FUNCT__ 4 #define __FUNCT__ "TSPythonSetType" 5 /*@C 6 TSPythonSetType - Initalize a TS object implemented in Python. 7 8 Collective on TS 9 10 Input Parameter: 11 + ts - the nonlinear solver (TS) context. 12 - pyname - full dotted Python name [package].module[.{class|function}] 13 14 Options Database Key: 15 . -ts_python_type <pyname> 16 17 Level: intermediate 18 19 .keywords: TS, Python 20 21 .seealso: TSCreate(), TSSetType(), TSPYTHON, PetscPythonInitialize() 22 @*/ 23 PetscErrorCode TSPythonSetType(TS ts,const char pyname[]) 24 { 25 PetscErrorCode ierr; 26 27 PetscFunctionBegin; 28 PetscValidHeaderSpecific(ts,TS_CLASSID,1); 29 PetscValidCharPointer(pyname,2); 30 ierr = PetscTryMethod(ts,"TSPythonSetType_C",(TS, const char[]),(ts,pyname));CHKERRQ(ierr); 31 PetscFunctionReturn(0); 32 } 33