[petsc-users] snes set function and Jacobian concurrently

Barry Smith bsmith at mcs.anl.gov
Mon Apr 18 13:58:24 CDT 2016


http://www.mcs.anl.gov/petsc/documentation/faq.html#functionjacobian


> On Apr 18, 2016, at 8:34 AM, Hoang Giang Bui <hgbk2008 at gmail.com> wrote:
> 
> Hello
> 
> Is it possible to combine the SNESSetFunction and SNESSetJacobian into one call, i.e. SNESSetFunctionAndJacobian which takes unique function pointer to compute rhs and Jacobian concurrently? The reason for it is that the finite element code I'm working on contribute to global rhs and stiffness at one call, so to cater for SNES would break the existing interface.
> 
> Another supporting point for that feature is that for irreversible problem, the rhs (equilirium) and Jacobian shall not be decoupled, since they are not able to return to the past state after proceed.
> 
> Giang
> 



More information about the petsc-users mailing list