Skip to content

Sum factorisation on simplices#5263

Open
pbrubeck wants to merge 1 commit into
mainfrom
pbrubeck/simplex-sum-fact
Open

Sum factorisation on simplices#5263
pbrubeck wants to merge 1 commit into
mainfrom
pbrubeck/simplex-sum-fact

Conversation

@pbrubeck

@pbrubeck pbrubeck commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Jagged index support (gem + tsfc)

gem.JaggedIndex is a subclass of Index carrying a parents tuple; its .extent stays the static rectangular bound, so every existing consumer that ignores jaggedness remains correct via the zero-padding invariant.

In tsfc/loopy.py, a For loop over a jagged index nested inside its parents now gets a parametrized ISL domain ([p] -> {[q]: 0 <= q < E - p}); otherwise it silently falls back to the rectangular bound. The proof is an executed-kernel test: a 2D Morton-gather contraction compiled through compile_gem → tsfc.loopy.generate produces for (i_2 = 0; i_2 <= 4 + -1*i_1; ...) in the C and matches numpy to machine precision. duffy_evaluation now returns jagged lattice indices, so its consumers get the triangular loops for free.

Depends on firedrakeproject/fiat#262

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.

1 participant