[petsc-users] using '-snes_type test' to test my coded Jacobian

Matthew Knepley knepley at gmail.com
Wed Sep 5 12:35:20 CDT 2012


On Wed, Sep 5, 2012 at 12:24 PM, Zou (Non-US), Ling <ling.zou at inl.gov>wrote:

> Dear All,
>
> I am trying to use the option '-snes_type test' to test my coded
> Jacobian. I tested with different snes options and it gives me
> different answers. I wonder if someone could give me a hint what is
> wrong with my settings.
>
> The command line looks like this:
> ./my-code-opt -i test.i -snes_type test -snes_test_display
>
> 1), when using 'petsc_option = -snes' in my input file, it says the
> Finite difference Jacobian is very different than the Hand-coded
> Jacobian
>

This means your hand-coded routine is likely wrong.


> 2), when using 'petsc_option = -snes_fd' in my input file, it says the
> Finite difference Jacobian is idential to the Hand-coded Jacobian
>

snes_fd replaces your hand-coded routine with our FD routine, so it
is of course the same as our FD routine.


> 3), when using 'petsc_option = -snes_mf_operator', it gives error messages
> like:
> "Invalid argument! Cannot test with alternative preconditioner!"
>

This is inappropriate for testing.

   Matt


> Thanks in advance.
>
> Ling
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120905/d160af5d/attachment.html>


More information about the petsc-users mailing list