DMGetNamedLocalVector — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# DMGetNamedLocalVector

get access to a named, persistent local vector

## Synopsis

    #include "petscdm.h"
    PetscErrorCode DMGetNamedLocalVector(DM dm, const char *name, Vec *X)

Not Collective

## Input Parameters

- dm - `DM` to hold named vectors

- name - unique name for `X`

## Output Parameter

- X - named `Vec`

## Note

If a `Vec` with the given name does not exist, it is created.

## See Also

`DM`, `DMGetNamedGlobalVector()`, `DMRestoreNamedLocalVector()`, `DMHasNamedLocalVector()`, `DMClearNamedLocalVectors()`, `DMGetGlobalVector()`, `DMGetLocalVector()`

## Level

developer

## Location

src/dm/interface/dmget.c

## Examples

src/ts/tutorials/ex29.c
src/ts/tutorials/ex30.c

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