[petsc-users] KSPBuildSolution
Juha Jäykkä
juhaj at iki.fi
Wed Feb 16 13:39:42 CST 2011
> > 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).
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 |
-----------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110216/785508dc/attachment.pgp>
More information about the petsc-users
mailing list