[petsc-users] xxxSetFromOptions

Barry Smith bsmith at mcs.anl.gov
Mon Jan 16 20:42:19 CST 2017


> On Jan 16, 2017, at 8:35 PM, Manav Bhatia <bhatiamanav at gmail.com> wrote:
> 
> Hi, 
> 
>   If I am using SNES and am calling SNESSetFromOptions, do I need to still call the xxxSetForOptions for mat, vec, ksp and pc? If so, what is the recommended order of these calls? 

  SNESSetFromOptions automatically calls it for KSP and PC underneath. If you wish to set Mat options you should call MatSetFromOptions after you have created the matrix and set its sizes.

   Barry

> 
> Thanks,
> Manav



More information about the petsc-users mailing list