Mark Adams <[email protected]> writes:

> 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.  

This isn't scalable because it needs O(P) redundant storage to know how
to address the off-process parts.  You shouldn't write new code like
this.  Use local indices.

> 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).  

That won't work unless you're lumping the mass matrix because you need
to be able to address neighbors as you set values for element mass
matrices on the interfaces of the vertex partition.  Make a local to
global mapping and use MatGetLocalSubMatrix().

Attachment: signature.asc
Description: PGP signature

Reply via email to