MatCreateGraph#

create a scalar matrix (that is a matrix with one vertex for each block vertex in the original matrix), for use in graph algorithms and possibly removes small values from the graph structure.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatCreateGraph(Mat A, PetscBool sym, PetscBool scale, PetscReal filter, Mat *graph)

Collective

Input Parameters#

  • A - the matrix

  • sym - PETSC_TRUE indicates that the graph should be symmetrized

  • scale - PETSC_TRUE indicates that the graph edge weights should be symmetrically scaled with the diagonal entry

  • filter - filter value - < 0: does nothing; == 0: removes only 0.0 entries; otherwise: removes entries with abs(entries) <= value

Output Parameter#

  • graph - the resulting graph

See Also#

Matrices, Mat, MatCreate(), PCGAMG

Level#

advanced

Location#

src/mat/interface/matrix.c


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