PetscBagSetOptionsPrefix — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscBagSetOptionsPrefix

Sets the prefix used for searching for all `PetscBag` items in the options database.

## Synopsis

    #include "petscbag.h"
    PetscErrorCode PetscBagSetOptionsPrefix(PetscBag bag, const char pre[])

Logically Collective

## Input Parameters

- bag - the bag of values

- pre - the prefix to prepend all Bag item names with.

## Note

Must be called prior to registering any of the bag items.

## See Also

`PetscBag`, `PetscBagRegisterReal()`, `PetscBagRegisterInt()`, `PetscBagRegisterBool()`, `PetscBagRegisterScalar()` `PetscBagSetFromOptions()`, `PetscBagCreate()`, `PetscBagDestroy()`, `PetscBagRegisterEnum()`

## Level

intermediate

## Location

src/sys/classes/bag/bag.c

## Examples

src/sys/tutorials/ex5.c
src/sys/tutorials/ex5f90.F90

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages