:orphan: # PetscObjectComposedDataSetScalar attach `PetscScalar` data to a `PetscObject` that may be later retrieved with `PetscObjectComposedDataGetScalar()` ## Synopsis ``` #include "petsc/private/petscimpl.h" PetscErrorCode PetscObjectComposedDataSetScalar(PetscObject obj, PetscInt id, PetscScalar data) ``` Not Collective ## Input Parameters - ***obj -*** the object to which data is to be attached - ***id -*** the identifier for the data - ***data -*** the data to be attached, a `PetscScalar` ## Note The `data` identifier can be determined through a call to `PetscObjectComposedDataRegister()` ## See Also `PetscObjectComposedDataSetInt()`, `PetscObjectComposedDataSetReal()`, `PetscObjectComposedDataGetReal()`, `PetscObjectComposedDataSetIntstar()`, `PetscObjectComposedDataSetIntstar()`, `PetscObjectComposedDataGetInt()`, `PetscObject`, `PetscObjectCompose()`, `PetscObjectQuery()`, `PetscObjectComposedDataSetRealstar()`, `PetscObjectComposedDataGetScalar()` ## Level developer ## Location include/petsc/private/petscimpl.h --- [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)