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

# DMConvert

Converts a DM to another DM, either of the same or different type.

### Synopsis

    #include "petscdm.h"
    #include "petscdmlabel.h"
    PetscErrorCode DMConvert(DM dm, DMType newtype, DM *M)

Collective on DM Many br

### Input Parameters

| dm | - the DM Many br
| newtype | - new DM type (use "same" for the same type) Many br

### Output Parameter

M -pointer to new DM Many br

### Notes

Cannot be used to convert a sequential DM to parallel or parallel to sequential, Many brthe MPI communicator of the generated DM is always the same as the communicator Many brof the input DM. Many br

Many br

### See Also

DMCreate()

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/snes/examples/tutorials/ex12.c.html
src/ts/examples/tutorials/ex11.c.html