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