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

Block assemblers #915

Merged
merged 50 commits into from
Aug 11, 2023
Merged

Block assemblers #915

merged 50 commits into from
Aug 11, 2023

Conversation

JordiManyer
Copy link
Member

@JordiManyer JordiManyer commented Jul 4, 2023

This PR implements block assemblers, which allow to assemble a MultiFieldFESpace block-wise.

Instead of a sparse monolithic matrix and vectors, this assembler leverages BlockArrays.jl to produce equivalent block-partitioned sparse matrices and vectors. This is meant to ease the development of block preconditioners and solvers.

Main features:

  • New MultiFieldStyle, called BlockMultiFieldStyle that allows then user to control which field is assembled in which block, the number of blocks, etc...
  • BlockSparseMatrixAssembler, which implements the SparseMatrixAssembler interface.

TODO:

  • Move ArrayBlockView to src/Fields/ArrayBlocks.jl.
  • Increase testing for different types/sizes/combinations of block assemblies.
  • Add documentation

IMPORTANT: This PR should not be merged yet. This is open for comments, and waiting for the parallel implementation to be finalized in GridapDistributed.

NOTE: After merging this, we should remember to also delete the branch rethinking-block-assemblers.

- BlockMatrixAssemblers now is an Assembler, not a
  SparseMatrixAssembler.
- It does not depend on the SparseMatrixAssembler
  interface, thus can be used with any assembler.

This is in preparation for Distributed block
assemblers.
@JordiManyer JordiManyer self-assigned this Jul 4, 2023
@JordiManyer JordiManyer added the enhancement New feature or request label Jul 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Merging #915 (91c9d25) into master (f9d802a) will increase coverage by 0.11%.
The diff coverage is 92.10%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #915      +/-   ##
==========================================
+ Coverage   87.89%   88.00%   +0.11%     
==========================================
  Files         173      174       +1     
  Lines       20401    20626     +225     
==========================================
+ Hits        17931    18152     +221     
- Misses       2470     2474       +4     
Files Changed Coverage Δ
src/Fields/ArrayBlocks.jl 80.38% <25.00%> (-0.87%) ⬇️
src/MultiField/MultiFieldFESpaces.jl 82.48% <90.62%> (+0.97%) ⬆️
src/MultiField/BlockSparseMatrixAssemblers.jl 98.20% <98.20%> (ø)
src/FESpaces/SparseMatrixAssemblers.jl 97.90% <100.00%> (+5.22%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JordiManyer JordiManyer marked this pull request as ready for review August 11, 2023 00:48
@amartinhuertas amartinhuertas merged commit 9e40a63 into master Aug 11, 2023
7 checks passed
@JordiManyer JordiManyer deleted the block-assemblers branch August 11, 2023 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants