petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatMatMultSymbolic

Performs construction, preallocation, and computes the ij structure of the matrix-matrix product C=A*B. Call this routine before calling MatMatMultNumeric().

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatMatMultSymbolic(Mat A,Mat B,PetscReal fill,Mat *C)

Neighbor-wise Collective on Mat Many br

### Input Parameters

| A | - the left matrix Many br
| B | - the right matrix Many br
| fill | - expected fill as ratio of nnz(C)/(nnz(A) + nnz(B)), use PETSC_DEFAULT if you do not have a good estimate, Many brif C is a dense matrix this is irrelevent Many br

### Output Parameters

C -the product matrix Many br

### Notes

Unless scall is MAT_REUSE_MATRIX C will be created. Many br

To determine the correct fill value, run with -info and search for the string "Fill ratio" to see the value Many bractually needed. Many br

This routine is currently implemented for Many br- pairs of AIJ matrices and classes which inherit from AIJ, C will be of type AIJ Many br- pairs of AIJ (A) and Dense (B) matrix, C will be of type Dense. Many br- pairs of Dense (A) and AIJ (B) matrix, C will be of type Dense. Many br

Many br

Developers Note: There are ways to estimate the number of nonzeros in the resulting product, see for example, http://arxiv.org/abs/1006.4173 Many brWe should incorporate them into PETSc. Many br

### See Also

MatMatMult(), MatMatMultNumeric()

Level:intermediate
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/tao/pde_constrained/examples/tutorials/elliptic.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html