> On Jul 18, 2015, at 12:49 PM, Mark Adams <[email protected]> wrote:
> 
> I have a 4x4 block matrix, in one big AIJ matrix.  I use (global) ISs to 
> address individual fields.  I have a mass matrix for one field.  I would like 
> to add a scaled mass matrix to one field at a time.  
> 
> MatGetLocalSubMatrix looks like what I want but it takes local indices.  My 
> ISs are global.  It seems like I should be able to do this without making a 
> local IS (shift the IS by the first equation index for the process).  Am I 
> missing something?

  I think there also needs to be a MatGetGlobalSubMatrix(), this would be a 
"smart" matrix that takes global indices. So for example if you have a 
DMComposite and in it two DMDA then you should be able to pull out either the 
matrices associated with the DMDA and index into them with global indices just 
like you had gotten the matrix directly from DMDACreateMatrix().

  Barry


> 
> Mark

Reply via email to