:orphan:
# PETSCSPACESUM
"sum" - A `PetscSpace` object that encapsulates a sum of subspaces. 


## Note
That sum can either be direct or a concatenation. For example if A and B are spaces each with 2 components,
the direct sum of A and B will also have 2 components while the concatenated sum will have 4 components. In both cases A and B must be defined over the
same number of variables.


## See Also
 `PetscSpace`, `PetscSpaceType`, `PetscSpaceCreate()`, `PetscSpaceSetType()`, `PetscSpaceSumGetNumSubspaces()`, `PetscSpaceSumSetNumSubspaces()`,
`PetscSpaceSumGetConcatenate()`, `PetscSpaceSumSetConcatenate()`

## Level
intermediate

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


---
[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)  
