# PetscDSGetComponents
Returns the number of components for each field on an evaluation point 
## Synopsis
```
#include "petscds.h" 
PetscErrorCode PetscDSGetComponents(PetscDS prob, PetscInt *components[])
```
Not collective


## Input Parameter

- ***prob -*** The `PetscDS` object



## Output Parameter

- ***components -*** The number of components





## See Also
 `PetscDS`, `PetscDSGetComponentOffsets()`, `PetscDSGetNumFields()`, `PetscDSCreate()`

## Level
beginner

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


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


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