Skip to content

[LinearAlgebra] Fixed element for lower triangular part of BTDMatrix#6050

Merged
hugtalbot merged 3 commits intosofa-framework:masterfrom
MakiRuse:btd_correction
Mar 26, 2026
Merged

[LinearAlgebra] Fixed element for lower triangular part of BTDMatrix#6050
hugtalbot merged 3 commits intosofa-framework:masterfrom
MakiRuse:btd_correction

Conversation

@MakiRuse
Copy link
Copy Markdown
Contributor

@MakiRuse MakiRuse commented Mar 20, 2026

The method element of BTDMatrix returns 0 only for the upper trianguar part of the matrix but not for the lower part. This results in a wrong display of the matrix for debug and if access is done through the "element" method, the resulting data will be wrong as well.

I propose this quick fix to also ignore the lower triangular part of the matrix when outside of the tridiagonal blocks.

[with-all-tests]


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

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Mar 21, 2026
@fredroy
Copy link
Copy Markdown
Contributor

fredroy commented Mar 21, 2026

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

@hugtalbot hugtalbot changed the title Fixed element for lower triangular part of BTDMatrix [LinearAlgebra] Fixed element for lower triangular part of BTDMatrix Mar 26, 2026
@hugtalbot
Copy link
Copy Markdown
Contributor

Great to see your contribution @MakiRuse 👍
Thanks a lot for improving SOFA ! 🚀 🚀 🚀

@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Mar 26, 2026
@hugtalbot hugtalbot merged commit 92037c5 into sofa-framework:master Mar 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement About a possible enhancement pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants