# PetscFECreateDefault
Create a PetscFE for basic FEM computation 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscFECreateDefault(MPI_Comm comm, PetscInt dim, PetscInt Nc, PetscBool isSimplex, const char prefix[], 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
- ***prefix    -*** The options prefix, or NULL
- ***qorder    -*** The quadrature order or PETSC_DETERMINE to use PetscSpace polynomial degree



## Output Parameter

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





## Note
Each subobject is SetFromOption() during creation, so that the object may be customized from the command line, using the prefix specified above. See the links below for the particular options available.


## See Also
 `PetscFECreateLagrange()`, `PetscFECreateByCell()`, `PetscSpaceSetFromOptions()`, `PetscDualSpaceSetFromOptions()`, `PetscFESetFromOptions()`, `PetscFECreate()`, `PetscSpaceCreate()`, `PetscDualSpaceCreate()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/fe/interface/fe.c.html#PetscFECreateDefault">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.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/swarm/tutorials/ex1.c.html">src/dm/impls/swarm/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c.html">src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/field/tutorials/ex1.c.html">src/dm/field/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex12.c.html">src/snes/tutorials/ex12.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex13.c.html">src/snes/tutorials/ex13.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex17.c.html">src/snes/tutorials/ex17.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex20.c.html">src/snes/tutorials/ex20.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex23.c.html">src/snes/tutorials/ex23.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex24.c.html">src/snes/tutorials/ex24.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex26.c.html">src/snes/tutorials/ex26.c.html</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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
