# PetscDualSpaceSetType
Builds a particular `PetscDualSpace` based on its `PetscDualSpaceType` 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscDualSpaceSetType(PetscDualSpace sp, PetscDualSpaceType name)
```
Collective on sp


## Input Parameters

- ***sp   -*** The `PetscDualSpace` object
- ***name -*** The kind of space



## Options Database Key

- ***-petscdualspace_type <type> -*** Sets the PetscDualSpace type; use -help for a list of available types





## See Also
 `PetscDualSpace`, `PetscDualSpaceType`, `PetscDualSpaceGetType()`, `PetscDualSpaceCreate()`

## Level
intermediate

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/dualspace/impls/lagrange/tutorials/ex1.c.html">src/dm/dt/dualspace/impls/lagrange/tutorials/ex1.c.html</A><BR>


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


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