When I make a CoefficientFunction(x) then Diff(x) returns the expected result of 1.
However, when I make a CoefficientFunction from a GridFunction and then call Diff(x) it returns 0. Is this expected behavior?
Is there a function which I can call that returns the derivative with respect to x of a CoefficientFunction that consists of a GridFunction? Or is the only way to manually specify the derivative using Grad of the GridFunction?
In the attachments there is a small example.