Gets the local KSP contexts for all blocks on this processor.


#include "petscpc.h" 
PetscErrorCode  PCBJacobiGetSubKSP(PC pc,PetscInt *n_local,PetscInt *first_local,KSP *ksp[])
Not Collective

Input Parameter

pc - the preconditioner context

Output Parameters

n_local - the number of blocks on this processor, or NULL
first_local - the global number of the first block on this processor, or NULL
ksp - the array of KSP contexts


After PCBJacobiGetSubKSP() the array of KSP contexts is not to be freed.

Currently for some matrix implementations only 1 block per processor is supported.

You must call KSPSetUp() or PCSetUp() before calling PCBJacobiGetSubKSP().

Fortran Usage: You must pass in a KSP array that is large enough to contain all the local KSPs. You can call PCBJacobiGetSubKSP(pc,nlocal,firstlocal,PETSC_NULL_KSP,ierr) to determine how large the KSP array must be.

Level: advanced

See Also