[petsc-dev] TSSetConvergedReason(ts,TS_CONVERGED_USER);

Mark Adams mfadams at lbl.gov
Thu Feb 18 07:12:18 CST 2021


OK, makes sense. I didn't know monitors were called before the step.
Thanks,

On Thu, Feb 18, 2021 at 7:25 AM Matthew Knepley <knepley at gmail.com> wrote:

> Stefano is right. Changes in convergence should probably go in TSPostStep.
>
>   Thanks,
>
>      Matt
>
> On Thu, Feb 18, 2021 at 7:22 AM Stefano Zampini <stefano.zampini at gmail.com>
> wrote:
>
>> Mark
>>
>> monitors are not supposed to change the TS. You can think at monitors
>> being 'const' methods of the TS. Also, TSMonitor is called at the beginning
>> of each step , see here
>> https://gitlab.com/petsc/petsc/-/blob/master/src/ts/interface/ts.c#L4169
>>
>>
>> Il giorno gio 18 feb 2021 alle ore 15:16 Mark Adams <mfadams at lbl.gov> ha
>> scritto:
>>
>>>  TSSetConvergedReason(ts,TS_CONVERGED_USER);
>>>
>>> does not seem to stop the iteration in a user monitor function. I have
>>> verified that it works from a post step method. Is this intentional?
>>>
>>> Mark
>>>
>>
>>
>> --
>> Stefano
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210218/775803bf/attachment-0001.html>


More information about the petsc-dev mailing list