[petsc-dev] Copy scatter and change block size

Pierre Jolivet pierre.jolivet at enseeiht.fr
Sat Nov 25 12:26:58 CST 2017

OK, so I guess I need to tinker around with VecScatterCreate.
As a follow-up question, is there an easy way to get the “garray” from http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/mpi/mmaij.c.html#line105 <http://www.mcs.anl.gov/petsc/petsc-current/src/mat/impls/aij/mpi/mmaij.c.html#line105> to create the IS I need to feed to VecScatterCreate (after resizing by multiplying its size by bs and by shifting/inserting the proper indices)?
Basically, I want to create the VecScatter for doing MatMult with a MATSHELL similar to a MATMPIBAIJ, and I want to re-use the information generated by the MatSetUpMultiply_MPIAIJ from a previously set up MATMPIAIJ with the same sparsity pattern.


> On 25 Nov 2017, at 4:43 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
>  Pierre,
>    There is not. The block size is baked directly into the scatter data structure so not trivial to change in a copy.
>  Barry
>> On Nov 25, 2017, at 7:41 AM, Pierre Jolivet <pierre.jolivet at enseeiht.fr> wrote:
>> Hello,
>> Given a VecScatter inctx that operates on vectors x and y, I’d like to create a VecScatter inctx_bs with the same pattern, but that operators on vectors x_bs and y_bs with different block sizes than the original x and y (and that are thus of sizes n * bs).
>> Is there an easy way to do this (I’m a VecScatter noob, sorry in advance if this is trivial)?
>> Thank you,
>> Pierre

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171125/cd5cc216/attachment.html>

More information about the petsc-dev mailing list