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
867 stars 296 forks source link

[SolidMechanics.FEM] Small update on container access to avoid unecessary check #4639

Closed epernod closed 2 weeks ago

epernod commented 3 weeks ago

continue porting changes from old branches: https://github.com/epernod/sofa/pull/12/files

getTetrahedron(i) perform a test if i is not out of bounds. When a function is called often and loop on the list of tetrahedra, it is best to get a ref to the array and loop on it.


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

epernod commented 3 weeks ago

[ci-build][with-all-tests]