I was wondering what was the reason behind using a PetscScalar argument for the function that is tested for zero-crossings in TSEvent. Why can't we use PetscReal for it? tsevent.c has plenty of PetscRealPart calls that seems to indicate that PetscReal should be used instead. I can open a PR if there are no valid reasons to keep the PetscScalar arguments.
-- Stefano
