MatISGetLocalMat#

Gets the local matrix stored inside a MATIS matrix.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatISGetLocalMat(Mat mat, Mat *local)

Not Collective.

Input Parameter#

  • mat - the matrix

Output Parameter#

  • local - the local matrix

Notes#

This can be called if you have precomputed the nonzero structure of the matrix and want to provide it to the inner matrix object to improve the performance of the MatSetValues() operation.

Call MatISRestoreLocalMat() when finished with the local matrix. If its entries or nonzero structure were changed, call MatAssemblyBegin() and MatAssemblyEnd() on mat afterward, even if the local matrix is already assembled. All processes sharing mat must participate in this assembly, including those that did not change their local matrix.

See Also#

Matrices, Mat, MATIS, MatISRestoreLocalMat()

Level#

intermediate

Location#

src/mat/impls/is/matis.c

Examples#

src/mat/tests/ex321.c
src/mat/tests/ex23.c
src/ksp/ksp/tutorials/ex59.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/pc/impls/bddc/tests/ex2.c

Implementations#

MatISGetLocalMat_IS() in src/mat/impls/is/matis.c


Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages