MatProductSetFill — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# MatProductSetFill

Set an expected fill of the matrix whose values are computed via a matrix-matrix product operation

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatProductSetFill(Mat mat, PetscReal fill)

Collective

## Input Parameters

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

- fill - expected fill as ratio of nnz(mat)/(nnz(A) + nnz(B) + nnz(C)); use `PETSC_DETERMINE` or `PETSC_CURRENT` if you do not have a good estimate. If the product is a dense matrix, this value is not used.

## Notes

Use `fill` of `PETSC_DETERMINE` to use the default value.

The deprecated `PETSC_DEFAULT` is also supported to mean use the current value.

## See Also

Matrices, `MatProduct`, `PETSC_DETERMINE`, `Mat`, `MatProductSetFromOptions()`, `MatProductSetType()`, `MatProductSetAlgorithm()`, `MatProductCreate()`

## Level

intermediate

## Location

src/mat/interface/matproduct.c

## Examples

src/tao/pde_constrained/tutorials/parabolic.c

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