Skip to main content
`Ctrl`+`K`

# 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

DM Basics, `DM`, `PetscFECreateByCell()`, `DMAddField()`, `DMCreateDS()`, `DMGetCellDS()`, `DMGetRegionDS()`

## Level

intermediate

## Location

src/dm/interface/dm.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages