# DMMoabSetFieldNames
Sets the number of fields and their names to be managed by the DM 
## Synopsis
```
#include "petscdmmoab.h"   
PetscErrorCode DMMoabSetFieldNames(DM dm, PetscInt numFields, const char *fields[])
```
Not Collective


## Input Parameters

- ***dm     -*** the discretization manager object
- ***numFields -*** the total number of fields
- ***fields -*** the array containing the names of each field (component); Can be NULL.





## See Also
 `DMMoabGetFieldName()`, `DMMoabSetFieldName()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/moab/dmmbfield.cxx.html#DMMoabSetFieldNames">src/dm/impls/moab/dmmbfield.cxx</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex35.cxx.html">src/ksp/ksp/tutorials/ex35.cxx.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex36.cxx.html">src/ksp/ksp/tutorials/ex36.cxx.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex35.cxx.html">src/ts/tutorials/ex35.cxx.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/moab/dmmbfield.cxx)


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