petsc-3.14.6 2021-03-30
Report Typos and Errors

MatFDColoringSetValues

takes a matrix in compressed color format and enters the matrix into a PETSc Mat

Synopsis

PetscErrorCode  MatFDColoringSetValues(Mat J,MatFDColoring coloring,const PetscScalar *y)
Collective on J

Input Parameters

J - the sparse matrix
coloring - created with MatFDColoringCreate() and a local coloring
y - column major storage of matrix values with one color of values per column, the number of rows of y should match the number of local rows of J and the number of columns is the number of colors.

Notes: the matrix in compressed color format may come from an Automatic Differentiation code

The code will be slightly faster if MatFDColoringSetBlockSize(coloring,PETSC_DEFAULT,nc); is called immediately after creating the coloring

See Also

MatFDColoringCreate(), ISColoring, ISColoringCreate(), ISColoringSetType(), IS_COLORING_LOCAL, MatFDColoringSetBlockSize()

Level

intermediate

Location

src/mat/impls/aij/mpi/fdmpiaij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages