PetscDataTypeFromString — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscDataTypeFromString

Gets the enum value of a PETSc datatype represented as a string

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscDataTypeFromString(const char *name, PetscDataType *ptype, PetscBool *found)

Not Collective

## Input Parameter

- name - the PETSc datatype name (for example, “double” or “real”)

## Output Parameters

- ptype - the enum value, only valid if found is `PETSC_TRUE`

- found - the string matches one of the data types

## See Also

`PetscDataType`, `PetscDataTypeToMPIDataType()`, `PetscDataTypeGetSize()`

## Level

advanced

## Location

src/sys/objects/ptype.c

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