# PetscSpaceGetHeightSubspace
Get the subset of the primal space basis that is supported on a mesh point of a given height. 
## Synopsis
```
#include "petscfe.h"  
PetscErrorCode PetscSpaceGetHeightSubspace(PetscSpace sp, PetscInt height, PetscSpace *subsp)
```
If the space is not defined on mesh points of the given height (e.g. if the space is discontinuous and
pointwise values are not defined on the element boundaries), or if the implementation of PetscSpace does not
support extracting subspaces, then NULL is returned.

This does not increment the reference count on the returned space, and the user should not destroy it.

Not collective


## Input Parameters

- ***sp -*** the PetscSpace object
- ***height -*** the height of the mesh point for which the subspace is desired



## Output Parameter

- ***subsp -*** the subspace





## See Also
 `PetscDualSpaceGetHeightSubspace()`, `PetscSpace`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/poly/spacepoly.c.html#PetscSpaceGetHeightSubspace_Polynomial">PetscSpaceGetHeightSubspace_Polynomial in src/dm/dt/space/impls/poly/spacepoly.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/ptrimmed/spaceptrimmed.c.html#PetscSpaceGetHeightSubspace_Ptrimmed">PetscSpaceGetHeightSubspace_Ptrimmed in src/dm/dt/space/impls/ptrimmed/spaceptrimmed.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/sum/spacesum.c.html#PetscSpaceGetHeightSubspace_Sum">PetscSpaceGetHeightSubspace_Sum in src/dm/dt/space/impls/sum/spacesum.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/tensor/spacetensor.c.html#PetscSpaceGetHeightSubspace_Tensor">PetscSpaceGetHeightSubspace_Tensor in src/dm/dt/space/impls/tensor/spacetensor.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/wxy/spacewxy.c.html#PetscSpaceGetHeightSubspace_WXY">PetscSpaceGetHeightSubspace_WXY in src/dm/dt/space/impls/wxy/spacewxy.c</A><BR>


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


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