petsc-3.12.5 2020-03-29
Report Typos and Errors

PetscObjectAddOptionsHandler

Adds an additional function to check for options when XXXSetFromOptions() is called.

Synopsis

#include "petscsys.h"    
PetscErrorCode PetscObjectAddOptionsHandler(PetscObject obj,PetscErrorCode (*handle)(PetscOptionItems*,PetscObject,void*),PetscErrorCode (*destroy)(PetscObject,void*),void *ctx)
Not Collective

Input Parameter

obj - the PETSc object
handle - function that checks for options
destroy - function to destroy context if provided
ctx - optional context for check function

See Also

KSPSetFromOptions(), PCSetFromOptions(), SNESSetFromOptions(), PetscObjectProcessOptionsHandlers(), PetscObjectDestroyOptionsHandlers()

Level

developer

Location

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