[petsc-users] Petsc ILU PC Change between 3.6.4 and 3.7.x?

Lawrence Mitchell lawrence.mitchell at imperial.ac.uk
Wed Aug 23 04:18:43 CDT 2017



On 23/08/17 07:51, Klaij, Christiaan wrote:
> Lawrence,
> 
> Well, I was looking for something like SubPCFactorSetShiftType,
> or is it supposed to somehow "trickle down" to the sub pc's?

Ah, I see.  No, the approach below is what you need.  Imagine that you
used a sub_pc inside a multigrid smoother, you'd then need an
MGLevelsSubPCFactorSetShiftType, which swiftly leads down the path of
madness.

> Or should I setup the pc, get the sub-pc's and then apply
> PCFactorSetShiftType on the sub pc's, something like
> 
> CALL KSPSetup(ksp)
> CALL PCBJacobiGetSubKSP(ksp, subksp)
> CALL KSPGetPC(subksp, subpc, ierr)
> CALL PCFactorSetShiftType(subpc,MAT_SHIFT_NONZERO,ierr)

Cheers,

Lawrence


More information about the petsc-users mailing list