[petsc-users] Matrix-Free Newton Krylov with Automatic Differentiation and User Provided Preconditioner
Matthew Knepley
knepley at gmail.com
Fri Apr 20 05:45:21 CDT 2018
On Fri, Apr 20, 2018 at 5:31 AM, Buesing, Henrik <
hbuesing at eonerc.rwth-aachen.de> wrote:
> Dear all,
>
> I would like to use the matrix-free feature from PETSc, but I do not want
> to use finite differences to calculate J*u but automatic differentiation
> (AD). Since I do not want to live totally without preconditioning, I want
> to build important parts of the Jacobian and pass it for preconditioning.
>
> As I understand it, I would create a Shell-Matrix A and associate my
> UserMult function with it. This uses my AD Jacobian J and computes J*u
> without actually forming J. Then I will create a different matrix P, which
> will hold a partly assembled Jacobian for preconditioning.
>
> My FormJacobian function then takes this Shell-Matrix as Amat and my
> preconditioning matrix P as Pmat. Within FormJacobian I build the matrix
> Pmat, which holds parts of my Jacobian.
>
> Does this make sense? Is this the way how I am supposed to do it? Do
> UserMult and FormJacobian function do the right things?
>
Yes, this is the intended use.
Thanks,
Matt
> Thank you!
> Henrik
>
>
>
>
> --
> Dipl.-Math. Henrik Büsing
> Applied Geophysics and Geothermal Energy
> E.ON Energy Research Center
> RWTH Aachen University
> -----------------------------------------------
> Mathieustr. 10
> <https://maps.google.com/?q=Mathieustr.+10&entry=gmail&source=g> |
> Tel +49 (0)241 80 49907
> 52074 Aachen, Germany | Fax +49 (0)241 80 49889
> -----------------------------------------------
> http://www.eonerc.rwth-aachen.de/GGE
> hbuesing at eonerc.rwth-aachen.de
> -----------------------------------------------
>
--
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/20180420/42ade0ee/attachment.html>
More information about the petsc-users
mailing list