Homec4science

This commit fixes a problem in the Python interface of the material regarding…

Authored by Philip Mueller, HS <philip.paul.mueller@bluemail.ch> on Jan 18 2022, 10:00.

Description

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.

Details

Committed
Nicolas Richart <networms@gmail.ch>Jan 19 2022, 09:25
Pushed
gitlab-richartJan 19 2022, 09:27
Parents
rAKAb9f6bc187ae3: Remove `except tags` in the configuration steps
Branches
Unknown
Tags
Unknown

Event Timeline

Nicolas Richart <networms@gmail.ch> committed rAKAd829bf5a7799: This commit fixes a problem in the Python interface of the material regarding… (authored by Philip Mueller, HS <philip.paul.mueller@bluemail.ch>).Jan 19 2022, 09:25