Skip to content

Update block preconditioning#79

Merged
j-fu merged 7 commits into
masterfrom
jf/blockupdate
Jul 12, 2026
Merged

Update block preconditioning#79
j-fu merged 7 commits into
masterfrom
jf/blockupdate

Conversation

@j-fu

@j-fu j-fu commented Jul 11, 2026

Copy link
Copy Markdown
Member

No description provided.

j-fu added 4 commits July 11, 2026 21:49
The way it was structured still used old ideas from ExtendableSparse
preconditioning. Without breaking (due to being not exported anymore),
we can implement this in a much clearer and simple way.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors and extends the block-preconditioning implementation by moving core preconditioner implementations into a new src/preconditioners.jl, adding block-size support to JacobiPreconBuilder, and updating tests to exercise the new/updated behavior. It also bumps the package version and records the changes in the changelog.

Changes:

  • Introduce src/preconditioners.jl with JacobiPreconditioner, BlockPreconditioner, and related utilities (allow_views, pointblock, ILU0BlockPrecon, ProductPreconditioner).
  • Update JacobiPreconBuilder to accept blocksize, and adjust ILU block preconditioning to use the moved ILU0BlockPrecon/pointblock.
  • Expand/adjust tests to cover block preconditioning variants (including Jacobi blocksize variants) and bump version/changelog.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/test_linearsolve.jl Adds Jacobi precon builders (incl. blocksize) and updates the block-preconditioning test setup.
test/test_block.jl Updates tests to use JacobiPreconditioner and the new factorizations API, adds additional block-preconditioning comparisons.
src/preconditioners.jl New file defining core preconditioners (Jacobi, block, product) and block utilities.
src/preconbuilders.jl Removes inlined preconditioner implementations; adds JacobiPreconBuilder(blocksize) and uses moved core types.
src/ExtendableSparse.jl Includes the new preconditioners.jl file.
Project.toml Bumps version to 2.4.0.
CHANGELOG.md Adds a 2.4.0 entry describing the changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/preconditioners.jl
Comment thread src/preconditioners.jl
Comment on lines +151 to +153
if nall != n
@error "BlockPreconditioner: sum(length,partitioning)=$(nall) but n=$(n)"
end
Comment thread test/test_linearsolve.jl
Comment on lines +113 to 116
N = n^2
partitioning = [i:blocksize:(n^2) for i in 1:blocksize ]
sol0 = ones(n^2)
b = A * ones(n^2)
Comment thread src/preconbuilders.jl
j-fu and others added 3 commits July 12, 2026 00:09
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@j-fu j-fu merged commit 7cff592 into master Jul 12, 2026
11 checks passed
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