[petsc-users] Setting absolute tolerance on ksp solver

Matthew Knepley knepley at gmail.com
Wed Sep 9 08:33:19 CDT 2015


On Wed, Sep 9, 2015 at 8:24 AM, Amal Sahai <amalsahai at gmail.com> wrote:

> The problem still persists. The solver keeps iterating till the maximum
> number of iterations is reached despite absolute convergence criteria being
> met long before that.
>
>
Run with -ksp_view -ksp_monitor_true_residual -ksp_converged_reason

and send the output.

   Matt


> Regards
> Amal
>
> On Tue, Sep 8, 2015, 22:50 Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>
>>   Instead of setting rtol to default you should set it zero so it never
>> gets triggered.
>>
>> > On Sep 8, 2015, at 10:38 PM, Amal Sahai <amalsahai at gmail.com> wrote:
>> >
>> > I have been setting the tolerance for a ksp solver using
>> KSPSetTolerances. I would like to set my convergence criteria using only
>> the absolute convergence parameter. I use the following command to set this
>> up:
>> >
>> > KSPSetTolerances( ksp, PETSC_DEFAULT, atol, PETSC_DEFAULT, maxits)
>> >
>> > The problem is my ksp solver considers only the value of rtol while
>> stopping the iterative solve. I tried changing the value of rtol to some
>> other parameter instead of PETSC_DEFAULT (while making sure that atol is
>> the more stringent condition requiring more iterations) but to no avail.
>> >
>> > How can I fix this?
>> >
>> > Regards
>> > Amal
>>
>>


-- 
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/20150909/2a186a61/attachment.html>


More information about the petsc-users mailing list