:orphan:
# PetscSpaceSumGetNumSubspaces
Get the number of spaces in the sum space
## Synopsis
```
#include "petscfe.h"
PetscErrorCode PetscSpaceSumGetNumSubspaces(PetscSpace sp, PetscInt *numSumSpaces)
```
## Input Parameter
- ***sp -*** the function space object
## Output Parameter
- ***numSumSpaces -*** the number of spaces
## Note
The name NumSubspaces is slightly misleading because it is actually getting the number of defining spaces of the sum, not a number of Subspaces of it
## See Also
`PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumSetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`
## Level
intermediate
## Location
src/dm/dt/space/impls/sum/spacesum.c
## Implementations
PetscSpaceSumGetNumSubspaces_Sum in src/dm/dt/space/impls/sum/spacesum.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/dt/space/impls/sum/spacesum.c)
[Index of all SPACE routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)