petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscOptionsGetBool

Gets the Logical (true or false) value for a particular option in the database.

Synopsis

#include "petscsys.h"   
PetscErrorCode  PetscOptionsGetBool(PetscOptions options,const char pre[],const char name[],PetscBool  *ivalue,PetscBool  *set)
Not Collective Many br

Input Parameters

options - options database use NULL for default global database Many br
pre - the string to prepend to the name or NULL Many br
name - the option one is seeking Many br

Output Parameter

ivalue - the logical value to return Many br
set - PETSC_TRUE if found, else PETSC_FALSE Many br

Many br

Notes

TRUE, true, YES, yes, nostring, and 1 all translate to PETSC_TRUE Many brFALSE, false, NO, no, and 0 all translate to PETSC_FALSE Many br

If the user does not supply the option (as either true or false) ivalue is NOT changed. Thus Many bryou NEED TO ALWAYS initialize the ivalue. Many br

See Also

PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(),
PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsGetInt(), 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/vec/vec/examples/tutorials/ex10.c.html
src/dm/examples/tutorials/ex1.c.html
src/dm/examples/tutorials/ex2.c.html
src/dm/examples/tutorials/ex5.c.html
src/dm/examples/tutorials/ex12.c.html
src/dm/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex1.c.html
src/ksp/ksp/examples/tutorials/ex2.c.html
src/ksp/ksp/examples/tutorials/ex4.c.html
src/ksp/ksp/examples/tutorials/ex5.c.html
src/ksp/ksp/examples/tutorials/ex6.c.html