[petsc-users] SNESGetJacobian Quasi-Newton

Matthew Knepley knepley at gmail.com
Mon Nov 6 13:42:36 CST 2017


On Mon, Nov 6, 2017 at 2:11 PM, Bikash Kanungo <bikash at umich.edu> wrote:

> Hi,
>
> I would like to access the approximate Jacobian in quasi-Newton solvers
> (e.g., BFGS) to analyze its condition number. I guess for BFGS, where the
> approximate Jacobian is built from outer products of several vectors coming
> from current and previous gradient vectors, the approximate Jacobian might
> not be stored explicitly as a matrix and instead the Jacobian times a
> vector is performed in a matrix-free manner. My reason for believing so is
> the fact that when I try to retrieve the Jacobian matrix using
> SNESGetJacobian and feed it to SLEPc, I incur segmentation fault at
> EPSSetOperators.
>
> If that's the case, is there a way to still get access to the approximate
> Jacobian and feed it to SLEPc for eigen analysis, like with the use of
> MatShell operations?
>

There is no code in SNESQN to apply the Jacobian, just its inverse. You
could wrap up that code in a MatShell and hand it to SLEPc. I am not
sure what you are looking for, but its doable. I would think there are
analytic expressions or at least bounds for the condition number.

  Thanks,

     Matt


> Thanks,
> Bikash
>
> --
> Bikash S. Kanungo
> PhD Student
> Computational Materials Physics Group
> Mechanical Engineering
> University of Michigan
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171106/62080f60/attachment.html>


More information about the petsc-users mailing list