Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose set original cell index to python #3504

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

jorgensd
Copy link
Member

@jorgensd jorgensd commented Nov 9, 2024

To be able to make a valid geometry from Python (without using create_topology, as one wants to avoid re-distribution of data), one has to expose the original_cell_index attribute to Python.
As we have used this as a public variable in C++, I've gone down the route of creating a setter function in the Python binding, rather than exposing a "list-of-lists" to Python, as we would rather like it to be numpy based.

@garth-wells
Copy link
Member

Mixed topology support is still highly experimental and under review, so we shouldn’t expose the mixed topology version of original_cell_index yet.

When it’s ready, no need to add a function with ‘set’ in the name. Could be a nanobind read/write property.

@jorgensd
Copy link
Member Author

Mixed topology support is still highly experimental and under review, so we shouldn’t expose the mixed topology version of original_cell_index yet.

When it’s ready, no need to add a function with ‘set’ in the name. Could be a nanobind read/write property.

agreed, much cleaner solution 👍🏻

@jorgensd jorgensd added the nanobind Issues related to nanobindings label Nov 11, 2024
@jorgensd jorgensd added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit f629d4d Nov 12, 2024
27 checks passed
@jorgensd jorgensd deleted the dokken/expose_set_original_cell_index branch November 12, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nanobind Issues related to nanobindings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants