# MatFDColoringSetType
Sets the approach for computing the finite difference parameter 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatFDColoringSetType(MatFDColoring matfd, MatMFFDType type)
```
Collective on matfd


## Input Parameters

- ***coloring -*** the coloring context
- ***type -*** either `MATMFFD_WP` or `MATMFFD_DS`



## Options Database Keys

- ***-mat_fd_type -*** "wp" or "ds"



## Note
It is goofy that the argument type is `MatMFFDType` since the `MatFDColoring` actually computes the matrix entries
but the process of computing the entries is the same as as with the `MATMFFD` operation so we should reuse the names instead of
introducing another one.




## See Also
 `MatFDColoring`, `MatFDColoringCreate()`, `MatFDColoringView()`, `MatFDColoringSetParameters()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/matfd/fdmatrix.c.html#MatFDColoringSetType">src/mat/matfd/fdmatrix.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex14.c.html">src/snes/tutorials/ex14.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/matfd/fdmatrix.c)


[Index of all MatFD routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
