<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Dec 12, 2016 at 2:29 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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></blockquote><div><br></div><div>I do not understand how to show parabolicity in this case. However, I have a more fundamental misunderstanding. In your code, I see</div><div><br></div><div> <span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">R0</span><span style="background-color:rgb(247,247,247);color:rgb(51,51,51);font-size:14px;white-space:pre-wrap"> </span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">=</span><span style="background-color:rgb(247,247,247);color:rgb(51,51,51);font-size:14px;white-space:pre-wrap"> </span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">idt</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-p" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">(</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">u</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">-</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">uold</span><span class="gmail-p" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">)</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">v</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">dx</span><span style="background-color:rgb(247,247,247);color:rgb(51,51,51);font-size:14px;white-space:pre-wrap"> </span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">+</span><span style="background-color:rgb(247,247,247);color:rgb(51,51,51);font-size:14px;white-space:pre-wrap"> </span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">K0</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">ux</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">vx</span><span class="gmail-o" style="font-size:14px;white-space:pre-wrap;margin:0px;padding:0px;color:rgb(102,102,102)">*</span><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">dx</span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"><br></span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">for the residual, which looks like</span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"><br></span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"> R0 = u_t + K u_x</span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"><br></span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px">to me. Where is the extra derivative you show above?</span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"><br></span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"> Thanks,</span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"><br></span></div><div><span class="gmail-n" style="color:rgb(51,51,51);font-size:14px;white-space:pre-wrap;margin:0px;padding:0px"> Matt</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks</div><span class="gmail-m_-764879540201240206m_7950832615768889623m_-8059117138923648995HOEnZb"><font color="#888888"><div>praveen</div></font></span></div>
</blockquote></div><span><br><br clear="all"><span class="gmail-HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="gmail-m_-764879540201240206m_7950832615768889623m_-8059117138923648995gmail_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>
</font></span></span></div></div><span class="gmail-HOEnZb"><font color="#888888">
</font></span></blockquote></span></div><span class="gmail-HOEnZb"><font color="#888888"><span><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-764879540201240206m_7950832615768889623gmail_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></font></span></div></div>
</blockquote></div><br></div>
</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>