# SlicedGetMatrix

Creates a matrix with the correct parallel layout required for computing the Jacobian on a function defined using the informatin in Sliced.

### Synopsis

    #include "petscda.h"
    #include "petscmat.h"
    PetscErrorCode PETSCDM_DLLEXPORT SlicedGetMatrix(Sliced slice, MatType mtype,Mat *J)

Collective on Sliced

### Input Parameter

| slice | - the slice object
| mtype | - Supported types are MATSEQAIJ, MATMPIAIJ, MATSEQBAIJ, MATMPIBAIJ, MATSEQSBAIJ, MATMPISBAIJ, or any type which inherits from one of these (such as MATAIJ, MATLUSOL, etc.).

### Output Parameters

J -matrix with the correct nonzero preallocation (obviously without the correct Jacobian values)

Notes: This properly preallocates the number of nonzeros in the sparse matrix so you do not need to do it yourself.

### See Also

ISColoringView(), ISColoringGetIS(), MatFDColoringCreate(), DASetBlockFills()

Level:advanced
Location:src/dm/da/utils/sliced.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages