[petsc-users] SNES solvers

Matthew Knepley knepley at gmail.com
Thu May 2 07:33:21 CDT 2013


On Thu, May 2, 2013 at 7:04 AM, Abdul-Lateef Haji-Ali <
abdullateef.hajiali at kaust.edu.sa> wrote:

> Greetings,
>
> I am trying to solve a system of 4 non-linear equations to find 4 unknowns.
> The equations are slightly complicated  and unstable for slightly large
> values of the unknowns.
> In most of the cases the correct solution is found. However sometimes the
> values that are fed to my residual function are big and nan/inf values are
> produced.
>

It could be overflow, so scaling the equations may help. However, it could
also be the
the math is poorly organized so that you create huge intermediate values
(this seems
likely since all your other values are quite small).

   Matt


> This is the output of my residual function (x are the parameters and f is
> the computed residual)
> x= [1, 1, 2, 4]; f= [-1.32993, 6.46116, 0.490443, -4.47854];
> x= [2.32993, -5.46116, 1.50956, 8.47854]; f= [-1.77078, -133.872, 4.26217,
> 71.9728];
> x= [1.06488, 0.684771, 1.97607, 4.2185]; f= [-0.431978, 2.79625, 0.190123,
> 0.0503181];
> x= [4.10071, 128.411, -2.75261, -63.4942]; f= [62.0141, 2548.28, -95.0523,
> -1354.74];
> x= [1.74294, 0.960827, 1.63558, 4.54888]; f= [19.6641, 4.52508, -9.48464,
> 7.44219];
> x= [-57.9134, -2419.86, 92.2997, 1291.24]; f= [inf, -inf, inf, -inf];
> This was using ngmres, I noticed similar behaviour with other types.
>
> What can I do to improve the solver?
> N
> ote that my experience with petsc in new and limited.
>
> Thank you,
>
> --
> Abdul Lateef Haji Ali
>



-- 
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/20130502/d562a4dd/attachment.html>


More information about the petsc-users mailing list