PetscOptionsGetBool3#

Gets the ternary logical (true, false or unknown) value for a particular option in the database.

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscOptionsGetBool3(PetscOptions options, const char pre[], const char name[], PetscBool3 *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#

Notes#

TRUE, true, YES, yes, ON, on, nostring and 1 all translate to PETSC_BOOL3_TRUE FALSE, false, NO, no, OFF, off and 0 all translate to PETSC_BOOL3_FALSE UNKNOWN, unknown, AUTO and auto all translate to PETSC_BOOL3_UNKNOWN

If the option is given, but no value is provided, then ivalue will be set to PETSC_BOOL3_TRUE and set will be set to PETSC_TRUE. That is -requested_bool3 is equivalent to -requested_bool3 true

If the user does not supply the option at all ivalue is NOT changed. Thus you should ALWAYS initialize ivalue if you access it without first checking that the set flag is true.

See Also#

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

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