PetscOptionsSetAlias — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscOptionsSetAlias

Makes a key and alias for another key

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscOptionsSetAlias(PetscOptions options, const char newname[], const char oldname[])

Logically Collective

## Input Parameters

- options - options database, or `NULL` for default global database

- newname - the alias

- oldname - the name that alias will refer to

## Note

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.

## Developer Note

Uses `malloc()` directly because PETSc may not be initialized yet.

## See Also

`PetscOptionsGetInt()`, `PetscOptionsGetReal()`, `PetscOptionsHasName()`, `PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`, `PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`, `PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`, `PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`, `PetscOptionsFList()`, `PetscOptionsEList()`

## Level

advanced

## Location

src/sys/objects/options.c

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