MatProductCreateWithMat#

Set a given matrix to have its values computed via matrix-matrix operations on other matrices.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatProductCreateWithMat(Mat A, Mat B, Mat C, Mat D)

Collective

Input Parameters#

  • A - the first matrix

  • B - the second matrix

  • C - the third matrix (optional, use NULL if not needed)

  • D - the matrix whose values are to be computed via a matrix-matrix product operation

Notes#

Use MatProductCreate() if the matrix you wish computed D does not exist

See MatProductCreate() for details on the usage of the matrix-matrix product operations

Any product data currently attached to D will be freed

See Also#

Matrices, MatProduct, Mat, MatProductType, MatProductSetType(), MatProductAlgorithm, MatProductSetAlgorithm, MatProductCreate(), MatProductClear()

Level#

intermediate

Location#

src/mat/interface/matproduct.c

Examples#

src/mat/tests/ex109.c
src/mat/tests/ex195.c
src/mat/tests/ex237.c
src/mat/tests/ex69.c
src/mat/tests/ex70.c
src/ksp/ksp/tests/ex62f.F90
src/ksp/ksp/tests/ex90.c


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