1*245f004bSJed Brown #include <petsc-private/pcimpl.h> /*I "petscpc.h" I*/ 2*245f004bSJed Brown 3*245f004bSJed Brown #undef __FUNCT__ 4*245f004bSJed Brown #define __FUNCT__ "PCPythonSetType" 5*245f004bSJed Brown /*@C 6*245f004bSJed Brown PCPythonSetType - Initalize a PC object implemented in Python. 7*245f004bSJed Brown 8*245f004bSJed Brown Collective on PC 9*245f004bSJed Brown 10*245f004bSJed Brown Input Parameter: 11*245f004bSJed Brown + pc - the preconditioner (PC) context. 12*245f004bSJed Brown - pyname - full dotted Python name [package].module[.{class|function}] 13*245f004bSJed Brown 14*245f004bSJed Brown Options Database Key: 15*245f004bSJed Brown . -pc_python_type <pyname> 16*245f004bSJed Brown 17*245f004bSJed Brown Level: intermediate 18*245f004bSJed Brown 19*245f004bSJed Brown .keywords: PC, Python 20*245f004bSJed Brown 21*245f004bSJed Brown .seealso: PCCreate(), PCSetType(), PCPYTHON, PetscPythonInitialize() 22*245f004bSJed Brown @*/ 23*245f004bSJed Brown PetscErrorCode PCPythonSetType(PC pc,const char pyname[]) 24*245f004bSJed Brown { 25*245f004bSJed Brown PetscErrorCode ierr; 26*245f004bSJed Brown 27*245f004bSJed Brown PetscFunctionBegin; 28*245f004bSJed Brown PetscValidHeaderSpecific(pc,PC_CLASSID,1); 29*245f004bSJed Brown PetscValidCharPointer(pyname,2); 30*245f004bSJed Brown ierr = PetscTryMethod(pc,"PCPythonSetType_C",(PC, const char[]),(pc,pyname));CHKERRQ(ierr); 31*245f004bSJed Brown PetscFunctionReturn(0); 32*245f004bSJed Brown } 33