DMDASetFieldNames — PETSc 3.24.5 documentation

Skip to main content
`Ctrl`+`K`

# DMDASetFieldNames

Sets the name of each component in the vector associated with the `DMDA`

## Synopsis

    #include "petscdmda.h"
    PetscErrorCode DMDASetFieldNames(DM da, const char *const names[])

Logically Collective; names must contain a common value; No Fortran Support

## Input Parameters

- da - the `DMDA` object

- names - the names of the components, final string must be `NULL`, must have the same number of entries as the dof used in creating the `DMDA`

## Note

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

## Fortran Note

Use `DMDASetFieldName()`

## See Also

DMDA - Creating vectors for structured grids, `DM`, `DMDA`, `DMDAGetFieldName()`, `DMDASetCoordinateName()`, `DMDAGetCoordinateName()`, `DMDASetFieldName()`, `DMSetUp()`

## Level

intermediate

## Location

src/dm/impls/da/dacorn.c

## Examples

src/ts/tutorials/extchemfield.c

Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages