<div dir="ltr">Hello Matt<div><br></div><div>I have attached the detailed output.</div><div><br></div><div>Fenics automatically computes Jacobian, so I think Jacobian should be correct. I am not able to run the Fenics code without giving the Jacobian. I am currently writing a C code where I can test this.</div><div><br></div><div>This equation is bit weird. Its like this</div><div><br></div><div>u_t = ( K u_x)_x</div><div><br></div><div>K = u / sqrt(u_x^2 + eps^2)</div><div><br></div><div>If u > 0, then this is a nonlinear parabolic eqn. Problem is that eps = h (mesh size), so at extrema, it is like</div><div><br></div><div>u_t = (u/eps)*u_xx</div><div><br></div><div>and (1/eps) is approximating a delta function.</div><div><br></div><div>Best</div><div>praveen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 12, 2016 at 12:41 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Mon, Dec 12, 2016 at 1:04 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, Dec 12, 2016 at 12:56 AM, Praveen C <span dir="ltr"><<a href="mailto:cpraveen@gmail.com" target="_blank">cpraveen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Increasing number of snes iterations, I get convergence.<div><br></div><div>So it is a problem of initial guess being too far from the solution of the nonlinear equation.</div><div><br></div><div>Solution can be seen here</div><div><br></div><div><a href="https://github.com/cpraveen/fenics/blob/master/1d/cosmic_ray/cosmic_ray.ipynb" target="_blank">https://github.com/cpraveen/fe<wbr>nics/blob/master/1d/cosmic_ray<wbr>/cosmic_ray.ipynb</a></div></div></blockquote></span></div></div></div></blockquote><div><br></div></span><div>Also, how is this a parabolic equation? It looks like u/|u'| to me, which does not look parabolic at all.</div><div><br></div><div> Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Green curve is solution after two time steps.</div><div><br></div><div>It took about 100 snes iterations in first time step and about 50 in second time step.</div><div><br></div><div>I use exact Jacobian and direct LU solve. </div></div></blockquote><div><br></div></span><div>I do not believe its the correct Jacobian. Did you test it as I asked? Also run with</div><div><br></div><div> -snes_monitor -ksp_monitor_true_residual -snes_view -snes_converged_reason</div><div><br></div><div>and then</div><div><br></div><div> -snes_fd</div><div><br></div><div>and send all the output</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"><div dir="ltr"><div>Thanks</div><span class="m_7950832615768889623m_-8059117138923648995HOEnZb"><font color="#888888"><div>praveen</div></font></span></div>
</blockquote></div><span><br><br clear="all"><div><br></div>-- <br><div class="m_7950832615768889623m_-8059117138923648995gmail_signature" data-smartmail="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>
</span></div></div>
</blockquote></span></div><span class=""><br><br clear="all"><div><br></div>-- <br><div class="m_7950832615768889623gmail_signature" data-smartmail="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>
</span></div></div>
</blockquote></div><br></div>