PetscObjectComposeFunction

Associates a function with a given PETSc object. Collective on PetscObject

Input Parameters

obj - the PETSc object; this must be cast with a (PetscObject), for example, PetscObjectCompose((PetscObject) mat,...);
name - name associated with the child function
fname - name of the function
ptr - function pointer (or PETSC_NULL if using dynamic libraries)

Synopsis

PetscObjectComposeFunction(PetscObject obj,char *name,char *fname,void *ptr)

Notes

PetscObjectComposeFunction() can be used with any PETSc object (such as Mat, Vec, KSP, SNES, etc.) or any user-provided object.

The composed function must be wrapped in a EXTERN_C_BEGIN/END for this to work in C++/complex with dynamic link libraries (USE_DYNAMIC_LIBRARIES) enabled.

Keywords

object, composition

See Also

PetscObjectQueryFunction()

Level:advanced
Location:src/sys/src/objects/inherit.c
System Index
Table of Contents