[petsc-users] KSPBuildSolution

Matthew Knepley knepley at gmail.com
Wed Feb 16 13:44:13 CST 2011


On Wed, Feb 16, 2011 at 1:39 PM, Juha Jäykkä <juhaj at iki.fi> wrote:

> > > 1) it is converging to a local minimum that is not a solution. This is
> > > checked by PETSc automatically if the line search failed so is unlikely
> > > to be the problem. But run with -info and it will print a great deal of
> > > information about the nonlinear solver including a message about  "
> near
> > > zero implies" cut and paste all the message about the "near zero" and
> > > send it to us.
>
> There is just one and it is the last message before the usual -snes_monitor
> output:
>
> [0] SNESLSCheckLocalMin_Private(): (F^T J random)/(|| F ||*||random||
> 20.4682
> near zero implies found a local minimum
>
> This is with SNES...JacobianColor(). With my own Jacobian, there are none.
>
> > > 2) the function is not smooth so Newton's taylor series approximation
> > > simply doesn't work.
>
> Which function, F(u) or my u*, which satisfies F(u*)=0? I.e. the unknown or
> the function evaluated by FormFunction?
>
> I find it unlikely that the solution would not be at least twice
> differentiable (apart from the endpoints, where it is not): it is almost
> guaranteed to be since the equation is the Euler-Lagrange equation of a
> well
> behaved action integral.
>
> As for F(u), the function is a polynomial of u and x (x being the
> coordinate),
> so it is smooth, if u is.
>
> > Unlikely possibility #3:
> >
> >   You have written an equation with no real solutions, meaning there is a
> > mistake in your function.
>
> But my initial guess is an exact solution. I have two free parameters in
> the
> equation and for a single choice I can find an exact solution - it happens
> to
> be u(x) = x, so the discrete derivatives are exactly the same as the
> continuous ones (apart from floating point rounding errors, of course).
>

Wait, if your initial guess is an exact solution, there should be no KSP
solve.

   Matt


> Now, it is quite possible that my problem is poorly scaled or
> ill-conditioned,
> like Jed Brown suggested. Can I check the eigenvalues of the KSP matrices
> somehow?
>
> -Juha
>
> --
>                 -----------------------------------------------
>                | Juha Jäykkä, juhaj at iki.fi                     |
>                | http://www.maths.leeds.ac.uk/~juhaj           |
>                 -----------------------------------------------
>



-- 
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/20110216/b854bdaa/attachment.htm>


More information about the petsc-users mailing list