Skip to content

[LinearSolver] Add unit test for SparseLDLLinearSolver#5937

Open
bakpaul wants to merge 4 commits intosofa-framework:masterfrom
bakpaul:26_01_add_unit_test_for_linear_solvers
Open

[LinearSolver] Add unit test for SparseLDLLinearSolver#5937
bakpaul wants to merge 4 commits intosofa-framework:masterfrom
bakpaul:26_01_add_unit_test_for_linear_solvers

Conversation

@bakpaul
Copy link
Contributor

@bakpaul bakpaul commented Feb 4, 2026

I saw that a core part of SOFA which is its linear solver didn't have any unit test on the actual system solving. I've added here a test on the main one.

In your opinion, is it worth it adding for the other ones that are not Eigen-based ? (or even for the eigen based ?)


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).

@bakpaul bakpaul added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Feb 4, 2026

for (sofa::SignedIndex i = 0; i < nbNonZero; ++i)
{
const auto value = static_cast<SReal>(fabs(sofa::helper::drand(2)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually in tests, I use LinearCongruentialRandomGenerator (see CompressedRowSparseMatrix_test.cpp) to enforce a portable and determinist random number generation.

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 to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants