Add reformulation of kernel derivatives, simplifying code layout.

No functional changes intended, although numerical errors may differ.
This code was use to produce the movies/results in commits
60a750f9, be8c18d9.
Ignore generated PDF file.