PetscOptionsHasName#
Determines whether a certain option is given in the database. This returns true whether the option is a number, string or Boolean, even if its value is set to false.
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscOptionsHasName(PetscOptions options, const char pre[], const char name[], PetscBool *set)
Not Collective
Input Parameters#
options - options database, use
NULL
for default global databasepre - string to prepend to the name or
NULL
name - the option one is seeking
Output Parameter#
set -
PETSC_TRUE
if found elsePETSC_FALSE
.
Note#
In many cases you probably want to use PetscOptionsGetBool()
instead of calling this, to allowing toggling values.
See Also#
PetscOptionsGetInt()
, PetscOptionsGetReal()
,
PetscOptionsGetString()
, PetscOptionsGetIntArray()
, PetscOptionsGetRealArray()
, PetscOptionsBool()
,
PetscOptionsName()
, PetscOptionsBegin()
, PetscOptionsEnd()
, PetscOptionsHeadBegin()
,
PetscOptionsStringArray()
, PetscOptionsRealArray()
, PetscOptionsScalar()
,
PetscOptionsBoolGroupBegin()
, PetscOptionsBoolGroup()
, PetscOptionsBoolGroupEnd()
,
PetscOptionsFList()
, PetscOptionsEList()
Level#
beginner
Location#
Examples#
src/ts/tutorials/ex17.c
src/ts/tutorials/ex2.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex5.c
src/ts/tutorials/ex15.c
src/ts/tutorials/ex3.c
src/ts/tutorials/ex30.c
src/ts/tutorials/ex4.c
src/ts/tutorials/ex21.c
src/ts/tutorials/ex6.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages