[petsc-users] Jacobian free solve and preconditioning

Matthew Knepley knepley at gmail.com
Fri Apr 10 12:04:27 CDT 2015


On Fri, Apr 10, 2015 at 2:41 AM, Shiva Rudraraju <rudraa at umich.edu> wrote:

> Hi,
>
> My problem (finite strain mechanics with additional higher order gradient
> terms) involves a very complex jacobian.  To avoid mistakes from hand
> coding the jacobian I use AD (Sacado/Adept). However, both the hand coded
> jacobian evaluation and AD computation of jacobian are computationally very
> expensive and compete-with/exceed the solve time. So I am looking at
> Jacobian free approchaes….and would want to have some sort of matrix free
> preconditioning. I am thinking of using:
>

True AD costs 3-5 residual evaluations to apply the Jacobian. Thus, if
Jacobian construction costs more than the solve, its likely that either

a) the AD is far from optimal

or

b) your system is so well so could use a much less accurate solver

So

  1) How much does your solve cost? What is the method, how many iterates?

  2) You should start by replicating your current setup using the default
FD-coloring Jacobian construction and see how it compares in time


> -ksp_type fgmres -pc_type ksp -ksp_ksp_type gmres -ksp_pc_type jacobi
> -snes_mf
>
> But -snes_mf will not use any preconditioner, so I want to try something
> like -snes_mf_operator, but which uses GMRES/BiCG as a preconditioner
> without the need for explicit jacobian computation. However,
> snes_mf_operator requires the Jacobian function….. Any way to obtain
> jacobian free preconditioning
>

3) I have no idea what 'Jacobian free preconditioning' even means. You
could use PCCHEBYSHEV with only a Jacobian action,
     but you need good eigenvalue bounds. You can use an approximate
Jacobian to calculate the preconditioner (this is the intent
     of snes_mf_operator).

  Thanks,

     Matt


> Thanks,
> Shiva
>
>
> Shiva Rudraraju
> Asst. Research Scientist,
> University of Michigan Ann Arbor.




-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150410/3a5bdc29/attachment.html>


More information about the petsc-users mailing list