PetscOptionsStringToScalar#
Converts a string to a PetscScalar value; when PETSc is built with complex scalars, parses an optional imaginary part
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscOptionsStringToScalar(const char name[], PetscScalar *a)
Not Collective
Input Parameter#
name - the string to convert
Output Parameter#
a - the resulting
PetscScalarvalue
Note#
Accepts forms such as 1.5, -2, 3+4i, i, or -i. Using an imaginary component when PETSc is built without complex scalars is an error.
See Also#
PetscOptionsStringToInt(), PetscOptionsStringToReal(), PetscOptionsStringToBool(), PetscOptionsGetScalar()
Level#
developer
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages