:orphan:
# DMPlexCreateRigidBody
For the default global section, create rigid body modes by function space interpolation 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateRigidBody(DM dm, PetscInt field, MatNullSpace *sp)
```
Collective


## Input Parameters

- ***dm -*** the `DM`
- ***field -*** The field number for the rigid body space, or 0 for the default



## Output Parameter

- ***sp -*** the null space





## Note
This is necessary to provide a suitable coarse space for algebraic multigrid


## See Also
 [](ch_unstructured), `DM`, `DMPLEX`, `MatNullSpaceCreate()`, `PCGAMG`

## Level
advanced

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex17.c.html">src/snes/tutorials/ex17.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex56.c.html">src/snes/tutorials/ex56.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex77.c.html">src/snes/tutorials/ex77.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/tutorials/ex53.c.html">src/ts/tutorials/ex53.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexfem.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)  
