[petsc-users] A matrix-free Jacobian for SNES using MatShell
Jeremy Roberts
j.alyn.roberts at gmail.com
Tue Aug 31 12:03:37 CDT 2010
Hi Barry,
Thanks for the quick response.
I have the unknown vector u globally accessible and so forgo use of the
user-defined context (I tried to get it to work---can it be used in
Fortran?).
I used
call SNESSetJacobian( snes, Jshell, Jshell, FOO, PETSC_NULL_OBJECT, ierr )
where FOO is an empty function having the correct argument types. It seems
to work now, and I get the exact same answer using an explicit Jacobian
matrix and the shell version. Is there a way to get around needing FOO at
all?
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100831/490594c1/attachment.htm>
More information about the petsc-users
mailing list