:orphan:
# PetscFECreateLagrange
Create a `PetscFE` for the basic Lagrange space of degree k 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscFECreateLagrange(MPI_Comm comm, PetscInt dim, PetscInt Nc, PetscBool isSimplex, PetscInt k, PetscInt qorder, PetscFE *fem)
```
Collective


## Input Parameters

- ***comm      -*** The MPI comm
- ***dim       -*** The spatial dimension
- ***Nc        -*** The number of components
- ***isSimplex -*** Flag for simplex reference cell, otherwise its a tensor product
- ***k         -*** The degree k of the space
- ***qorder    -*** The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree



## Output Parameter

- ***fem       -*** The `PetscFE` object





## Note
For simplices, this element is the space of maximum polynomial degree k, otherwise it is a tensor product of 1D polynomials, each with maximal degree k.


## See Also
 `PetscFECreateLagrangeByCell()`, `PetscFECreateDefault()`, `PetscFECreateByCell()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/fe/interface/fe.c.html#PetscFECreateLagrange">src/dm/dt/fe/interface/fe.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex8.c.html">src/dm/impls/plex/tutorials/ex8.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/tutorials/ex1f90.F90.html">src/dm/impls/swarm/tutorials/ex1f90.F90</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/fe/interface/fe.c)


[Index of all FE routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
