sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
914 stars 310 forks source link

TriangularFEMForceField Performance optimization #4331

Open Alico10 opened 10 months ago

Alico10 commented 10 months ago

For large displacements method: initLarge: "mstate->read" should return a reference instead of coord vector, this can significantly improve initialization performance, especially when the mesh is relatively large. I suggest checking the similar issues again. applyStiffnessLarge: TriangleInformation::rotation and its inverse right multiplication coord can be optimized,just like how we did in TriangleFEMUtils.

alxbilger commented 10 months ago

I agree. I'll make a Pull Request soon. Thanks.

epernod commented 7 months ago

@alxbilger do you confirm you fixed that in the PR and we can close this issue?