Re: [petsc-users] Using MatShell without MatMult

2017-04-07 Thread Dave May
You should also not call PetscInitialize() from within your user MatMult function. On Fri, 7 Apr 2017 at 13:24, Matthew Knepley wrote: > On Fri, Apr 7, 2017 at 5:11 AM, Francesco Migliorini < > francescomigliorin...@gmail.com> wrote: > > Hello, > > I need to solve a linear

Re: [petsc-users] Using MatShell without MatMult

2017-04-07 Thread Matthew Knepley
On Fri, Apr 7, 2017 at 5:11 AM, Francesco Migliorini < francescomigliorin...@gmail.com> wrote: > Hello, > > I need to solve a linear system using GMRES without creating explicitly > the matrix because very large. So, I am trying to use the MatShell strategy > but I am stucked. The problem is that

[petsc-users] Using MatShell without MatMult

2017-04-07 Thread Francesco Migliorini
Hello, I need to solve a linear system using GMRES without creating explicitly the matrix because very large. So, I am trying to use the MatShell strategy but I am stucked. The problem is that it seems to me that inside the user-defined MyMatMult it is required to use MatMult and this would