:orphan: # PetscInfoSetClasses Sets the classes which `PetscInfo()` is filtered for/against ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscInfoSetClasses(PetscBool exclude, PetscInt n, const char *const *classnames) ``` Not Collective; No Fortran Support ## Input Parameters - ***exclude -*** Whether or not to invert the filter, i.e. if exclude is true, `PetscInfo()` will print from every class that is NOT one of the classes specified - ***n -*** Number of classes to filter for (size of `classnames`) - ***classnames -*** String array containing the names of classes to filter for, e.g. "vec" ## Notes This function CANNOT be called after `PetscInfoGetClass()` or `PetscInfoProcessClass()` has been called, unless the user calls `PetscInfoDestroy()` first. Names in the `classnames` list should correspond to the names returned by `PetscObjectGetClassName()`. This function only sets the list of class names. The actual filtering is deferred to `PetscInfoProcessClass()`, except of sys which is processed right away. The reason for this is that we need to set the list of included/excluded classes before their classids are known. Typically the classid is assigned and `PetscInfoProcessClass()` called in InitializePackage() (e.g. `VecInitializePackage()`). ## See Also [](sec_PetscInfo), `PetscInfo()`, `PetscInfoGetClass()`, `PetscInfoProcessClass()`, `PetscInfoSetFromOptions()`, `PetscStrToArray()`, `PetscObjectGetName()` ## Level developer ## Location src/sys/info/verboseinfo.c ## Examples src/mat/tutorials/ex7.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/info/verboseinfo.c) [Index of all Profiling routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)