# DMCreateFEDefault
Create a `PetscFE` based on the celltype for the mesh 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMCreateFEDefault(DM dm, PetscInt Nc, const char prefix[], PetscInt qorder, PetscFE *fem)
```
Not collective


## Input Parameters

- ***dm     -*** The `DM`
- ***Nc     -*** The number of components for the field
- ***prefix -*** The options prefix for the output `PetscFE`, or NULL
- ***qorder -*** The quadrature order or `PETSC_DETERMINE` to use `PetscSpace` polynomial degree



## Output Parameter

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



## Note
This is a convenience method that just calls `PetscFECreateByCell()` underneath.




## See Also
 `PetscFECreateByCell()`, `DMAddField()`, `DMCreateDS()`, `DMGetCellDS()`, `DMGetRegionDS()`

## Level
intermediate

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


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


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