Associates a function with a given PETSc object.
obj - the PETSc object; this must be cast with a (
PetscObject), for example,
name - name associated with the child function
fname - name of the function
fptr - function pointer
When the first argument of the function is the object within which it has been composed then
can be used to call the function directly with error checking.
To remove a registered routine, pass in NULL for fptr().
PetscObjectComposeFunction() can be used with any PETSc object (such as
SNES, etc.) or any user-provided object.
PetscCallMethod() is used to call a function that is stored in the objects obj->ops table.