Skip to main content
`Ctrl`+`K`

# DMPlexIsSimplex

Is the first cell in this mesh a simplex?

## Synopsis

    #include "petscdmplex.h"
    PetscErrorCode DMPlexIsSimplex(DM dm, PetscBool *simplex)

## Input Parameter

- dm - The `DMPLEX` object

## Output Parameter

- simplex - Flag checking for a simplex

## Note

This just gives the first range of cells found. If the mesh has several cell types, it will only give the first. If the mesh has no cells, this returns `PETSC_FALSE`.

## See Also

DMPlex: Unstructured Grids, `DM`, `DMPLEX`, `DMPlexGetSimplexOrBoxCells()`, `DMPlexGetCellType()`, `DMPlexGetHeightStratum()`, `DMPolytopeTypeGetNumVertices()`

## Level

intermediate

## Location

src/dm/impls/plex/plex.c

## Examples

src/snes/tutorials/ex8.c
src/snes/tutorials/ex71.c
src/snes/tutorials/ex23.c
src/snes/tutorials/ex76.c
src/snes/tutorials/ex36.c
src/snes/tutorials/ex62.c
src/snes/tutorials/ex77.c
src/snes/tutorials/ex12.c
src/dm/field/tutorials/ex1.c
src/snes/tutorials/ex64.c

Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages