PetscOptionsEnumArray#

Gets an array of enum values for a particular option in the database. Logically Collective on the communicator passed in PetscOptionsBegin()

Synopsis#

#include "petscsys.h"
PetscErrorCode  PetscOptionsEnumArray(const char opt[],const char text[],const char man[],const char *const *list,PetscEnum value[],PetscInt *n,PetscBool  *set)

Input Parameters#

  • opt - the option one is seeking

  • text - short string describing option

  • man - manual page for option

  • list - array containing the list of choices, followed by the enum name, followed by the enum prefix, followed by a null

  • n - maximum number of values allowed in the value array

Output Parameters#

  • value - location to copy values

  • n - actual number of values found

  • set - PETSC_TRUE if found, else PETSC_FALSE

Notes#

The array must be passed as a comma separated list.

There must be no intervening spaces between the values.

Must be between a PetscOptionsBegin() and a PetscOptionsEnd()

See Also#

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

Level#

beginner

Location#

src/sys/objects/aoptions.c

Examples#

src/dm/impls/plex/tutorials/ex13.c.html


Edit on GitLab

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