[petsc-users] Fwd: Implementing a homotopy solver

Smith, Barry F. bsmith at mcs.anl.gov
Sun Jul 22 18:19:42 CDT 2018



> On Jul 22, 2018, at 4:31 PM, zakaryah <zakaryah at gmail.com> wrote:
> 
> 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,

          What "submatrix" are you referring to?  Are you calling Pmat a submatrix?, if so why?

          Is b then here the zero vector?


> 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?
> 
> 

    The KSPSolve used by SNES solves    Amat delta u = -F(u)  building the preconditioner from the matrix Pmat.  


> 



More information about the petsc-users mailing list