[petsc-users] MatGetLocalSubMatrix

Hui Zhang mike.hui.zhang at hotmail.com
Sun Feb 17 06:56:24 CST 2013


I want to use MatGetLocalSubMatrix for assembly purpose.  

PetscErrorCode  MatGetLocalSubMatrix(Mat mat,IS isrow,IS iscol,Mat *submat)

I want to get a submat shared by some (not all) of the processes that share the mat.

Some questions.

1.  Shall I create isrow and iscol shared by the processes that will share the submat? 

2.  The manual says the submat supports MatSetValuesLocal.  Is the LocalToGlobalMapping already defined for submat, or I need to define it by myself?

    If it is already defined, is it derived from the ltog of the mat such that for this processor the local numbering of the submat are in the same order

    as the local numbering for the mat?




More information about the petsc-users mailing list