petsc-3.7.1 2016-05-15
Report Typos and Errors

# VecSetDM

Sets the DM defining the data layout of the vector.

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    PetscErrorCode VecSetDM(Vec v, DM dm)

Not collective Many br

### Input Parameters

| v | - The Vec Many br
| dm | - The DM Many br

Note: This is NOT the same as DMCreateGlobalVector() since it does not change the view methods or perform other customization, but merely sets the DM member. Many br

Many br

### See Also

VecGetDM(), DMGetLocalVector(), DMGetGlobalVector(), DMSetVecType()

Level:intermediate
Location:src/dm/interface/dm.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex65.c.html