changing default values in options database

Matthew Knepley knepley at gmail.com
Fri Nov 7 12:52:01 CST 2008


On Fri, Nov 7, 2008 at 1:41 PM, Boyce Griffith <griffith at cims.nyu.edu> wrote
> Yes, you're right --- I was being stupid and was setting things in the wrong
> order.
>
> A related question: Is there any way to change the list of PC's associated
> with a solver as listed by -help?  For my solver, it only makes sense for
> -pc_type to be "shell" or "none".

There is no way to do this, since these are "generic" KSP objects.

  Matt

> Thanks,
>
> -- Boyce
>
> Lisandro Dalcin wrote:
>>
>> On Fri, Nov 7, 2008 at 3:12 PM, Matthew Knepley <knepley at gmail.com> wrote:
>>>
>>> I think you can just set those values before you call SetFromOptions()
>>> and they will show up. However, I have not tried it.
>>
>> Yep, that's the way options work in most cases.
>>
>>> On Fri, Nov 7, 2008 at 1:06 PM, Boyce Griffith <griffith at cims.nyu.edu>
>>> wrote:
>>>>
>>>> Hi, Folks --
>>>>
>>>> Is there a simple way to change these default values for individual
>>>> solvers?
>>>>  In particular, I would like to be able to ensure that the default
>>>> values
>>>> listed by `-help' correspond to the values that I'm specifying in the
>>>> code.
>>>>
>>
>> As Matt, suggested, use this
>>
>> KSPSetTolerances(ksp, ....)
>> KSPSetFromOptions(ksp)
>>
>>
>
>



-- 
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




More information about the petsc-users mailing list