FEniCS / dolfinx

Next generation FEniCS problem solving environment
https://fenicsproject.org
GNU Lesser General Public License v3.0
779 stars 181 forks source link

Python wrappers for `AdjacencyList` and `FiniteElement` missing #3483

Open schnellerhase opened 2 weeks ago

schnellerhase commented 2 weeks ago

Both AdjacencyList and FiniteElement are exported for multiple data types and thus should be wrapped into a uniform python interface as done for other multi type exports.

chrhansk commented 2 days ago

I am experiencing a similar problem: I have so far been using version 0.7.1 of fenics-dolfinx using anaconda. This version has the class FiniteElement in the ufl module.

However, when switching to 0.9.0, the class is simply gone, breaking my code. Is there some workaround for the current version?

jorgensd commented 2 days ago

@chrhansk You are referring to ufl.FiniteElement, not dolfinx.cpp.fem.FiniteElement. All finite elements from ufl has been removed (ufl.FiniteElement, ufl.VectorElement, ufl.TensorElement, and been replaced by the relevant basix.ufl.element. For an explanation about how to write these elements, see for instance: https://jsdokken.com/FEniCS-workshop/src/unified_form_language/ufl_elements.html#the-finite-element or https://jsdokken.com/fenics22-tutorial/comparing_elements.html#piecewise-constant-pressure-spaces and subsequent sections

chrhansk commented 2 days ago

@jorgensd: Thank you for the help and sorry for the noise.