Re: [petsc-users] SNESQN number of past states

2018-02-15 Thread Bikash Kanungo
Thanks again Barry. I figured it out. My SNESView was called before SNESSetFromOptions and hence was showing the default value. Regards, Bikash On Wed, Feb 14, 2018 at 11:28 PM, Smith, Barry F. wrote: > > I stuck the line > > PetscOptionsSetValue(NULL,"-snes_qn_m", "50"); > > in src/snes/ex

Re: [petsc-users] SNESQN number of past states

2018-02-14 Thread Smith, Barry F.
I stuck the line PetscOptionsSetValue(NULL,"-snes_qn_m", "50"); in src/snes/examples/tutorials/ex19.c and called it with -da_refine 2 -snes_monitor -snes_type qn -snes_view and the results showed Stored subspace size: 50 so I am afraid it is something unique to exactly your code that

Re: [petsc-users] SNESQN number of past states

2018-02-14 Thread Bikash Kanungo
Thanks Barry and Matthew. @Barry: I'm following the same procedure as you've mentioned - PetscOptionsSetValue() precede SNESSetFromOptions. Here's the snippet for my code: --- error = SN

Re: [petsc-users] SNESQN number of past states

2018-02-14 Thread Matthew Knepley
On Wed, Feb 14, 2018 at 6:43 PM, Smith, Barry F. wrote: > > Hmm, > > 1) make sure you call PetscOptionsSetValue() before you call to > SNESSetFromOptions() > > 2) make sure you call SNESSetFromOptions() > > 3) did you add a prefix to the SNES object? If so make sure you include it > in the Pets

Re: [petsc-users] SNESQN number of past states

2018-02-14 Thread Smith, Barry F.
Hmm, 1) make sure you call PetscOptionsSetValue() before you call to SNESSetFromOptions() 2) make sure you call SNESSetFromOptions() 3) did you add a prefix to the SNES object? If so make sure you include it in the PetscOptionsSetValue() call. I can't see a reason why it won't work. Does