[petsc-users] need more argument in FormFuction in SNESSetFunction

Josh Lo ysjosh.lo at gmail.com
Fri Mar 25 23:21:14 CDT 2016


Hi,

I am trying to SNES with Fortran.
In FormFunction in SNESSetFuction, i need to call other subroutine and many
array to calculate F(x), but seems like SNESSetFunction only allows one
user-defined array as input argument, say, "dummy" in the next line.

CALL SNESSetFunction(snes,r,FormFunction,dummy,ierr)

How can I pass more than one array through SNESSetFunction to FormFunction?

I am a beginner for PETSc, so the question maybe naive.

Thanks,
Lo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160325/fb08fe88/attachment.html>


More information about the petsc-users mailing list