# DMMoabCreateBoxMesh
Creates a mesh on the tensor product (box) of intervals with genCtx specified bounds. 
## Synopsis
```
#include "petscdmmoab.h"   
PetscErrorCode DMMoabCreateBoxMesh(MPI_Comm comm, PetscInt dim, PetscBool useSimplex, const PetscReal *bounds, PetscInt nele, PetscInt nghost, DM *dm)
```
Collective


## Input Parameters

- ***comm -*** The communicator for the DM object
- ***dim -*** The spatial dimension
- ***bounds -*** The bounds of the box specified with [x-left, x-right, y-bottom, y-top, z-bottom, z-top] depending on the spatial dimension
- ***nele -*** The number of discrete elements in each direction
- ***user_nghost -*** The number of ghosted layers needed in the partitioned mesh



## Output Parameter

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





## See Also
 `DMSetType()`, `DMCreate()`, `DMMoabLoadFromFile()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/moab/dmmbutil.cxx.html#DMMoabCreateBoxMesh">src/dm/impls/moab/dmmbutil.cxx</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex35.cxx.html">src/ksp/ksp/tutorials/ex35.cxx.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex36.cxx.html">src/ksp/ksp/tutorials/ex36.cxx.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex35.cxx.html">src/ts/tutorials/ex35.cxx.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/moab/dmmbutil.cxx)


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