Repository navigation
Conversation
…he mean curvature flow
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #128 +/- ##
==========================================
+ Coverage 67.05% 67.10% +0.04%
==========================================
Files 19 19
Lines 3573 3590 +17
Branches 460 464 +4
==========================================
+ Hits 2396 2409 +13
- Misses 994 998 +4
Partials 183 183
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Address the CG fallback reuse, thread eigensolver tolerance into the spectral sphere path, and tighten the regression assertion.
2 open issues
What changed in this PR
This pull request improves eigensolver and mean-curvature-flow performance while updating dependency and formatting tooling.
Changes:
- Adds configurable ARPACK tolerance support.
- Uses preconditioned CG and factorization reuse for curvature flow.
- Updates SciPy, bibclean, CI, bibliography, and regression tests.
| File | Description |
|---|---|
pyproject.toml |
Raises SciPy and bibclean minimum versions. |
lapy/utils/tests/test_diffgeo.py |
Adds curvature-flow accuracy coverage. |
lapy/solver.py |
Adds the eigensolver tolerance parameter. |
lapy/diffgeo.py |
Optimizes curvature-flow linear solves. |
doc/references.bib |
Applies bibclean formatting. |
.github/workflows/code-style.yml |
Uses the new bibclean command. |
Review effort: Lite
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Speeds up two computations behind spectral sphere maps: the eigensolver and the mean curvature flow.
tria_spherical_projectgains from the faster flow right away. It keeps the strict eigensolver tolerance for now: a loose tolerance needs a few extra eigenpairs to avoid missing a repeated eigenvalue, so it goes into the follow-up PR that reworks the sphere map, together with tests.Changes
Solver.eigshas a newtolargument, passed to ARPACK. The default0keeps machine precision. Eigenfunctions used as coordinates need far less: withtol=1e-6, the eigensolve on a cortical surface (143k vertices) takes about half the time, and the first eigenvectors span the same space to 1e-8.tria_mean_curvature_flowfactorizes only the system matrix of the first step. The matrix changes little between steps, so later steps are solved with conjugate gradients preconditioned by that factorization; a step that does not converge falls back to a direct solve. The result matches solving every step directly to about 1e-11, and the flow is 2 to 3 times faster on a cortical surface, for 3 as well as 30 steps. This works with both backends (use_cholmod).cgtakesrtol.bibclean-checkcommand withbibclean checkand added rules for page ranges and month names. The workflow uses the new command, thestyleextra requiresbibclean>=1.0, anddoc/references.bibis reformatted withbibclean fix.Tests
A new test flows a cube surface for 8 steps and compares it with solving every step directly. It fails (difference 4e-4) when later steps reuse the first factorization without the conjugate gradient solve. The full suite passes with the current dependencies and with the minimum versions (numpy 1.23.2, SciPy 1.12.0).