Re: [petsc-users] KSP and matrix-free matrix (shell)

2018-10-18 Thread Jed Brown
Matthew Knepley writes: > On Thu, Oct 18, 2018 at 12:07 PM Zhang, Hong wrote: > >> When you use shell matrix, i.e., matrix-free, you cannot it as a >> preconditioner. Add option '-pc_type none'. >> > > There are some you can use, like -pc_type cheby That doesn't exist. You can do the nested

Re: [petsc-users] KSP and matrix-free matrix (shell)

2018-10-18 Thread Matthew Knepley
On Thu, Oct 18, 2018 at 12:07 PM Zhang, Hong wrote: > When you use shell matrix, i.e., matrix-free, you cannot it as a > preconditioner. Add option '-pc_type none'. > There are some you can use, like -pc_type cheby MAtt > Hong > > On Thu, Oct 18, 2018 at 10:57 AM Florian Lindner > wrote:

Re: [petsc-users] KSP and matrix-free matrix (shell)

2018-10-18 Thread Dave May
On Thu, 18 Oct 2018 at 17:57, Florian Lindner wrote: > Hello, > > I try to use the KSP solver package together with a shell matrix: > > > MyContext mycontext; // an empty struct, not sure it it's needed? > Mat s; > ierr = MatCreateShell(PETSC_COMM_WORLD, size, size, PETSC_DECIDE, >

Re: [petsc-users] KSP and matrix-free matrix (shell)

2018-10-18 Thread Zhang, Hong
When you use shell matrix, i.e., matrix-free, you cannot it as a preconditioner. Add option '-pc_type none'. Hong On Thu, Oct 18, 2018 at 10:57 AM Florian Lindner mailto:mailingli...@xgm.de>> wrote: Hello, I try to use the KSP solver package together with a shell matrix: MyContext

[petsc-users] KSP and matrix-free matrix (shell)

2018-10-18 Thread Florian Lindner
Hello, I try to use the KSP solver package together with a shell matrix: MyContext mycontext; // an empty struct, not sure it it's needed? Mat s; ierr = MatCreateShell(PETSC_COMM_WORLD, size, size, PETSC_DECIDE, PETSC_DECIDE, , ); ierr = MatShellSetOperation(s, MATOP_MULT,