SNESSetUp() and matrix-free options

Barry Smith bsmith at
Thu May 7 15:29:07 CDT 2009

   One could have -snes_mf override -snes_mf_operator that would make  

    There is no hierarchy of options (first, last, in files etc) in  
order to keep the model

    It is always possible someone has two options that conflict with  
each other in the
options database. This is suppose to generate an error. and the only  
solution is for
user to change one of them.


On May 7, 2009, at 3:24 PM, Jed Brown wrote:

> Barry Smith wrote:
>> On May 7, 2009, at 3:00 PM, Lisandro Dalcin wrote:
>>> 2) What should happen if a user pass BOTH options -snes_mf and
>>> -snes_mf_operators? Error? One of them should overrides the other?
>>   An error.
> The tricky part here is, suppose the user wants to use one of these by
> default, so they put it in a .petscrc or -options_file.  Now they will
> get an error if they try to change it on the command line.  Is there a
> reasonable way to use whichever option comes last?  Or just have
> -snes_mf -snes_mf_type {...} so that the options system enforces that
> there is only one way to do it.  -snes_mf_operator -pc_type none is
> equivalent anyway.
> Jed

More information about the petsc-dev mailing list