:orphan:
# PetscObjectComposedDataGetScalar
retrieve `PetscScalar` data attached to a `PetscObject` that was set with `PetscObjectComposedDataSetScalar()` 
## Synopsis
```
#include "petsc/private/petscimpl.h"
PetscErrorCode PetscObjectComposedDataGetScalar(PetscObject obj, PetscInt id, PetscScalar data, PetscBool flag)
```
Not Collective


## Input Parameters

- ***obj -*** the object from which data is to be retrieved
- ***id -*** the identifier for the data



## Output Parameters

- ***data -*** the data to be retrieved, a `PetscScalar`
- ***flag -*** `PETSC_TRUE` if the data item exists and is valid, `PETSC_FALSE` otherwise





## Note
The `data` and `flag` variables are inlined, so they are not pointers.


## See Also
 `PetscObjectComposedDataSetInt()`, `PetscObjectComposedDataSetReal()`, `PetscObjectComposedDataGetReal()`, `PetscObjectComposedDataSetIntstar()`,
`PetscObjectComposedDataSetIntstar()`, `PetscObjectComposedDataGetInt()`, `PetscObject`,
`PetscObjectCompose()`, `PetscObjectQuery()`, `PetscObjectComposedDataSetRealstar()`, `PetscObjectComposedDataSetScalar()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petsc/private/petscimpl.h.html#PetscObjectComposedDataGetScalar">include/petsc/private/petscimpl.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petsc/private/petscimpl.h)


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