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