# DMPlexCreateBasisRotation
Create an internal transformation from the global basis, used to specify boundary conditions and global solutions, to a local basis, appropriate for discretization integrals and assembly. 
## Synopsis
```
#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateBasisRotation(DM dm, PetscReal alpha, PetscReal beta, PetscReal gamma)
```

## Input Parameters

- ***dm    -*** The `DM`
- ***alpha -*** The first Euler angle, and in 2D the only one
- ***beta  -*** The second Euler angle
- ***gamma -*** The third Euler angle





## Note
Following https://en.wikipedia.org/wiki/Euler_angles, we will specify Euler angles by extrinsic rotations, meaning that
we rotate with respect to a fixed initial coordinate system, the local basis (x-y-z). The global basis (X-Y-Z) is reached as follows
```none
   The XYZ system rotates about the z axis by alpha. The X axis is now at angle alpha with respect to the x axis.
   The XYZ system rotates again about the x axis by beta. The Z axis is now at angle beta with respect to the z axis.
   The XYZ system rotates a third time about the z axis by gamma.
```



## See Also
 [](chapter_unstructured), `DM`, `DMPLEX`, `DMPlexGlobalToLocalBasis()`, `DMPlexLocalToGlobalBasis()`

## Level
developer

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex71.c.html">src/snes/tutorials/ex71.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex76.c.html">src/snes/tutorials/ex76.c.html</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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
