[petsc-users] On changing the tolerance for SNES and KSP

Jed Brown jedbrown at mcs.anl.gov
Sat Oct 13 17:16:15 CDT 2012

1. Especially with multi-physics simulations, it's important to
nondimensionalize. You don't have to be formal about it, but computing with
units that are well-scaled is useful to remove inessential ill-conditioning.

2. Most PETSc examples volume-weight residuals so that they can remain of
the same order as you refine the grid.

3. Run with -snes_converged_reason -snes_monitor -ksp_converged_reason
-ksp_monitor_true_residual. That will give you the important information
about how the solver is converging. If it's not clear what is happening,
you can send the output here.

4. More tips here: http://scicomp.stackexchange.com/a/514/119

On Sat, Oct 13, 2012 at 5:04 PM, Bao Kai <paeanball at gmail.com> wrote:

> Hi, all,
> I am a little unclear about the exact definition of the relative and exact
> tolerance or how the PETSc determines the convergence, while my problem is
> as follows.
> Generally, all my equations are solved by SNES and I use the physical
> units.  The PC and KSP are bjacobi and bicgstab respectively. For the
> pressure equation, at the beginning, the domain is not so big, and the
> pressure are within a certain range.  The default parameters works.
> Then I increase the size of the domain by 10 times, then the range of the
> pressure will be about 10 times bigger accordingly due to gravity. Then
> with the default parameters, the KSP failed in getting converged with
> reaching the maximum iteration No. .
> Could you please help to tell me how I should change the tolerance to fit
> the change of the domain?
> Thank you very much.
> Best Regards,
> Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20121013/b18092b9/attachment-0001.html>

More information about the petsc-users mailing list