Hi,
I have managed to get fenics to solve a 2d problem for me. Mesh and Function space are defined below. As a diagnostic it would be very helpful to have the 1d quantity that is given by integrating over ONE of the two dimensions. (The solution quickly falls off towards the boundaries in that dimension and the integral is well defined.)
# 2d phasespace
phasespace = RectangleMesh(Point(0., -vmax), Point(Lx, vmax), Nx, Nv, "left/right")
# Define function space for phasespace density
V2d = FunctionSpace(phasespace, 'P', degree)
I have found 2d integration on cross section of 3d mesh which basically says that this is not possible and Integrating a 2D function along a single dimension - FEniCS Q&A from the old Q/A site that gives a solution, but when I try it the line
self.u_2d=u_2d
leads to a infinite recursion and error messages like
[Previous line repeated 494 more times]
File "/usr/lib/python3/dist-packages/dolfin/function/expression.py", line 405, in __getattr__
if name == 'user_parameters':
RecursionError: maximum recursion depth exceeded in comparison
Given that the post is from 2014 I assume that internals in fenics have changed about three times since then…
Any advice how to go about this?