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

[femutils] BSR Matrix Storage Format #198

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

toutane
Copy link
Contributor

@toutane toutane commented Dec 18, 2024

This pull request implements the BSR Sparse Matrix Storage Format into ArcaneFem Femutils library.

The implementation is composed of two classes:

  • BSRMatrix: stores the non-zero coefficients of a matrix within three arrays: values, columns and row_index. It provides a simple interface to handle coefficients, convert to CSR format and translate to linear system.

  • BSRFormat: provide functions to assemble a BSR matrix from mesh informations. Supports meshes with multiple degrees-of-freedom. Uses a BSRMatrix under the hood. Most of functions use GPU via Arcane accelerator API. Matrix assembly can be done "cell-wise" (with the use of an atomic operation) or "node-wise" for both triangular and tetrahedral elements. It is designed to be used by ArcaneFem modules.

This pull request demonstrates the use of the new BSRMatrix and BSRFormat classes within two modules: Poisson (1 DoF, 2D & 3D) and Elasticity (2 DoFs, 2D). The bsr option can be pass to .arc files to enable its use. Tests have been added for those modules.

poisson, it is used for 2D and 3D, for elasticity, only 2D is supported.
fem-utils functions in more specific namespaces
rm[femutils]: remove empty BSRFormat.cc

clean[femutils]: clean poisson

clean[elasticity]: refactor

cleam[femutils]: add comments

feat[femutils]: compute nz per row array on gpu
@toutane toutane marked this pull request as draft December 18, 2024 13:34
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 72.49467% with 129 lines in your changes missing coverage. Please review.

Project coverage is 70.71%. Comparing base (c063fc0) to head (7950de9).

Files with missing lines Patch % Lines
femutils/BSRFormat.h 62.70% 102 Missing and 11 partials ⚠️
poisson/FemModule.cc 82.05% 6 Missing and 1 partial ⚠️
femutils/DoFLinearSystem.cc 0.00% 5 Missing ⚠️
femutils/AlephDoFLinearSystem.cc 0.00% 2 Missing ⚠️
femutils/HypreDoFLinearSystem.cc 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
+ Coverage   70.69%   70.71%   +0.01%     
==========================================
  Files          56       58       +2     
  Lines        8391     8836     +445     
  Branches     1006     1049      +43     
==========================================
+ Hits         5932     6248     +316     
- Misses       2176     2293     +117     
- Partials      283      295      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@toutane toutane force-pushed the dev/cal-femutils-bsr-format branch from bc53bb0 to 7950de9 Compare December 20, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants