Evaluate_basis_all in dolfinx

The DOLFINx way to do this would be to:

  1. Figure out which cell the point x is in (using dolfinx.compute_colliding_cells, as done in: Implementation — FEniCSx tutorial)
  2. Pull these coordinates back to the reference element, using mesh.geometry.cmap.pull_back (dolfinx/fem.cpp at 48ece0087588f5f274a36aec223abb129fa59e8e · FEniCS/dolfinx · GitHub)
  3. Use basix.FiniteElement(element_of choice).tabulate(1, X_ref) to tabulate at the reference points.

An example of the last step can be found in: asimov-custom-assemblers/custom_assembler.py at main · Wells-Group/asimov-custom-assemblers · GitHub
and for a more verbose and detailed demo on basix see: Creating and tabulating an element — Basix 0.4.1.0 documentation

1 Like