The DOLFINx
way to do this would be to:
- Figure out which cell the point
x
is in (usingdolfinx.compute_colliding_cells
, as done in: Implementation — FEniCSx tutorial) - Pull these coordinates back to the reference element, using
mesh.geometry.cmap.pull_back
(dolfinx/fem.cpp at 48ece0087588f5f274a36aec223abb129fa59e8e · FEniCS/dolfinx · GitHub) - 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