> On 25 Nov 2017, at 7:49 PM, Stefano Zampini <stefano.zamp...@gmail.com> wrote:
> 
> Pierre,
> 
> If you have access to the indices used to create the "unblocked" vecscatter, 
> you can then call ISCreateBlock and obtain the vecscatter you want.

OK, that’s a better start.

> To obtain the garray,   MatMPIAIJGetSeqAIJ

Ah! I Ctrl+F’d the manual, but forgot to grep the sources.

Thank you very much,
Pierre

>> On Nov 25, 2017, at 9:26 PM, Pierre Jolivet <pierre.joli...@enseeiht.fr 
>> <mailto:pierre.joli...@enseeiht.fr>> wrote:
>> 
>> 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.
>> 
>> Thanks,
>> Pierre
>> 
>>> On 25 Nov 2017, at 4:43 PM, Smith, Barry F. <bsm...@mcs.anl.gov 
>>> <mailto:bsm...@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.joli...@enseeiht.fr 
>>>> <mailto:pierre.joli...@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
>>> 
>> 
> 

Reply via email to