Skip to content

Extending the indexing of GEM nodes#247

Draft
achanbour wants to merge 33 commits intomainfrom
achanbour/bary-coords-gem
Draft

Extending the indexing of GEM nodes#247
achanbour wants to merge 33 commits intomainfrom
achanbour/bary-coords-gem

Conversation

@achanbour
Copy link
Copy Markdown

This is the second part of PR #245 and concerns changes to GEM only. In summary, this adds new ways in which gem Nodes can be indexed, mimicking numpy's fancy indexing:

  • indexing by an integer index array e.g., tensor_1d[1,2,3] using a new GEM index type called ListIndex` that wraps the index array and a free index that ranges over the elements of that array.
  • supporting mixed indexing using arrays, slices, and indices e.g., tensor_2d[1::3, [2, 3, 4]].

…ion to handle nested tensor-product cells + added tests
achanbour added 3 commits May 7, 2026 12:20
… sub-entities of simplicies + added notes + modified test checking facet ordering of bary coords on tp cells
@achanbour achanbour requested a review from connorjward May 8, 2026 09:30
@connorjward
Copy link
Copy Markdown

This appears to include a bunch of work from #246. I'm not sure what to review and what to ignore.

@achanbour
Copy link
Copy Markdown
Author

This appears to include a bunch of work from #246. I'm not sure what to review and what to ignore.

Basically all the GEM stuff. I think the reason why it's showing the FIAT here is because I branched it off #246 which hasn't been merged yet.

Ultimately, we would want this PR to get merged after #246 since it would allow everything there to work on GEM nodes.

@achanbour
Copy link
Copy Markdown
Author

Some remaining things to work on here include:

  • Moving the indexing logic from getitem to gem.view()
  • Unifying slicing and indexing with ListIndex in gem.view() -> produce a FlexiblyIndexed node?
  • Possibly rewrite/simplify the construction of FlexiblyIndexed

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.

2 participants