[petsc-users] using '-snes_type test' to test my coded Jacobian
Zou (Non-US), Ling
ling.zou at inl.gov
Wed Sep 5 12:42:17 CDT 2012
Thanks Matt. This is really helpful.
Best,
Ling
On 9/5/12, Matthew Knepley <knepley at gmail.com> wrote:
> 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
>
More information about the petsc-users
mailing list