Dave May via petsc-dev <petsc-dev@mcs.anl.gov> writes:

> I think there would be a lot of merit (in the long run) if user contexts,
> such as given to KSPSetComputeOperators(), SNESSetJacobian() etc were
> changed to be of type PetscObject rather than void*.
>
> Some obvious benefits would be:
> [1] Type checking!

How is passing a void* to PetscObject/PetscContainer different from
passing it to SNES?  Also, would you have different types for every
callback or would you reuse?  If reusing, would the interface require
casting the function pointers to void(*)(void) instead of what is
currently type-safe for most function pointers?  This feels like less
rather than more type safety.

Agree on other points.

Reply via email to