If I have the solution to my PDE, what is the best method to get it's derivative?

In legacy dolfin:
Project the gradient into a suitable space and use point evaluation.
See:

In Dolfinx you can use the Expression class.

1 Like