Thanks. I want to update my user-defined object "element" in each SNES iteration. Should I include it as user-defined context and pass it by void* in Monitor function too?<br><br><br><br><br><div class="gmail_quote">
On Thu, Oct 27, 2011 at 5:50 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Thu, Oct 27, 2011 at 08:18, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com" target="_blank">behzad.baghapour@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>So, I should define a monitor context "mon" and a function like "Monitor" which I want to change whatever I wand during each SNES iteration then pass it to the function <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESMonitorSet.html#SNESMonitorSet" target="_blank">SNESMonitorSet</a>( snes, Monitor, &mon, 0 );<br>
</div></blockquote></div><br></div><div>Yes, put whatever application-specific information in your monitor context and have it decide how to reconfigure the KSP or PC.</div>
</blockquote></div><br><br clear="all"><br>-- <br>==================================<br>Behzad Baghapour<br>Ph.D. Candidate, Mechecanical Engineering<br>University of Tehran, Tehran, Iran<br><a href="https://sites.google.com/site/behzadbaghapour" target="_blank">https://sites.google.com/site/behzadbaghapour</a><br>
Fax: 0098-21-88020741<br>==================================<br><br>