On Thu, Apr 29, 2010 at 5:28 PM, Li, Zhisong (lizs) <span dir="ltr">&lt;<a href="mailto:lizs@mail.uc.edu">lizs@mail.uc.edu</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, Jed,<br>
<br>
Thank you for your quick response.<br>
<br>
but I don&#39;t understand why you said it&#39;s easy here. My professor got stuck on this problem:<br>
<div class="im"><br>
&gt;&gt;It&#39;s pretty easy to code an analytic Jacobian for incompressible<br>
&gt;&gt;Navier-Stokes since it&#39;s only a quadratic nonlinearity.  But<br>
<br>
</div>I wonder if you mean the finite element method here. I am only planning FDM or FVM for my work. Actually we don&#39;t have any polynomial in incompressible N-S equations.<br></blockquote><div><br></div><div>The nonlinearity is u \cdot \nabla u, which is quadratic in u.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&gt;From my understanding from ts/ex8, for example, the continuity equation with pressure term: F = d(p)/dt+ d(u)/dx+d(v)/dy,  we need to compute J[0][0] = d(F)/d(p), J[1][0] = d(F)/d(u) and J[2][0] = d(F)/d(v).  I speculate they are J[0][0] = 1/delta_t, J[1][0] = 1/delta_x and J[2][0] = 1/delta_y. Is this correct? And d(Lap(u))/d(u) might be more difficult.<br>

<br>
This is not much about PETSc, but I hope you can still give me some help or suggest a book/ paper on this.<br></blockquote><div><br></div><div>The derivative of Lap is just Lap (this is a Frechet derivative). It is easiest to think of the residual</div>
<div>F as being a function of the coefficients, and then J_{ij} is just the derivative of F_i with respect to coefficient j.</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;">

Thank you very much.<br>
<font color="#888888"><br>
<br>
Zhisong Li</font></blockquote></div><br><br clear="all"><br>-- <br>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<br>