On Mon, Nov 14, 2011 at 11:35 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 developers,<br><br>In my code, the function "residual" used in SNESSetFunction() for calculating Nonlinear function is a member of a class called "solver". When compiling with Petsc, I received the error:<br>
<br>error: argument of type ‘PetscErrorCode (solver::)(_p_SNES*, _p_Vec*, _p_Vec*, void*)’ does not match ‘PetscErrorCode (*)(_p_SNES*, _p_Vec*, _p_Vec*, void*)’<br><br>How can I access that class member function is SNESSetFunction()?<br>
I need to keep my code structure as before.<br></blockquote><div><br></div><div>Make the function static.</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, BB</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>