petsc-3.7.1 2016-05-15
PetscOptionsHasName
Determines whether a certain option is given in the database. This returns true whether the option is a number, string or boolean, even its value is set to false.
Synopsis
#include "petscsys.h"
PetscErrorCode PetscOptionsHasName(PetscOptions options,const char pre[],const char name[],PetscBool *set)
Not Collective Many br
Input Parameters
| options | - options database use NULL for default global database Many br |
| name | - the option one is seeking Many br |
| pre | - string to prepend to the name or NULL Many br |
Output Parameters
set -PETSC_TRUE if found else PETSC_FALSE. Many br
Many br
Notes: Name cannot be simply -h Many br
In many cases you probably want to use PetscOptionsGetBool() instead of calling this, to allowing toggling values. Many br
See Also
PetscOptionsGetInt(), PetscOptionsGetReal(),
PetscOptionsGetString(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(), Many brPetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), Many brPetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), Many brPetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), Many brPetscOptionsFList(), PetscOptionsEList() Many br
Level:beginner
Location:src/sys/objects/options.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/sys/classes/random/examples/tutorials/ex2.c.html
src/vec/vec/examples/tutorials/ex9.c.html
src/vec/vec/examples/tutorials/ex9f.F.html
src/vec/vec/examples/tutorials/ex14f.F.html
src/mat/examples/tutorials/ex16.c.html
src/ksp/ksp/examples/tutorials/ex2f.F.html
src/ksp/ksp/examples/tutorials/ex6f.F.html
src/ksp/ksp/examples/tutorials/ex11f.F.html
src/ksp/ksp/examples/tutorials/ex14f.F.html
src/ksp/ksp/examples/tutorials/ex15f.F.html
src/snes/examples/tutorials/ex1.c.html