<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear all,
<br>
<br>
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. <br>
<br>
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. <br>
<br>
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.
<br>
<br>
Does this make sense? Is this the way how I am supposed to do it? Do UserMult and FormJacobian function do the right things?<br>
<br>
Thank you!<br>
Henrik<br>
<br>
<br>
<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><span style="font-family:Courier New">--
<br>
Dipl.-Math. Henrik Büsing<br>
Applied Geophysics and Geothermal Energy<br>
E.ON Energy Research Center<br>
RWTH Aachen University<br>
-----------------------------------------------<br>
Mathieustr. 10 | Tel +49 (0)241 80 49907<br>
52074 Aachen, Germany | Fax +49 (0)241 80 49889<br>
-----------------------------------------------<br>
http://www.eonerc.rwth-aachen.de/GGE<br>
hbuesing@eonerc.rwth-aachen.de<br>
-----------------------------------------------<br>
</span>
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
</div>
</div>
</div>
</body>
</html>