[petsc-dev] why does this inanity exist?
Lisandro Dalcin
dalcinl at gmail.com
Sun Apr 30 12:53:16 CDT 2017
On 30 April 2017 at 19:09, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>> On Apr 30, 2017, at 8:39 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>>
>> On 30 April 2017 at 05:53, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>> TS already had mechanisms to turn on or off adaptivity (presumably) so why would an individual type need to reproduce this functionality except to drive users insane?
>>
>> We do not have a clear mechanism for a TS subtype to decide on whether
>> adaptivity should be turn on or off by default. The rationale to turn
>> it off by default are more or less described in other related email:
>> the error estimator is bad quality (or lower order than the one of the
>> LTE of the method).
>
> Why isn't the default just switched when the subtype (with a bad adapter) is selected by the user?
>
> The reason is that the user may have already manually turned on the adapter and you don't want PETSc switching it secretly later?
>
Yes, indeed. We have the usual fight between explicit API calls in
code interacting with SetType() and SetFromOptions().
However, after my refactoring of TSAdapt, maybe we are closer to get
something that works better.
> Do we need then to have a flag in TS - adaptsetbyuser? and only change the default if that flag is not on?
>
> I prefer not to have setbyuser flags in PETSc but sometimes it seems we cannot live without them.
>
I don't like any setbyuser flags either.
>>
>> Please note that THETA and ALPHA do use the standard TSAdapt
>> infrastructure, the only thing this "use adapt" flag does is to turn
>> it off by default. If you consider it appropriate, I can remove all
>> that code for the "use adapt" flag in THETA and ALPHA, users can then
>> turn off adaptivity with `-ts_adapt_type none`.
>
> Yes, I don't understand why users should not just use -ts_adapt_type none.
>
These "use adapt" flags were just an attempt to not surprise users
with TSTHETA changing previous behavior. However, as the error
estimator is very conservative, I don't really see a problem with
having adaptivity on by default in THETA and ALPHA.
So Barry, if you are for it, and Jed has no objections, I can fire a
PR tomorrow removing these crappy "use adapt flags" in favor of the
-ts_adapt_type approach.
@Stefano, this should fix for good your previous complaints/questions
about "How do I turn on adaptivity on these methods?".
--
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/
4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa
Office Phone: +966 12 808-0459
More information about the petsc-dev
mailing list