PETSc version 3.16.5
Fix/Edit manual page

# PetscHasExternalPackage

Determine whether PETSc has been configured with the given package

### Synopsis

    #include "petscsys.h"
    PetscErrorCode  PetscHasExternalPackage(const char pkg[], PetscBool *has)

Not Collective

### Input Parameters

| pkg | - external package name

### Output Parameters

| has | - PETSC_TRUE if PETSc is configured with the given package, else PETSC_FALSE.

### Notes

This is basically an alternative for PETSC_HAVE_XXX whenever a preprocessor macro is not available/desirable, e.g. in Python.

The external package name pkg is e.g. "hdf5", "yaml", "parmetis". It should correspond to the name listed in ./configure --help or e.g. in PetscViewerType, MatPartitioningType, MatSolverType.

The lookup is case insensitive, i.e. looking for "HDF5" or "hdf5" is the same.

### See Also

PetscViewerType, MatPartitioningType, MatSolverType

### Level

intermediate

### Location

src/sys/objects/package.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages