Repository navigation
feat(interpolation): P2 phase 1 - P2FoldInterpolator - #346
Merged
Merged
Conversation
…points Compute only for valid elements, NaN rows and element -1 elsewhere. Also return (dN, elements, inside) to match P1 (review item 17); update callers and fakes.
…fold settings and weight alignment
lachlangrose
force-pushed
the
p2-phase1-fold-class
branch
from
October 20, 2026 00:40
7d498c4 to
fe5321c
Compare
This was referenced Oct 20, 2026
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.
Stacked on #345 (phase 0). Merge that first; this PR then retargets to master.
What
centroidandgauss4tet quadrature rules (_quadrature.py).evaluate_shape_derivativesreturns NaN rows and element -1 for points outside the mesh, notLinAlgError. P1 and P2 now return the same(dN, elements, inside). Callers updated.P2FoldInterpolator(P2Interpolator)with the three fold constraint families, sampled by quadrature. Row weight isw * sqrt(q_i), applied after normalisation, with no volume factor. Not yet registered in the factory (phase 2).add_constraints_to_least_squares: per-row weights for 3D input usenp.repeat, notnp.tile.Notes
fold_normalisation, unlikeDiscreteFoldInterpolator. A code comment records this.tests/unit/.../test_2d_p1_p2_support.pyalso fail on the parent commit (element_sizecross-product error).Smoke test (
fold_sparse, 2560 tets)Memory at about 5e5 tets: the run hit a MemoryError. Extrapolated peak is about 9 GB (centroid) and 14 GB (gauss4).
Test plan