[petsc-dev] TS is creating SNES ALWAYS even when not needed
Barry Smith
bsmith at mcs.anl.gov
Sat Apr 29 21:57:45 CDT 2017
> On Apr 29, 2017, at 9:51 PM, Jed Brown <jed at jedbrown.org> wrote:
>
> Barry Smith <bsmith at mcs.anl.gov> writes:
>
>> For example TSSetFromOptions() creates SNES, TSSetRHSFunction()
>> creates SNES, TSSetProblemType() creates SNES!
>>
>> This is pitifully bad design, TS should only be creating SNES when
>> SNES is needed! Unfortunately TS is now so badly contaminated with
>> SNES it is not trivial to remove it.
>
> It was an attempt to reduce the number of references
?? What kind of references?
> and prevent the
> opportunity for a user to, for example, TSGetSNES and then change the
> SNES Jacobian. But I'll need to overhaul this with IRKs anyway, for
> which the SNES sees a larger system than what the user is providing.
Maybe all PETSc programs should automatically create some Tao objects, TS objects, SNES objects etc just on the off chance the user might want them later. PETSc has usually used the model of create on demand, here clearly it did not.
More information about the petsc-dev
mailing list