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