I do not have any knowledge on the workings of Cpp. I am trying to get a two dimensional profile of a Bessel function. I have tried using the solution of a previous post here: https://fenicsproject.org/qa/3498/use-bessel-functions-in-jit-compiled-expressions/ However, the code does not seem to work, and the return error is:
error: ‘namespace’ definition is not allowed here
namespace boost_concepts
This error is repeated multiple times ending with a dijitso error:
RuntimeError: Unable to compile C++ code with dijitso
nate
3
Not sure how to fully scope out the old boost bessel functions, but for some reason this alias works via FFC
from dolfin import *
mesh = IntervalMesh(64, 0.0, 16.2235)
V = FunctionSpace(mesh, "CG", 1)
plot(project(Expression("jn(3, x[0])", degree=1), V))
import matplotlib.pyplot as plt; plt.show()
UFL also has some of the Bessel functions e.g. ufl.bessel_J
1 Like
This alias for bessel functions works, thanks.
ims
5
Hello,
Can modified Bessel function of first kind (cyl_bessel_i) be implemented using an alias, as in this case?
Thanks in advance.