bad_cast after updating nanobind and dolfinx #1234
497e0bdf29873
started this conversation in
General
Replies: 1 comment
-
|
Downgrading to nanobind 2.8.0 and dolfinx 0.9.0 from conda-forge, the problem disappears. So what happened between those versions? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I just updated dolfinx and everything else in my conda environment. They’re now 0.10.0 and 2.9.2, respectively. Previous versions were installed this summer; not sure which one exactly they were. With those previous versions, the following C++ code, applied to the
_cpp_objectinside the Python-side dolfinxFunction, used to work:Now, after the update, it throws
std::bad_cast.Anybody have an idea what has changed? Is there any other way to get the C++ object pointer to use in my code.
The following code, added to the above function, confirms that the Python-side
objis aFunction_float64, which, AFAIK, should be the nanobind-wrapped C++ sideFunction<double>.I’m using direct
PyObjects here, because my own bindings are Python ← pyo3 → Rust – cxx → C++, with the main part of my own abstract code written in Rust, and some fenics-extensibility in Python. But I also need some higher performance parts that need access to the C++ side of fenics-dolfinx.Beta Was this translation helpful? Give feedback.
All reactions