Re: [petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Fantastic, it definitely solved my problem! Thank you! Should I always create the vectors with MatCreateVecs when I use them for matrix-vector multiplications? I used to create vectors with VecCreate, and it has always worked fine with "standard" matrices (matrices not created with MATNEST str

Re: [petsc-users] How to extract array portions

2016-04-06 Thread Dave May
On 6 April 2016 at 16:20, FRANCAVILLA MATTEO ALESSANDRO wrote: > Fantastic, it definitely solved my problem! Thank you! > > Should I always create the vectors with MatCreateVecs when I use them for > matrix-vector multiplications? I used to create vectors with VecCreate, and > it has always worke

Re: [petsc-users] How to extract array portions

2016-04-06 Thread Dave May
On 6 April 2016 at 14:12, FRANCAVILLA MATTEO ALESSANDRO wrote: > Thanks Dave, that's exactly what I was looking for, and it (partially) > solved my problem. > > The MatMult operation now works fine, unfortunately not for every number > of MPI processes (while the MatMult involving each submatrix

Re: [petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Thanks Dave, that's exactly what I was looking for, and it (partially) solved my problem. The MatMult operation now works fine, unfortunately not for every number of MPI processes (while the MatMult involving each submatrix works fine for any number of processes): matArray(1) = L_discre

Re: [petsc-users] How to extract array portions

2016-04-06 Thread Dave May
On 6 April 2016 at 11:08, FRANCAVILLA MATTEO ALESSANDRO wrote: > Hi, > > I'm trying to set a linear problem with a 2x2 block matrix (say A=[A11 > A12; A21 A22] in matlab notation). Obviously I could generate a single > matrix, but I would like to keep it as a 2x2 block matrix with the 4 blocks >

[petsc-users] How to extract array portions

2016-04-06 Thread FRANCAVILLA MATTEO ALESSANDRO
Hi, I'm trying to set a linear problem with a 2x2 block matrix (say A=[A11 A12; A21 A22] in matlab notation). Obviously I could generate a single matrix, but I would like to keep it as a 2x2 block matrix with the 4 blocks generated and used independently (e.g., because at some point I need to