Re: [petsc-users] How to use class function in SNESSetFunction

2017-03-20 Thread Matthew Knepley
On Mon, Mar 20, 2017 at 7:01 PM, Ping He wrote: > Dear Matt, > > I know it is an old thread and your solution works well, but I still want > to ask if there are any alternative instead of setting the member function > "static". The issue is that I need to use multiple member

Re: [petsc-users] How to use class function in SNESSetFunction

2017-03-20 Thread Ping He
Dear Matt, I know it is an old thread and your solution works well, but I still want to ask if there are any alternative instead of setting the member function "static". The issue is that I need to use multiple member functions (20+) in SNESSetFunction and numerous class variables. So

[petsc-users] How to use class function in SNESSetFunction

2011-11-15 Thread behzad baghapour
Thanks. -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/2015/f3a8c575/attachment.htm

[petsc-users] How to use class function in SNESSetFunction

2011-11-14 Thread behzad baghapour
Dear developers, 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: error: argument of type ?PetscErrorCode (solver::)(_p_SNES*, _p_Vec*, _p_Vec*, void*)? does not

[petsc-users] How to use class function in SNESSetFunction

2011-11-14 Thread Matthew Knepley
On Mon, Nov 14, 2011 at 11:35 AM, behzad baghapour behzad.baghapour at gmail.com wrote: Dear developers, 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: