:orphan:
# PetscSpaceSumSetSubspace
Set a space in the sum space 
## Synopsis
```
#include "petscfe.h" 
PetscErrorCode PetscSpaceSumSetSubspace(PetscSpace sp, PetscInt s, PetscSpace subsp)
```

## Input Parameters

- ***sp    -*** the function space object
- ***s     -*** The space number
- ***subsp -*** the number of spaces





## Note
The name SetSubspace is slightly misleading because it is actually setting one of the defining spaces of the sum, not a Subspace of it


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

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/dt/space/impls/sum/spacesum.c.html#PetscSpaceSumSetSubspace">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#PetscSpaceSumSetSubspace_Sum">PetscSpaceSumSetSubspace_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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
