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

[petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Lawrence Mitchell
Dear petsc-users, I'm trying to setup matrices and data structures for use with MatGetLocalSubMatrix, but I'm rather lost in a world of ISes and block sizes. I have the layouts and so forth correct where all my fields have block size 1, but am struggling to follow how things fit together for

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: Dear petsc-users, I'm trying to setup matrices and data structures for use with MatGetLocalSubMatrix, but I'm rather lost in a world of ISes and block sizes. I have the layouts and so forth correct where all my fields have block

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Lawrence Mitchell
On 19 Dec 2014, at 17:12, Jed Brown j...@jedbrown.org wrote: Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: Dear petsc-users, I'm trying to setup matrices and data structures for use with MatGetLocalSubMatrix, but I'm rather lost in a world of ISes and block sizes. I have

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Jed Brown
Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: What is ISSetBlockSize for then? Just hanging information on the IS for use elsewhere? The index set would need to be contiguous: static PetscErrorCode ISSetBlockSize_Stride(IS is,PetscInt bs) { IS_Stride *sub =

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Lawrence Mitchell
... Calling MatGetLocalSubMatrix results in an error: [0]PETSC ERROR: - Error Message -- [0]PETSC ERROR: Petsc has generated inconsistent data [0]PETSC ERROR: Blocksize of localtoglobalmapping 1 must match

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Lawrence Mitchell
On 19 Dec 2014, at 18:01, Jed Brown j...@jedbrown.org wrote: Lawrence Mitchell lawrence.mitch...@imperial.ac.uk writes: What is ISSetBlockSize for then? Just hanging information on the IS for use elsewhere? The index set would need to be contiguous: So given my field layout, I think I

Re: [petsc-users] Confusion with MatGetLocalSubMatrix

2014-12-19 Thread Lawrence Mitchell
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 Message -- [0]PETSC ERROR: Petsc has