:orphan: # DMDASetFieldName Sets the names of individual field components in multicomponent vectors associated with a `DMDA`. ## Synopsis ``` #include "petscdmda.h" PetscErrorCode DMDASetFieldName(DM da, PetscInt nf, const char name[]) ``` Logically Collective; name must 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` - ***names -*** the name of the field (component) ## Note It must be called after having called `DMSetUp()`. ## See Also `DM`, `DMDA`, `DMDAGetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMDASetFieldNames()`, `DMSetUp()` ## Level intermediate ## Location src/dm/impls/da/dacorn.c ## Examples src/dm/tutorials/ex7.c
src/ksp/ksp/tutorials/ex29.c
src/ksp/ksp/tutorials/ex42.c
src/ksp/ksp/tutorials/ex43.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex70.c
src/ksp/ksp/tutorials/ex73.c
src/snes/tutorials/ex16.c
src/snes/tutorials/ex19.c
src/snes/tutorials/ex21.c
src/snes/tutorials/ex22.c
--- [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)