That's great, Matt. Thanks to point out the example for me. <br><br>best,<br>Alan<br><br><div class="gmail_quote">On Mon, Oct 3, 2011 at 12:06 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Mon, Oct 3, 2011 at 12:00 PM, Alan Wei <span dir="ltr"><<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Dear all, <div> I still have the problem. >_<</div><div> I can not find the DMMG interface provided to change the RHS, mentioned by Dr. Smith. The only thing I have is DMMGSetKSP(). It is <span style="font-family: monospace; white-space: pre-wrap; background-color: rgb(255, 255, 255); font-size: medium;">DMMGSetKSP(dmmg,ComputeRHS,ComputeMatrix).</span>When I use it first time in this example, it calls both ComputeRHS and ComputeMatrix (I assert some print-out probes inside these two functions). However, If I use it again, it just does not call the new one; rather, it calls the old one. <br>
My code is attached. Could you please help me to fix this problem ^_^.</div></blockquote><div><br></div></div><div>Yes, this is the way DMMG works. It can only be setup once. This is a severe limitation, which is why we</div>
<div>have discontinued its use. If you look at ex50.c, we show how to transform ex19 into a code using SetDM</div><div>instead of DMMG. You can then reset the DMDA rhs function at each iteration.</div><div><br></div><div>
Thanks,</div><div><br></div><div> Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><font face="monospace" size="3"><span style="white-space: pre-wrap;">best,</span></font></div>
<div><font face="monospace" size="3"><span style="white-space: pre-wrap;">Alan<br>
</span></font><br><div class="gmail_quote">On Sun, Oct 2, 2011 at 5:52 PM, Alan Wei <span dir="ltr"><<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In this example, i recalled the ComputeRHS.<div><br></div><div><font color="#888888">Alan</font><div><div></div><div><br><br><div class="gmail_quote">On Sun, Oct 2, 2011 at 5:22 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div>On Sun, Oct 2, 2011 at 16:31, Alan Wei <span dir="ltr"><<a href="mailto:zhenglun.wei@gmail.com" target="_blank">zhenglun.wei@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
BTW, what is the DMMG interface you are talking about? is it DMMGSetKSP()?</blockquote><div><br></div></div><div>Every object and function containing "DMMG" will be removed. (I don't think we've decided on a precise timeline, but don't write new code that uses DMMG.)</div>
<div>
<div> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> if so, that's is my problem. At the 2nd time of using DMMGSetKSP() in the main function, it does not call the __function__ to compute the right hand side. >_< any suggestions on that?</blockquote>
</div></div><br><div>What function is being called?</div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</blockquote></div></div><font color="#888888"><br><br clear="all"><div><br></div>-- <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>
</font></blockquote></div><br>