Repository navigation
fix(loop-interpolation): equality, gradient and weight data reach the solve - #416
Open
lachlangrose wants to merge 3 commits into
Open
lachlangrose wants to merge 3 commits into
lachlangrose wants to merge 3 commits into
Conversation
… solve - add_equality_constraints now adds least-squares rows with the weight EQUALITY_WEIGHT (100). Before, the rows went to equal_constraints and no solve used them. After a native setup, the rows go to the native core as values at the nodes. Remove the unused add_equality_block, the eq_const_* fields and equal_constraints. - P1 and P2 add gradient (direction) constraints as FDI does: two rows with the strike and dip vectors. P1 used to drop them and P2 crashed on the real (n, 3, k) shape derivative layout. P1 and P2 now write a warning for data that they do not use (P1: interface; P2: interface, inequality, inequality pairs). - Use the weight column of the data in all engines: FDI and native gradient and tangent, P1 and P2 value and normal. P1 gives eps as the upper bound of inequality pairs, as FDI does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
add_splay without a region read the fault data with data["X", "Y", "Z", "val"], which pandas reads as one tuple key, so the build stopped with KeyError. Select the four columns with a list. When the overlap side cannot be found, return an empty mask instead of None. clear_constraints now also clears the native orthogonal and equality data, as reset does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test pinned that PLI assembled no gradient rows, so 8 gradient points were unattributed. PLI now uses gradient data, so none are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes data that the interpolators accepted and then silently ignored, or crashed on. Found in a repo audit.
Equality constraints never reached the solve.
add_equality_constraintsstored them, butadd_equality_blockhad no caller. Fault splays rely on these constraints. Example: fixing node 0 to 100 and solving gave 2.0.EQUALITY_WEIGHT = 100. Rows are normalised to unit length and data weights default to 1, so this is a strong soft constraint that cg still solves.add_equality_block,eq_const_*andequal_constraintsare deleted.add_splaywithout a region crashed with a pandasKeyError(data["X","Y","Z","val"]), and returnedNonewhen it could not find the overlap side. Both are fixed, so the default splay path now builds.P1 ignored gradient constraints, and P2 crashed on them. P1's
add_gradient_constraintswaspass. P2's einsum expected the wrong array layout, and its unit test passed only because its fake support used the same wrong layout. P1 and P2 now share one strike/dip implementation, as FDI does. Data that an engine cannot use (P1 interface; P2 interface, inequality and inequality pairs) now gives a warning instead of being dropped silently.Per-point weights were applied differently by each engine. FDI ignored the gradient weight column. P1 and P2 ignored the value and normal weight columns. P1 used an upper bound of 1.0 for inequality pairs, where FDI uses
eps. The weight column is now used everywhere, and P1 passeseps. With the default weights of 1, FDI and native results do not change.Behaviour changes (release note):
/3difference between FDI/native and P1/P2 is not changed.Tests:
Reviewed by a second agent: no bugs found in the diff. The splay
KeyErrorit found is fixed in 749abfa.🤖 Generated with Claude Code