MatNestSetSubMats#

Sets the nested submatrices in a MATNEST

Synopsis#

#include "petscmat.h"   
PetscErrorCode MatNestSetSubMats(Mat A, PetscInt nr, const IS is_row[], PetscInt nc, const IS is_col[], const Mat a[])

Collective

Input Parameters#

  • A - MATNEST matrix

  • nr - number of nested row blocks

  • is_row - index sets for each nested row block, or NULL to make contiguous

  • nc - number of nested column blocks

  • is_col - index sets for each nested column block, or NULL to make contiguous

  • a - array of nr*nc submatrices, or NULL

Notes#

This always resets any block matrix information previously set. Pass NULL in the corresponding entry of a for an empty block.

In both C and Fortran, a must be a row-major order array containing the matrices. See MatCreateNest() for an example.

See Also#

Matrices, Mat, MATNEST, MatCreateNest(), MatNestSetSubMat(), MatNestGetSubMat(), MatNestGetSubMats()

Level#

advanced

Location#

src/mat/impls/nest/matnest.c

Examples#

src/ksp/ksp/tutorials/ex85.c
src/ksp/ksp/tutorials/ex19.c

Implementations#

MatNestSetSubMats_Nest() in src/mat/impls/nest/matnest.c


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