On Thu, Oct 27, 2011 at 10:05 AM, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear All,<br><br>I want to use SNES for nonlinear Newton Iterations. All of my RHS and Jacobian Matrix are calculated with my own defined object called "element". How should I pass my object into SNES functions to calculate required RHS and Jacobian?<br>
</blockquote><div><br></div><div>Define functions CalculateRHS() and CalculateJacobian() and pass them to SNES, and pass 'element' as the user context. Then</div><div>inside that function, you can get 'element' back from the 'ctx' argument.</div>
<div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks,<br><font color="#888888">B. B.<br></font></blockquote></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>