[petsc-users] Can I use the direct solver without providing the analytical Jacobian?
Matthew Knepley
knepley at gmail.com
Wed Mar 23 12:07:26 CDT 2011
On Wed, Mar 23, 2011 at 12:04 PM, Rebecca Xuefei Yuan
<xy2102 at columbia.edu>wrote:
> Dear Matt,
>
> Thanks very much for your reply.
>
> I add "snes_fd" in the option, but get
>
> *********************************************
> 0 SNES Function norm 6.064004119408e-01
> Linear solve converged due to CONVERGED_RTOL iterations 2
> Nonlinear solve did not converge due to DIVERGED_FUNCTION_COUNT
> *********************************************
>
It looks like this FD derivative did not give any descent directions when
factored. Possibly
the FD Jacobian is too inaccurate, or the factorization was. These both mean
your problem
is very ill-conditioned. You should try to reformulate it.
Matt
> which is worse than the default Newton-Krylov solver as
>
>
>
> *********************************************
> 0 SNES Function norm 6.064004119408e-01
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 1 SNES Function norm 7.917252729980e-02
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 2 SNES Function norm 6.967390244191e-03
> Linear solve converged due to CONVERGED_RTOL iterations 10
> 3 SNES Function norm 4.863622639964e-03
> Linear solve converged due to CONVERGED_RTOL iterations 5
> 4 SNES Function norm 3.696117297933e-03
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 5 SNES Function norm 1.755926765314e-03
> Linear solve converged due to CONVERGED_RTOL iterations 4
> 6 SNES Function norm 1.206810772164e-03
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 7 SNES Function norm 2.339140575778e-04
> Linear solve converged due to CONVERGED_RTOL iterations 7
> 8 SNES Function norm 1.676689222401e-04
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 9 SNES Function norm 6.032645773400e-05
> Linear solve converged due to CONVERGED_RTOL iterations 5
> 10 SNES Function norm 4.747680518253e-05
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 11 SNES Function norm 1.650301627011e-05
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 12 SNES Function norm 6.030736960845e-06
> Linear solve converged due to CONVERGED_RTOL iterations 5
> 13 SNES Function norm 3.278948607849e-06
> Linear solve converged due to CONVERGED_RTOL iterations 5
> 14 SNES Function norm 2.488486141044e-06
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 15 SNES Function norm 6.689684826529e-07
> Linear solve converged due to CONVERGED_RTOL iterations 3
> 16 SNES Function norm 2.543676285453e-07
> Linear solve converged due to CONVERGED_RTOL iterations 7
> 17 SNES Function norm 1.671616367100e-07
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 18 SNES Function norm 7.228647551356e-08
> Linear solve converged due to CONVERGED_RTOL iterations 7
> 19 SNES Function norm 5.812218130475e-08
> Linear solve converged due to CONVERGED_RTOL iterations 1
> 20 SNES Function norm 2.883628165794e-08
> Linear solve converged due to CONVERGED_RTOL iterations 3
> 21 SNES Function norm 2.291142576313e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 22 SNES Function norm 2.291142573122e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 23 SNES Function norm 2.291142569390e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 24 SNES Function norm 2.291142565808e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 25 SNES Function norm 2.291142562249e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 26 SNES Function norm 2.291142558929e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 27 SNES Function norm 2.291142555415e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 28 SNES Function norm 2.291142554381e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 29 SNES Function norm 2.291142550392e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 30 SNES Function norm 2.291142549609e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 31 SNES Function norm 2.291142546087e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 32 SNES Function norm 2.291142544510e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 33 SNES Function norm 2.291142542335e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 34 SNES Function norm 2.291142541222e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 35 SNES Function norm 2.291142540142e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 36 SNES Function norm 2.291142539388e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 37 SNES Function norm 2.291142535647e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 38 SNES Function norm 2.291142532336e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 39 SNES Function norm 2.291142528666e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 40 SNES Function norm 2.291142526471e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 41 SNES Function norm 2.291142526200e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 42 SNES Function norm 2.291142526187e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 43 SNES Function norm 2.291142522689e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 44 SNES Function norm 2.291142518799e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 45 SNES Function norm 2.291142517718e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 46 SNES Function norm 2.291142517238e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 47 SNES Function norm 2.291142515991e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 48 SNES Function norm 2.291142512095e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 49 SNES Function norm 2.291142508630e-08
> Linear solve converged due to CONVERGED_RTOL iterations 2
> 50 SNES Function norm 2.291142507169e-08
> Nonlinear solve did not converge due to DIVERGED_MAX_IT
> *********************************************
>
> When I see this residual history, I would like to make some improvement on
> the solver, any suggestions on it?
>
> The options for the Newton-Krylov run are
>
> -pc_type asm
> -snes_ksp_ew true
>
> for np=1.
>
> Thanks again for your kind help!
>
> Cheers,
>
> Rebecca
>
>
>
>
>
>
>
>
> Quoting Matthew Knepley <knepley at gmail.com>:
>
> On Wed, Mar 23, 2011 at 11:46 AM, Rebecca Xuefei Yuan
>> <xy2102 at columbia.edu>wrote:
>>
>> Hi,
>>>
>>> If the nonlinear system is evaluated at F(u) = 0 in "FormFunction()", but
>>> the symbolic Jacobian is not provided. Is there any options that I can
>>> call
>>> to solve the corresponding linear system by direct solver?
>>>
>>>
>> -snes_fd, which is very slow.
>>
>> Matt
>>
>>
>> Thanks very much!
>>>
>>> Best regards,
>>>
>>> Rebecca
>>>
>>>
>>>
>>>
>>
>> --
>> 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
>>
>>
>
>
> Rebecca Xuefei YUAN
> Department of Applied Physics and Applied Mathematics
> Columbia University
> Tel:917-399-8032
> www.columbia.edu/~xy2102
>
>
--
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/20110323/a6c2a7c5/attachment.htm>
More information about the petsc-users
mailing list