[petsc-dev] KSPAddOptionsChecker() needed?
Barry Smith
bsmith at mcs.anl.gov
Thu Jun 24 21:35:06 CDT 2010
This brings up a "why the heck are we writing PETSc in C anyways" question
We have
KSPSetOptionsPrefix(), PC, SNES etc. AND PetscObjectSetOptionsPrefix() all do the same thing
KSPSetFromOptions(), Vec, Mat, PC etc but NO PetscObjectSetFromOptions()
PetscObjectSetName() but NO KSPSetName() etc
If we have a XXXSetOptionsPrefix() for each separate class then why not a XXXAddOptionsHandler() for each separate class? Or should we remove all the XXXSetOptionsPrefix() but if we remove all of them why not remove all the XXXSetFromOptions() and just always call a PetscObjectSetFromOptions()
Not saying we need to do anything about this, just muttering.
Barry
On Jun 24, 2010, at 9:18 PM, Matthew Knepley wrote:
> On Fri, Jun 25, 2010 at 10:16 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> PetscObjectAddOptionsHandler(PetscObject, PetscErrorCode (*)(PetscObject,void*),void *ctx) ?
>
> Better.
>
> Matt
>
> Barry
>
> On Jun 24, 2010, at 9:07 PM, Matthew Knepley wrote:
>
>> I am for the uniform PetscObjectAddOptionsChecker(). Should it really be called
>> Checker? Sounds like validation. I think there is some value in treating SetFromOptions
>> as a generic facility that can be extended. This is "aspect oriented programming" :)
>>
>> Matt
>>
>> On Fri, Jun 25, 2010 at 10:00 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>>
>> KSPAddOptionsChecker() is never used in PETSc. Is it needed? Can it be removed?
>>
>> Or should we have a PetscObjectAddOptionsChecker() instead, thus expanding this (unneeded capability) to all PETSc objects/solvers?
>>
>> Barry
>>
>>
>>
>>
>> --
>> 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
>
>
>
>
> --
> 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-dev/attachments/20100624/b7931466/attachment.html>
More information about the petsc-dev
mailing list