Skip to content

Misc bugfixes#103

Merged
JordiManyer merged 2 commits intomainfrom
bugfixes
Mar 12, 2026
Merged

Misc bugfixes#103
JordiManyer merged 2 commits intomainfrom
bugfixes

Conversation

@JordiManyer
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 62.85714% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.55%. Comparing base (42bb1f7) to head (eabe63a).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/NonlinearSolvers/ContinuationFEOperators.jl 73.33% 4 Missing ⚠️
src/BlockSolvers/BlockFEOperators.jl 0.00% 2 Missing ⚠️
src/MultilevelTools/HierarchicalArrays.jl 0.00% 2 Missing ⚠️
ext/GridapPETScExt/HipmairXuSolvers.jl 0.00% 1 Missing ⚠️
src/BlockSolvers/BlockDiagonalSolvers.jl 0.00% 1 Missing ⚠️
src/PatchBasedSmoothers/PatchSolvers.jl 50.00% 1 Missing ⚠️
src/SolverInterfaces/NullSpaces.jl 0.00% 1 Missing ⚠️
src/SolverInterfaces/PAExtras.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   66.56%   66.55%   -0.02%     
==========================================
  Files          62       62              
  Lines        4065     4072       +7     
==========================================
+ Hits         2706     2710       +4     
- Misses       1359     1362       +3     
Flag Coverage Δ
mpi-applications 32.66% <11.42%> (-0.06%) ⬇️
mpi-block 12.90% <0.00%> (-0.03%) ⬇️
mpi-linear 36.93% <31.42%> (-0.14%) ⬇️
mpi-multilevel 12.22% <8.57%> (-0.03%) ⬇️
mpi-nonlinear 6.65% <31.42%> (+0.16%) ⬆️
seq-applications 11.29% <0.00%> (-0.02%) ⬇️
seq-block 12.16% <0.00%> (-0.03%) ⬇️
seq-linear 38.24% <20.00%> (-0.15%) ⬇️
seq-multilevel 2.99% <0.00%> (-0.01%) ⬇️
seq-nonlinear 7.74% <31.42%> (+0.16%) ⬆️
test-extlibs 7.48% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

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 appears to be a cross-cutting bugfix/cleanup sweep across GridapSolvers’ solver interfaces and multilevel tooling, correcting several clear typos/variable mixups and fixing logic that previously evaluated both branches (via ifelse) in continuation operators.

Changes:

  • Fixes multiple variable/field-reference mistakes and tuple destructuring errors that would cause runtime failures.
  • Replaces ifelse with if blocks in ContinuationFEOperator to avoid evaluating both branches.
  • Adjusts several solver/operator internals (patch solver caches ordering, Richardson iteration caches, Schur complement intermediate usage) for correctness.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/SolverInterfaces/PAExtras.jl Fix CSR matrix row-count field used when constructing a view.
src/SolverInterfaces/NullSpaces.jl Adjusts orthogonality check for matrix input (but introduces a dimension assertion bug).
src/PatchBasedSmoothers/PatchSolvers.jl Fixes wrong variable reference (ncns) and returns patch axes in consistent order.
src/NonlinearSolvers/ContinuationFEOperators.jl Avoids eager evaluation via ifelse in residual/jacobian allocation and application (but jacobian! branch for reuse_caches=false is currently broken).
src/MultilevelTools/ModelHierarchies.jl Fixes tuple assignment arity (nothing, nothing, nothingnothing, nothing).
src/MultilevelTools/HierarchicalArrays.jl Fixes map! to actually write into the destination hierarchical array.
src/MultilevelTools/GridTransferOperators.jl Fixes tuple assignment arity in redistribution operator construction.
src/LinearSolvers/SchurComplementSolvers.jl Fixes use of the correct intermediate (x_u) when forming the Schur RHS.
src/LinearSolvers/RichardsonLinearSolvers.jl Simplifies caches by removing redundant α vector; uses ω directly.
src/BlockSolvers/BlockFEOperators.jl Fixes wrong variable name in constructor and corrects linear-form application signature.
src/BlockSolvers/BlockDiagonalSolvers.jl Fixes mapping arity when symbolic setup includes an initial guess x.
ext/GridapPETScExt/HipmairXuSolvers.jl Fixes missing D definition used in VectorValue{D,...} FE construction.

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

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +155 to +157
jacobian(op.op1, u)
else
jacobian(op.op2, u)
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

Algebra.jacobian!(A, op::ContinuationFEOperator, u) ignores the provided matrix A when reuse_caches is false and calls the allocating jacobian(op.op*, u) without copying the result into A. If callers invoke jacobian! for its side effects (common for bang methods), the computed Jacobian can be dropped, and the method also violates the expectation that jacobian! updates A/returns it. Please change this branch to mutate A (e.g., call jacobian!(A, op.op*, u) consistently, or explicitly copy the result into A), and consider adding test coverage for reuse_caches=false since current tests appear to exercise only reuse_caches=true.

Suggested change
jacobian(op.op1, u)
else
jacobian(op.op2, u)
jacobian!(A, op.op1, u)
else
jacobian!(A, op.op2, u)

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

When reuse_caches is false, we do not want to compute the jacobian in place. This option is meant to be used when the sparsity pattern of the matrix changes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.


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

You can also share your feedback on Copilot code review. Take the survey.

@JordiManyer JordiManyer merged commit 7f2d3c0 into main Mar 12, 2026
16 of 18 checks passed
@JordiManyer JordiManyer deleted the bugfixes branch March 12, 2026 00:41
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