The solver doesn't converge

Matthew Knepley knepley at gmail.com
Wed Apr 8 17:16:38 CDT 2009


On Wed, Apr 8, 2009 at 5:08 PM, Yixun Liu <enjoywm at cs.wm.edu> wrote:

> Hi,
> I build a finite element system and the related PETSc codes are following,
>
>
>  KSPSetOperators(ksp,sparseMechanicalStiffnessMatrix,sparseMechanicalStiffnessMatrix,DIFFERENT_NONZERO_PATTERN);
>  KSPSetTolerances(ksp,0.001,1.e-50,PETSC_DEFAULT, PETSC_DEFAULT);
>
> I output the solution and find its magnitude is about 1.0e+10. It's
> definitely wrong.  The correct solution should be around 1 or 2. It
> seems the solver cannot converge. How do deal with this issue?


Always start with LU to make sure your system is constructed correctly:

  -ksp_type preonly -pc_type lu

    Matt


>
> Thanks.
>
> Yixun
>
-- 
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/20090408/8cdffac2/attachment.htm>


More information about the petsc-users mailing list