# DMPlexCreateSphereMesh
Creates a mesh on the d-dimensional sphere, S^d. 
## Synopsis
```
#include "petscdmplex.h"   
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateSphereMesh(MPI_Comm comm, PetscInt dim, PetscBool simplex, PetscReal R, DM *dm)
```
Collective


## Input Parameters

- ***comm    -*** The communicator for the `DM` object
- ***dim     -*** The dimension
- ***simplex -*** Use simplices, or tensor product cells
- ***R       -*** The radius



## Output Parameter

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





## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexCreateBallMesh()`, `DMPlexCreateBoxMesh()`, `DMSetType()`, `DMCreate()`

## Level
beginner

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/plexcreate.c.html#DMPlexCreateSphereMesh_Internal">DMPlexCreateSphereMesh_Internal in src/dm/impls/plex/plexcreate.c</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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
