PetscOptionsStringToInt#

Converts a string to an integer value. Handles special cases such as “default” and “decide”

Synopsis#

#include "petscsys.h"   
PetscErrorCode PetscOptionsStringToInt(const char name[], PetscInt *a)

Not Collective

Input Parameter#

  • name - the string to convert

Output Parameter#

Note#

Recognizes the special strings PETSC_DEFAULT, DEFAULT, PETSC_DECIDE, DECIDE, PETSC_DETERMINE, DETERMINE, PETSC_UNLIMITED, UNLIMITED, and mouse (which returns -1). Otherwise the value is parsed as a base-10 integer.

See Also#

PetscOptionsStringToReal(), PetscOptionsStringToScalar(), PetscOptionsStringToBool(), PetscOptionsGetInt()

Level#

developer

Location#

src/sys/objects/options.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages