[petsc-users] Convergence and improvement of ill conditioned like problem

Jed Brown jed at jedbrown.org
Thu Feb 6 12:06:57 CST 2014

Danyang Su <danyang.su at gmail.com> writes:

> Hi All,
> I have come across an ill conditioned like problem. The matrix in this 
> problem is block matrix, in each block, there are some zero entries. The 
> preconditioned residual norm drops slowly but the true residual norm 
> drops quickly in the first few iterations. So as to improve the 
> performance, I would like to stop iteration when the true residual norm 
> meet the requirement.
> Q1: Do I need to use KSPSetConvergenceTest for this case?

Try -ksp_norm_type unpreconditioned

How do you enforce boundary conditions?  If you use penalties or a
poorly-scaled formulation, the unpreconditioned residual dropping may
only imply that the boundary conditions are satisfied, but say nothing
about solving the problem in the interior.  You should fix that by
choosing a better preconditioner.

> I can use direct solver for this problem and the outer newton iteration 
> works fine, usually converged in 10 or less newton iterations. But when 
> use PETSc KSP solver, the newton iterations usually need more than 20 
> iterations and the timestep cannot increase much due to the large newton 
> iteration number.
> Q2: Is it possible to increase the precision for KSP solver for this 
> problem?
> I have read the comments by Jed in the website 
> http://scicomp.stackexchange.com/questions/513/why-is-my-iterative-linear-solver-not-converging. 
> I don't know what can KSPSetNullSpace or MatNullSpaceRemove do and 
> haven't tried to use it.

Those are for use when your system is singular.  If the direct solver
works reliably, it's a good sign that the problem is not singular
(though you should understand why, both analytically and numerically).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140206/5f812901/attachment.pgp>

More information about the petsc-users mailing list