Re: [petsc-dev] SNES with linear operator

2013-09-01 Thread Mark F. Adams
> > Perhaps you also want SNESSetLagPreconditioner > > - lag - -1 indicates NEVER rebuild, 1 means rebuild every time the Jacobian > is computed within a single nonlinear solve, 2 means every second time > the Jacobian is built etc. -2 indicates rebuild preconditioner at > next chance

Re: [petsc-dev] SNES with linear operator

2013-09-01 Thread Barry Smith
You mean -snes_type ksponly ? Anyways the manual page says: SNESKSPONLY - Nonlinear solver that only performs one Newton step and does not compute any norms. The main purpose of this solver is to solve linear problems using the SNES interface, without any additional overhe

Re: [petsc-dev] SNES with linear operator

2013-09-01 Thread Matthew Knepley
On Sun, Sep 1, 2013 at 5:54 PM, Mark F. Adams wrote: > I have a SNES solver that runs with a linear operator at times. I use > -ksp_ksponly. The KSPSetOperator seems to get called every solve because > the PC setup code gets called every solve. Should this be happening? Is there a problem wi

Re: [petsc-dev] SNES with linear operator

2013-09-01 Thread Peter Brune
-snes_type ksponly would be the appropriate option. KSPOnly does *only* one iteration consisting of a single KSP solve ( http://www.mcs.anl.gov/petsc/petsc-current/src/snes/impls/ksponly/ksponly.c.html ). Are you seeing different behavior than this? - Peter

[petsc-dev] SNES with linear operator

2013-09-01 Thread Mark F. Adams
I have a SNES solver that runs with a linear operator at times. I use -ksp_ksponly. The KSPSetOperator seems to get called every solve because the PC setup code gets called every solve. Should this be happening? Mark