# DMFieldSetType
set the `DMField` implementation 
## Synopsis
```
#include "petscdmfield.h" 
#include "petscdmfield.h" 
PetscErrorCode DMFieldSetType(DMField field, DMFieldType type)
```
Collective on field


## Input Parameters

- ***field -*** the `DMField` context
- ***type -*** a known method



## Notes
See "include/petscvec.h" for available methods (for instance)

- ***`DMFIELDDA`    -*** a field defined only by its values at the corners of a `DMDA`
- ***`DMFIELDDS`    -*** a field defined by a discretization over a mesh set with `DMSetField()`
- ***`DMFIELDSHELL` -*** a field defined by arbitrary callbacks





## See Also
 `DMField`, `DMFieldGetType()`, `DMFieldType`,

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/field/interface/dmfield.c.html#DMFieldSetType">src/dm/field/interface/dmfield.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/field/interface/dmfield.c)


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