mimesis-inria / caribou

Multi-physics computation library
GNU Lesser General Public License v3.0
29 stars 17 forks source link

[HyperelasticForcefield] : Breaking bug that prevent MechanicalObject fields modifications when running in batch mode. #104

Open AlbanOdot opened 2 years ago

AlbanOdot commented 2 years ago

I just encountered a bug that has been replicated on multiple computers when running the given script using python launcher In the script, the position is modified on the onAnimatedBeginEvent function call. We can see two behaviors.

By running :

Commenting/uncommenting the material/constitutive law reveals that it's the HyperelasticForcefield that causes the problem.

This minimal scene replicates the bug: BugCaribou.zip

AlbanOdot commented 2 years ago

So far I've tried to remove the draw function from CaribouForcefield (since it interacts with the gui) but it doesn't affect the result.

jnbrunet commented 2 years ago

Étrange... The only reference to the MO position vector in these codes are const read only, so it should not affect anything...

I will try to have a closer look. Let me know if you find other hints.

AlbanOdot commented 2 years ago

For anyone having the same issue, a quick fix has been provided at Sofa issues.