:orphan:
# DMPlexCreateRigidBodies
For the default global section, create rigid body modes by function space interpolation 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateRigidBodies(DM dm, PetscInt nb, DMLabel label, const PetscInt nids[], const PetscInt ids[], MatNullSpace *sp)
```
Collective


## Input Parameters

- ***dm    -*** the `DM`
- ***nb    -*** The number of bodies
- ***label -*** The `DMLabel` marking each domain
- ***nids  -*** The number of ids per body
- ***ids   -*** An array of the label ids in sequence for each domain



## 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()`

## Level
advanced

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


---
[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)  
