# DASetGetMatrix

Sets the routine used by the DA to allocate a matrix.

### Synopsis

    #include "petscda.h"
    PetscErrorCode PETSCDM_DLLEXPORT DASetGetMatrix(DA da,PetscErrorCode (*f)(DA, MatType,Mat*))

Collective on DA

### Input Parameters

| da | - the DA object
| f | - the function that allocates the matrix for that specific DA

Notes: See DASetBlockFills() that provides a simple way to provide the nonzero structure for the diagonal and off-diagonal blocks of the matrix

### See Also

DAGetMatrix(), DASetBlockFills()

Level:developer
Location:src/dm/da/src/da2.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages