:orphan:
# DMPlexCreateDoublet
Creates a mesh of two cells of the specified type, optionally with later refinement. 
## Synopsis
```
#include "petscdmplex.h"   
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateDoublet(MPI_Comm comm, PetscInt dim, PetscBool simplex, PetscBool interpolate, PetscReal refinementLimit, DM *newdm)
```
Collective


## Input Parameters

- ***comm -*** The communicator for the `DM` object
- ***dim -*** The spatial dimension
- ***simplex -*** Flag for simplicial cells, otherwise they are tensor product cells
- ***interpolate -*** Flag to create intermediate mesh pieces (edges, faces)
- ***refinementLimit -*** A nonzero number indicates the largest admissible volume for a refined cell



## Output Parameter

- ***dm -*** The `DM` object





## See Also
 [](ch_unstructured), `DM`, `DMPLEX`, `DMSetType()`, `DMCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexcreate.c.html#DMPlexCreateDoublet">src/dm/impls/plex/plexcreate.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex4f90.F90.html">src/dm/impls/plex/tutorials/ex4f90.F90</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexcreate.c)


[Index of all DMPlex routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
