Skip to content

Integration of BlockCatamari/MeshFEMSparse - #115

Open
jpanetta wants to merge 18 commits into
polyfem:mainfrom
MeshFEM:integrate
Open

Integration of BlockCatamari/MeshFEMSparse#115
jpanetta wants to merge 18 commits into
polyfem:mainfrom
MeshFEM:integrate

Conversation

@jpanetta

@jpanetta jpanetta commented Aug 8, 2026

Copy link
Copy Markdown

Integrate BlockCatamari solver and add support for BlockCSCHessian. Also support sharing linear solvers across descent strategies to avoid unnecessary symbolic factorization work.

The various supported symmetric matrix types are managed by the new Hessian variant class, which facilitates the conversions needed when the Problem and Solver work in different formats.

halehOssadat and others added 18 commits July 22, 2026 14:02
A typo in `spqr.cmake` prevented the `SuiteSparse::SPQR` from being
detected, leading to an unnecessary `find_package(SPQR)` call. This call
in turn can bring in a newer system-level SuiteSparse library that
conflicts with the older CPM version and breaks the configuration step.

We also add `include(suitesparse)` before checking the target in case
this was not done previously (i.e., if the other `SuiteSparse`
dependencies have been disabled).
… in a PolyFEM-compatible version of Metis in this case.

Metis is needed for orderings like cholmod_nested_dissection and
cholmod_metis (anything depending on the PARTITION module of CHOLMOD).
Newer versions of SuiteSparse package their own customized version of
Metis, but until we upgrade we need to bring it in ourselves.

Note that PolyFEM includes Metis via `wildmeshing-toolkit` and
configures it for 32-bit indices; we bring in the identical git commit
and apply matching configuration settings here.
…st-path) and sparsity-update-aware guarded symbolic factorization
…factorization.

This prevents strategy switches from causing unnecessary symbolic factorizations and
and losing track of adaptive ordering timing statistics.
It also requires moving the sparsity pattern ID metadata onto the linear
solver object.
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.59459% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.92%. Comparing base (e38cfac) to head (84bc531).

Files with missing lines Patch % Lines
src/polysolve/Hessian.hpp 70.83% 21 Missing ⚠️
src/polysolve/linear/CatamariSolver.cpp 61.90% 16 Missing ⚠️
.../polysolve/nonlinear/descent_strategies/Newton.cpp 85.36% 6 Missing ⚠️
src/polysolve/linear/Solver.hpp 66.66% 2 Missing ⚠️
src/polysolve/nonlinear/Solver.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
- Coverage   80.73%   79.92%   -0.81%     
==========================================
  Files          51       54       +3     
  Lines        2118     2257     +139     
  Branches      280      307      +27     
==========================================
+ Hits         1710     1804      +94     
- Misses        408      453      +45     
Flag Coverage Δ
polysolve 79.92% <74.59%> (-0.81%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

Comment thread src/polysolve/Hessian.hpp
// will both be of size `rows() - nfv`, where `nfv` is the number of
// unique indices in `fixedVars). This differs from MeshFEMSparse's
// convention of working with full-space RHS and solution vectors.
struct BCSCHessianWithFixedVars {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i prefer classes

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.

3 participants