<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Apr 10, 2015 at 2:41 AM, Shiva Rudraraju <span dir="ltr"><<a href="mailto:rudraa@umich.edu" target="_blank">rudraa@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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:<br></blockquote><div><br></div><div>True AD costs 3-5 residual evaluations to apply the Jacobian. Thus, if Jacobian construction costs more than the solve, its likely that either</div><div><br></div><div>a) the AD is far from optimal</div><div><br></div><div>or</div><div><br></div><div>b) your system is so well so could use a much less accurate solver</div><div><br></div><div>So</div><div><br></div><div> 1) How much does your solve cost? What is the method, how many iterates?</div><div><br></div><div> 2) You should start by replicating your current setup using the default FD-coloring Jacobian construction and see how it compares in time</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-ksp_type fgmres -pc_type ksp -ksp_ksp_type gmres -ksp_pc_type jacobi -snes_mf<br>
<br>
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<br></blockquote><div><br></div><div>3) I have no idea what 'Jacobian free preconditioning' even means. You could use PCCHEBYSHEV with only a Jacobian action,</div><div> but you need good eigenvalue bounds. You can use an approximate Jacobian to calculate the preconditioner (this is the intent</div><div> of snes_mf_operator).</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Shiva<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Shiva Rudraraju<br>
Asst. Research Scientist,<br>
University of Michigan Ann Arbor.</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>