I’m struggeling to create an expression containing Bessel functions. I need something like this: f = Expression("std::cyl_bessel_i(1,x[0])", degree=2) but I get an compilation error that the Bessel function is not found.
I also tried to use the Boost lib version of the Bessel function with f = Expression("boost::math::cyl_bessel_i(1,x[0])", degree=2) but this function is also not found.
MWE:
from dolfin import *
f = Expression("std::cyl_bessel_i(1,x[0])", degree=2)
print(f(1.23))
Apparently from the link you post, project do not capture discontinuities if your space is continuous.
If the expression you project is continuous, there is normally no problem.
To my knowledge, if you really want to use interpolation you have to use an Expression with cpp code like in your first post.