This commit fixes a problem in the Python interface of the material regarding the energy function.
The first issue was, that the function should return a Real but it was set to decltype(auto).
If that was changed a compile error would occur with the message, that an Array<double> can not be converted into a Real, which is wrong, since there is not function named getPotentialEnergy() that returns an array.
Further, the function had the reference return policy, which is a problem, if really a double was returned.
After looking at the material header I realized, that this function does not exists.
The only function that was present was a function that takes an ElementType and an index, but no function exists that solely takes an ElementType.
I have thus changed the signature of the Python interface.
I have no idea why it ever worked.
I also looked at the other branches, and I noticed that this function was marked as deprecate.
However, since my branch lacks this new function (and I am not merging) the interface needs to be extended in another commit.