<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 4, 2015 at 1:43 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br>Are there any any TS examples or tests for FEM using DMPlex? I want to solve a transient diffusion problem of the form below:<br></div></div></blockquote><div><br></div><div>Sorry, I have not had time to set these up yet.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>du/dt = div[grad[u]] + f<br></div><div><br> using backward euler method. I am curious as to how to implement this, namely into the pointwise functions. Working off of SNES ex12, if I understand this correctly, would I do something like the following:<br><br></div><div>1) Modify the f0 function such that f0[0] = u_t[0] + <forcing function><br></div></div></blockquote><div><br></div><div>Yes, exactly.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>2) Add a g0_uu function such that g0[0] = 1.0<br></div></div></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>3) Setup the TS solver in the main function</div></div></blockquote><div><br></div><div>Replace SNES with TS and use</div><div><br></div><div>        ierr = DMTSSetIFunctionLocal(dm, DMPlexTSComputeIFunctionFEM, &user);CHKERRQ(ierr);</div><div><br></div><div>Let me know if anything does not work.</div><div><br></div><div> Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Am I missing something crucial here, or am I kind of along the right track?<br><br></div><div>Thanks,<br>Justin<br></div></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>