petsc-3.8.3 2017-12-09
Report Typos and Errors


Puts a list of option values that a single one may be selected from


#include "petscsys.h"   
PetscErrorCode  PetscOptionsGetEList(PetscOptions options,const char pre[],const char opt[],const char * const *list,PetscInt ntext,PetscInt *value,PetscBool  *set)
Not Collective

Input Parameters

Output Parameter

options - options database, use NULL for default global database
pre - the string to prepend to the name or NULL
opt - option name
list - the possible choices (one of these must be selected, anything else is invalid)
ntext - number of choices
value - the index of the value to return (defaults to zero if the option name is given but choice is listed)
set - PETSC_TRUE if found, else PETSC_FALSE

See PetscOptionsFList() for when the choices are given in a PetscFunctionList()

See Also

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

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