MatKAIJSetB#

Set the MATAIJ matrix B describing the second Kronecker term \(B \otimes S\) of the MATKAIJ matrix

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatKAIJSetB(Mat A, Mat B)

Logically Collective

Input Parameters#

  • A - the MATKAIJ matrix

  • B - the MATAIJ matrix, or NULL to make the second term \(I_n \otimes S\) (the default MATKAIJ behavior)

Notes#

This function increases the reference count on the MATAIJ matrix, so the user is free to destroy the matrix if it is not needed.

B must share the row and column layout of the MATAIJ matrix set with MatKAIJSetA(), and in the MATMPIKAIJ case it must also share its off-diagonal ghost columns, for example by being assembled from the same DM; both requirements are enforced.

A common use for B is a mass matrix from a differential-algebraic equation; see MatCreateKAIJAB().

See Also#

Matrices, Mat, MATKAIJ, MatCreateKAIJAB(), MatKAIJGetB(), MatKAIJSetA(), MatKAIJSetS()

Level#

advanced

Location#

src/mat/impls/kaij/kaij.c

Examples#

src/mat/tests/ex277.c


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