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

Add python wrapper for FiniteElement.basix_element #3624

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

schnellerhase
Copy link
Contributor

@schnellerhase schnellerhase commented Feb 10, 2025

Switches to use the Basix python type for the returned element.

Ping #3553

@schnellerhase schnellerhase marked this pull request as ready for review February 10, 2025 13:24
@schnellerhase
Copy link
Contributor Author

oneAPI CI also fails on main - not caused by this PR.

Copy link
Member

@garth-wells garth-wells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A concern/issue in the past has been how tightly we couple Basix Python objects and DOLFINx Python objetcs

@jorgensd
Copy link
Member

jorgensd commented Mar 2, 2025

A concern/issue in the past has been how tightly we couple Basix Python objects and DOLFINx Python objetcs

We need to expose the basix element in some way (being wrapped as a basix python or c++ object), as we do not interface to all the functionality of the C++ element through dolfinx::fem::FiniteElement.

As of now, there is not really any other alternative than using a basix element within DOLFINx.

@garth-wells
Copy link
Member

A concern/issue in the past has been how tightly we couple Basix Python objects and DOLFINx Python objetcs

We need to expose the basix element in some way (being wrapped as a basix python or c++ object), as we do not interface to all the functionality of the C++ element through dolfinx::fem::FiniteElement.

As of now, there is not really any other alternative than using a basix element within DOLFINx.

The required functionality can be wrapped.

The change will force Basix and DOLFINx to use nanobind, and to use precisely the same nanobind version. Small changes were made previously when DOLFINx used nanobind and Basix still used pybind11 to allow this. It's good to avoid unnecessarily tight coupling.

One of the reasons we wrap Basix elements on the DOLFINx side is to keep open the possibility of having a DOLFINx element that isn't backed by a Basix element.

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.

4 participants