[petsc-users] template function as argument to MatShellSetOperation

2015-01-12 Thread Marco Cisternino
Hi PETSc users, I'm trying to set my matrix multiplication with MatShellSetOperation. The question is: is it possible to pass a c++ template function as my matrix multiplication to MatShellSetOperation? And if yes, how? Thanks for any suggestions. Marco

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2015-01-12 Thread Lawrence Mitchell
Hi folks, On 19 Dec 2014, at 18:29, Lawrence Mitchell lawrence.mitch...@imperial.ac.uk wrote: On 19 Dec 2014, at 18:19, Lawrence Mitchell lawrence.mitch...@imperial.ac.uk wrote: ... Calling MatGetLocalSubMatrix results in an error: [0]PETSC ERROR: - Error

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: Fieldsplit block preconditioners can be used on this type of matrix, but success obviously depends on the analytic character of the operators. In particular, if we assume that we have great PCs for the diagonal, then B is the most important variable,

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Matthew Knepley
On Sat, Jan 10, 2015 at 10:10 AM, Umut Tabak u.ta...@tudelft.nl wrote: Dear all, For an eigenvalue solver, I was brainstorming on some ideas to solve some linear systems of the form: [A B] x1 = b1 [B C] x2 = b2 Where A and C are symmetric sparse but indefinite matrices due to some shift

Re: [petsc-users] template function as argument to MatShellSetOperation

2015-01-12 Thread Matthew Knepley
On Mon, Jan 12, 2015 at 7:59 AM, Marco Cisternino marco.cistern...@optimad.it wrote: Hi PETSc users, I'm trying to set my matrix multiplication with MatShellSetOperation. The question is: is it possible to pass a c++ template function as my matrix multiplication to MatShellSetOperation?

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Colin McAuliffe
I'd be interested in implementing this, I think I should have some time to spend on it in a few weeks. I suppose the ISSubset function should determine which ISs were used to make up a third IS? Can this be done by having ISSum attach a list of pointers to the constituent ISs to the summed IS for

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Colin McAuliffe
Thanks for the comments Jed and Matt, I'll defer to your judgement regarding the implementation that is the least intrusive. I'll take a look at this later on when I have time. Colin On Mon, Jan 12, 2015 at 12:29 PM, Jed Brown j...@jedbrown.org wrote: Matthew Knepley knep...@gmail.com writes:

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Umut Tabak
On 01/12/2015 05:58 PM, Matthew Knepley wrote: On Mon, Jan 12, 2015 at 10:57 AM, Umut Tabak u.ta...@tudelft.nl mailto:u.ta...@tudelft.nl wrote: On 01/12/2015 04:29 PM, Matthew Knepley wrote: Fieldsplit block preconditioners can be used on this type of matrix, but success

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Jed Brown
Umut Tabak u.ta...@tudelft.nl writes: Thx for the swift reply, well, you mean directly or iteratively? I looked a bit more but I am not sure if that is possible iteratively or not, I guess it is not since the character of the blocks on the diagonal are not well suited to iterative solution

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Matthew Knepley
On Mon, Jan 12, 2015 at 11:15 AM, Jed Brown j...@jedbrown.org wrote: Colin McAuliffe cjm2...@columbia.edu writes: I'd be interested in implementing this, I think I should have some time to spend on it in a few weeks. I suppose the ISSubset function should determine which ISs were used to

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Jed Brown
Matthew Knepley knep...@gmail.com writes: I don't like this business of ISes holding pointers to other ISes. This fundamentally changes the model. The hashing sounds workable. ISs are immutable and a reference would probably be held anyway, so I don't think it's evil. We also have to think

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Umut Tabak
On 01/12/2015 04:29 PM, Matthew Knepley wrote: Fieldsplit block preconditioners can be used on this type of matrix, but success obviously depends on the analytic character of the operators. In particular, if we assume that we have great PCs for the diagonal, then B is the most important

Re: [petsc-users] An advice on a linear system solution

2015-01-12 Thread Matthew Knepley
On Mon, Jan 12, 2015 at 10:57 AM, Umut Tabak u.ta...@tudelft.nl wrote: On 01/12/2015 04:29 PM, Matthew Knepley wrote: Fieldsplit block preconditioners can be used on this type of matrix, but success obviously depends on the analytic character of the operators. In particular, if we assume

Re: [petsc-users] Recursive field split with MatNest

2015-01-12 Thread Jed Brown
Colin McAuliffe cjm2...@columbia.edu writes: I'd be interested in implementing this, I think I should have some time to spend on it in a few weeks. I suppose the ISSubset function should determine which ISs were used to make up a third IS? Can this be done by having ISSum attach a list of