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?
On Thu, Oct 27, 2011 at 5:50 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote: > On Thu, Oct 27, 2011 at 08:18, behzad baghapour < > behzad.baghapour at gmail.com> wrote: > >> 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 >> SNESMonitorSet<http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESMonitorSet.html#SNESMonitorSet>( >> snes, Monitor, &mon, 0 ); >> > > Yes, put whatever application-specific information in your monitor context > and have it decide how to reconfigure the KSP or PC. > -- ================================== Behzad Baghapour Ph.D. Candidate, Mechecanical Engineering University of Tehran, Tehran, Iran https://sites.google.com/site/behzadbaghapour Fax: 0098-21-88020741 ================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111027/5f46f55d/attachment-0001.htm>