PetscErrorCode MatFDColoringSetValues(Mat J,MatFDColoring coloring,const PetscScalar *y)Collective on J
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 AD code
The code will be slightly faster if MatFDColoringSetBlockSize(coloring,PETSC_DEFAULT,nc); is called immediately after creating the coloring