Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Klaij, Christiaan
Barry, I came across the same problem and decided to use KSPSetNormType instead of KSPSetPCSide. Do I understand correctly that CG with KSP_NORM_UNPRECONDITIONED would be as efficient as with KSP_NORM_PRECONDITIONED? Since PC_RIGHT is not supported, I was under the impression that the former

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Patrick Sanan
On Wed, Mar 8, 2017 at 11:12 AM, Barry Smith wrote: > >> On Mar 8, 2017, at 10:47 AM, Kong, Fande wrote: >> >> Thanks Barry, >> >> We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried >> "-ksp_pc_side right", and petsc did not error out. >>

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Jed Brown
Looks fine to me. Thanks. Barry Smith writes: >A proposed fix > https://bitbucket.org/petsc/petsc/pull-requests/645/do-not-assume-that-all-ksp-methods-support > >Needs Jed's approval. > >Barry > > > >> On Mar 8, 2017, at 10:33 AM, Barry Smith

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Kong, Fande
Thanks, Barry. Fande, On Wed, Mar 8, 2017 at 3:55 PM, Barry Smith wrote: > >A proposed fix https://urldefense.proofpoint.com/v2/url?u=https-3A__ > bitbucket.org_petsc_petsc_pull-2Drequests_645_do-2Dnot- > 2Dassume-2Dthat-2Dall-2Dksp-2Dmethods-2Dsupport=DQIFAg= >

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Barry Smith
A proposed fix https://bitbucket.org/petsc/petsc/pull-requests/645/do-not-assume-that-all-ksp-methods-support Needs Jed's approval. Barry > On Mar 8, 2017, at 10:33 AM, Barry Smith wrote: > > > Please tell us how you got this output. > > PETSc CG

Re: [petsc-users] SNES for 1D problem?

2017-03-08 Thread Barry Smith
> On Mar 8, 2017, at 4:24 PM, Adrian Croucher wrote: > > hi > > If part of my code needs a one-dimensional nonlinear solver (i.e. to solve > for a single scalar variable), which for some problems will be called many > times, does it still make sense to use SNES for

[petsc-users] SNES for 1D problem?

2017-03-08 Thread Adrian Croucher
hi If part of my code needs a one-dimensional nonlinear solver (i.e. to solve for a single scalar variable), which for some problems will be called many times, does it still make sense to use SNES for that? or are there overheads from the vector machinery that make it less efficient for that

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Barry Smith
Jed, This seems wrong. It is called in KSPCreate() and seems to imply all KSP methods support no-norm with right preconditioning (or left for that matter). But CG doesn't support right period and FGMES does not support left at all. Shouldn't those two lines be removed (and maybe they

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Barry Smith
> On Mar 8, 2017, at 10:47 AM, Kong, Fande wrote: > > Thanks Barry, > > We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried > "-ksp_pc_side right", and petsc did not error out. > > I like to understand why CG does not work with right preconditioning? >

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Barry Smith
We should be getting an error. > On Mar 8, 2017, at 11:19 AM, Matthew Knepley wrote: > > On Wed, Mar 8, 2017 at 10:47 AM, Kong, Fande wrote: > Thanks Barry, > > We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried > "-ksp_pc_side

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Matthew Knepley
On Wed, Mar 8, 2017 at 10:47 AM, Kong, Fande wrote: > Thanks Barry, > > We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried > "-ksp_pc_side right", and petsc did not error out. > > I like to understand why CG does not work with right preconditioning? >

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Kong, Fande
Thanks Barry, We are using "KSPSetPCSide(ksp, pcside)" in the code. I just tried "-ksp_pc_side right", and petsc did not error out. I like to understand why CG does not work with right preconditioning? Mathematically, the right preconditioning does not make sense? Fande, On Wed, Mar 8, 2017

Re: [petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Barry Smith
Please tell us how you got this output. PETSc CG doesn't even implement right preconditioning. If you ask for it it should error out. CG supports no norm computation with left preconditioning. Barry > On Mar 8, 2017, at 10:26 AM, Kong, Fande wrote: > > Hi All, >

[petsc-users] CG with right preconditioning supports NONE norm type only

2017-03-08 Thread Kong, Fande
Hi All, The NONE norm type is supported only when CG is used with a right preconditioner. Any reason for this? *0 Nonlinear |R| = 1.732051e+00 0 Linear |R| = 0.00e+00 1 Linear |R| = 0.00e+00