[petsc-users] Fwd: Implementing a homotopy solver

zakaryah zakaryah at gmail.com
Sun Jul 22 15:31:47 CDT 2018


OK, thanks, I understand now.

FormJacobian() has two matrices as arguments, the Jacobian Amat and the
preconditioner Pmat, which may be the same.  My FormJacobian() routine sets
the values of the Jacobian in Pmat.  So, to calculate the effective
nullspace of the submatrix, I want to solve Pmat u = b.  To do this within
FormJacobian(), can I assemble Pmat, call SNESGetKSP(snes,&ksp), and then
KSPSolve(ksp,b,u)?  Is it safe to assume that the KSP matrix is Pmat?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180722/adc827e8/attachment.html>


More information about the petsc-users mailing list