# PetscBagGetName
Gets the name of a bag of values 
## Synopsis
```
#include "petscbag.h"   
PetscErrorCode PetscBagGetName(PetscBag bag, char **name)
```
Not Collective




## Input Parameter

- ***bag -*** the bag of values



## Output Parameter

- ***name -*** the name assigned to the bag



## See Also
 `PetscBag`, `PetscBagSetName()`, `PetscBagView()`, `PetscBagLoad()`, `PetscBagGetData()`
`PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()`
`PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`

## Level
Intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/bag/bag.c.html#PetscBagGetName">src/sys/classes/bag/bag.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/bag/bag.c)


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