MatProductClear — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# MatProductClear

Clears from the matrix any internal data structures related to the computation of the values of the matrix from matrix-matrix product operations

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatProductClear(Mat mat)

Collective

## Input Parameter

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

## Options Database Key

- -mat_product_clear - Clear intermediate data structures after `MatProductNumeric()` has been called

## Notes

This function should be called to remove any intermediate data used to compute the matrix to free up memory.

After having called this function, matrix-matrix product operations can no longer be used on `mat`

## See Also

Matrices, `MatProduct`, `Mat`, `MatProductCreate()`

## Level

intermediate

## Location

src/mat/interface/matproduct.c

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