Repository navigation
feat: use the native solver of LoopStructural when it is installed - #148
Merged
Merged
Conversation
- New setting Solver: Native (the default) or Default. With Native, and when loop-interpolation-core is installed, the interpolators get solver='native'. Without the core, the plugin uses the default solver. - The native solver also solves the inequality constraints, so ADMM is not set for them when native is used. - A feature that the native solver cannot solve (for example a fold or a region mask) is built again with the default solver (cg, or ADMM for inequalities). The plugin uses the default solver for that feature from then on, and writes one log message.
- LoopStructural 1.11.0 allows loop-interpolation 0.2, which has the native solver. Require LoopStructural[native]~=1.11.0 in the three requirement files. - The pin bump workflow read the key "LoopStructural" from the release manifest, but the key of the root package is ".", so it always stopped. It also did not update loopstructural/requirements.txt (the file that qpip reads) and did not match a pin with an extra.
…eature The coordinates 1 and 2 of a fault frame have orthogonal rows that the native core cannot read, so all the faults used cg. Now the plugin finds the coordinates that the core refuses (with the support check of loop-interpolation), solves only those with the default solver, and keeps native for the others. It records the coordinates, so the next build does not try native for them again. If the check finds no coordinate, the full feature uses the default solver, as before. The tests for the ADMM solver of inequality rows now turn the native core off, because with it the native solver solves the inequalities.
…when it does not converge
The native core stops after 5 000 iterations by default; cg allows 10 x the
number of nodes. On a large grid the native solve stopped before it
converged. loop-interpolation then keeps the old field, which had the size
of the old grid, so the surfaces failed ("cannot assign 51000 values to
array of shape 87232").
- Before each solve, give each native builder maxiter = 10 x its number of
nodes.
- After the build, a coordinate whose native solve did not converge is
solved again with the default solver, and uses it from then on. The
native limit is not given to the default solver.
lachlangrose
force-pushed
the
feat/native-solver
branch
from
November 1, 2026 06:55
7a15043 to
4a4b185
Compare
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.
This PR is stacked on #145, so the base is
feat/viewer-object-registry.What changes
loop-interpolation-coreis installed, every interpolator getssolver='native'(throughinterpolator_arguments). Without the core, the plugin uses the default solver, as before._solve_featureinmodel_manager.py).main/solver_choice.py(no QGIS import).Needs a LoopStructural release
The native solver is only in
loop-interpolation0.2, and LoopStructural up to 1.10.0 requiresloop-interpolation<0.1.0. Loop3D/LoopStructural#381 relaxes the pin and addsloopstructural[native]. After that release (1.11.0), change the requirement of the plugin toLoopStructural[native]~=1.11.0. Until then this PR changes nothing for the users: the core is not installed, so the default solver is used.Tests
tests/unit/test_solver_choice.py) and QGIS tests (tests/qgis/test_native_solver.py) for the choice of the solver and the fallback.tests/unit: 343 passed.tests/qgis(run locally with the Python of QGIS 3.42): 244 passed.🤖 Generated with Claude Code