:orphan: # PetscOptionsPrefixPush Designate a prefix to be used by all options insertions to follow. ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscOptionsPrefixPush(PetscOptions options, const char prefix[]) ``` Logically Collective ## Input Parameters - ***options -*** options database, or `NULL` for the default global database - ***prefix -*** The string to append to the existing prefix ## Options Database Keys - ***-prefix_push -*** push the given prefix - ***-prefix_pop -*** pop the last prefix ## Notes It is common to use this in conjunction with `-options_file` as in ```none -prefix_push system1_ -options_file system1rc -prefix_pop -prefix_push system2_ -options_file system2rc -prefix_pop ``` where the files no longer require all options to be prefixed with `-system2_`. The collectivity of this routine is complex; only the MPI processes that call this routine will have the affect of these options. If some processes that create objects call this routine and others do not the code may fail in complicated ways because the same parallel solvers may incorrectly use different options on different ranks. ## See Also `PetscOptionsPrefixPop()`, `PetscOptionsPush()`, `PetscOptionsPop()`, `PetscOptionsCreate()`, `PetscOptionsSetValue()` ## Level advanced ## Location src/sys/objects/options.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/options.c) [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)