PetscOptionsGetInt#
Gets the integer value for a particular option in the database.
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscOptionsGetInt(PetscOptions options, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
Not Collective
Input Parameters#
options - options database, use NULL for default global database
pre - the string to prepend to the name or NULL
name - the option one is seeking
Output Parameters#
ivalue - the integer value to return
set -
PETSC_TRUE
if found, elsePETSC_FALSE
Notes#
If the user does not supply the option ivalue is NOT changed. Thus you should ALWAYS initialize the ivalue if you access it without first checking if the set flag is true.
See Also#
PetscOptionsGetReal()
, PetscOptionsHasName()
, PetscOptionsGetString()
,
PetscOptionsGetIntArray()
, PetscOptionsGetRealArray()
, PetscOptionsBool()
PetscOptionsInt()
, PetscOptionsString()
, PetscOptionsReal()
, PetscOptionsBool()
,
PetscOptionsName()
, PetscOptionsBegin()
, PetscOptionsEnd()
, PetscOptionsHeadBegin()
,
PetscOptionsStringArray()
, PetscOptionsRealArray()
, PetscOptionsScalar()
,
PetscOptionsBoolGroupBegin()
, PetscOptionsBoolGroup()
, PetscOptionsBoolGroupEnd()
,
PetscOptionsFList()
, PetscOptionsEList()
Level#
beginner
Location#
Examples#
src/sys/classes/random/tutorials/ex1.c.html
src/sys/classes/random/tutorials/ex2.c.html
src/sys/tutorials/ex20.c.html
src/vec/vec/tutorials/ex10.c.html
src/vec/vec/tutorials/ex11.c.html
src/vec/vec/tutorials/ex11f90.F90.html
src/vec/vec/tutorials/ex11f.F90.html
src/vec/vec/tutorials/ex12.c.html
src/vec/vec/tutorials/ex12f.F90.html
src/vec/vec/tutorials/ex13.c.html
src/vec/vec/tutorials/ex15.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages