Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ODESolver] Explicit link to linear solver #4628

Merged
merged 5 commits into from
May 24, 2024

Conversation

alxbilger
Copy link
Contributor

It basically removes the use of MultiMatrix which hides the use of a LinearSolver. Implicitly, the first linear solver found was used. Now, the LinearSolver can be defined directly in the ODE solver as a Link.


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

@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request refactoring Refactor code labels Apr 4, 2024
@alxbilger
Copy link
Contributor Author

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

1 similar comment
@alxbilger
Copy link
Contributor Author

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

Copy link
Contributor

@epernod epernod left a comment

Choose a reason for hiding this comment

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

As this touch directly the ODE solving, did you run some time benchmarks to see if there is a change of speed ?

@bakpaul
Copy link
Contributor

bakpaul commented Apr 9, 2024

Why add a diamond inheritance instead of modifying directly the common parent class ODESolver ?

@alxbilger
Copy link
Contributor Author

Because explicit solvers do not necessarily require a linear solver

Copy link
Contributor

@hugtalbot hugtalbot left a comment

Choose a reason for hiding this comment

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

I definitely 👍 the PR, I have some comments though.
To be discussed at SOFA dev tomorrow

@hugtalbot hugtalbot added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Apr 17, 2024
@alxbilger alxbilger added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels May 13, 2024
Comment on lines 32 to 41
if (!l_linearSolver.get())
{
l_linearSolver.set(getContext()->get<LinearSolver>());

if (!l_linearSolver)
{
msg_error() << "A linear solver is required by this component but has not been found.";
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also make this as a callback

@alxbilger alxbilger added this to the v24.06 milestone May 16, 2024
@fredroy fredroy 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 May 24, 2024
@fredroy fredroy merged commit 2b6c52d into sofa-framework:master May 24, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: status ready Approved a pull-request, ready to be squashed refactoring Refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants