# PetscSpaceSumSetNumSubspaces
Set the number of spaces in the sum 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscSpaceSumSetNumSubspaces(PetscSpace sp, PetscInt numSumSpaces)
```

## Input Parameters

- ***sp  -*** the function space object
- ***numSumSpaces -*** the number of spaces





## See Also
 `PETSCSPACESUM`, `PetscSpace`, `PetscSpaceSumGetNumSubspaces()`, `PetscSpaceSetDegree()`, `PetscSpaceSetNumVariables()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/sum/spacesum.c.html#PetscSpaceSumSetNumSubspaces">src/dm/dt/space/impls/sum/spacesum.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/sum/spacesum.c.html#PetscSpaceSumSetNumSubspaces_Sum">PetscSpaceSumSetNumSubspaces_Sum in src/dm/dt/space/impls/sum/spacesum.c</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
