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

[SofaSparseSolver] Introduce FillReducingOrdering #2501

Merged
merged 3 commits into from
Dec 10, 2021

Conversation

alxbilger
Copy link
Contributor

A new DataEngine is introduced: FillReducingOrdering

A DataEngine to reorder the degrees of freedom in a mesh in order to reduce fill-in in sparse matrix factorization.

In other terms, the algorithm minimizes the number of non-zeros entries in the factorization of the sparse matrix of a FEM problem by reordering the degrees of freedom.

The implementation is based on METIS.

Note: some of the direct linear solvers embed such a reordering internally (e.g. SparseLDLSolver), but not all of them (e.g SparseLUSolver, SparseCholeskySolver etc).

An example is also introduced (examples/Components/engine/FillReducingOrdering.scn).
Here is the comparison of the two system matrices:

Initial matrix:
initial_matrix00001

Reordered matrix:
reorder_matrix00001

It improves a lot the performances when the linear solver does not embed a fill-in reducing reordering. This is the case of the SparseLUSolver in the example scene.
Rough framerate without reordering: 2.5 FPS
Rough framerate with reordering: 25 FPS


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 pr: new feature Implement a new feature labels Nov 23, 2021
@alxbilger
Copy link
Contributor Author

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

@fredroy
Copy link
Contributor

fredroy commented Nov 24, 2021

By curiosity, do you think using mt-metis (metis with openmp in a nutshell) could be useful ?
I am quite not sure because I suppose the speedup would come for a mesh with a huge number of nodes but still... 🧐

@alxbilger
Copy link
Contributor Author

By curiosity, do you think using mt-metis (metis with openmp in a nutshell) could be useful ? I am quite not sure because I suppose the speedup would come for a mesh with a huge number of nodes but still... 🧐

@fredroy I don't think it's a priority. The reordering is computed only at initialization. And you can always export your new mesh for later use.

@guparan
Copy link
Contributor

guparan commented Dec 7, 2021

LGTM but the new example FillReducingOrdering.scn crashes (timeout) on all platforms 😢

@guparan guparan 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 Dec 9, 2021
@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 Dec 9, 2021
@alxbilger
Copy link
Contributor Author

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

@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 Dec 10, 2021
@guparan guparan merged commit e7a5cf7 into sofa-framework:master Dec 10, 2021
@guparan guparan added this to the v21.12 milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new feature Implement a new feature pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants