[petsc-dev] why does this inanity exist?

Lisandro Dalcin dalcinl at gmail.com
Sun Apr 30 15:49:31 CDT 2017

On 30 April 2017 at 23:27, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> On Apr 30, 2017, at 3:19 PM, Jed Brown <jed at jedbrown.org> wrote:
>> Proposal: add ts->default_adapt_type.  TSCreate_* sets this.  Remove
>> TSGetAdapt from TSCreate and move it to TSSetUp and TSSetFromOptions.
>> Make TSGetAdapt call TSAdaptSetType(adapt,ts->default_adapt_type).  Now
>> there is no "setbyuser", but TS implementations can select their
>> preferences and those will be ignored if the user calls TSGetAdapt and
>> changes it themselves.  And -ts_adapt_type none always works.
>   I don't see any immediate flaws in this approach.

I like it, too. I'll go for it. Unless there is any objection, the
default_adapt_type will point to a string literal set in TSCreate_XXX,
so I'll not malloc/free it.

Lisandro Dalcin
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia

Office Phone: +966 12 808-0459

More information about the petsc-dev mailing list