:orphan:
# DMDAGetFieldName
Gets the names of individual field components in multicomponent vectors associated with a `DMDA`. 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAGetFieldName(DM da, PetscInt nf, const char **name)
```
Not Collective; name will contain a common value


## Input Parameters

- ***da -*** the distributed array
- ***nf -*** field number for the `DMDA` (0, 1, ... dof-1), where dof indicates the
number of degrees of freedom per node within the `DMDA`



## Output Parameter

- ***names -*** the name of the field (component)





## Note
It must be called after having called `DMSetUp()`.


## See Also
 `DM`, `DMDA`, `DMDASetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMSetUp()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/da/dacorn.c.html#DMDAGetFieldName">src/dm/impls/da/dacorn.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex42.c.html">src/ksp/ksp/tutorials/ex42.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex43.c.html">src/ksp/ksp/tutorials/ex43.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex49.c.html">src/ksp/ksp/tutorials/ex49.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex14.c.html">src/ts/tutorials/ex14.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/da/dacorn.c)


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