I had a PDE I solved in FeniCS which gave me a solution P(L,\eta) over L \in[0,1] and \eta\in[1,10] and I wanted to calculate the integral \int_{1}^{10}P(L,\eta)d\eta which I did with the code print(assemble(u*dx))
inside the “length” loop, analogos to the heat equation.
My question is how can I generalise this when I solve a PDE which is of higher dimension, where I have a solution P(L,x,y,z). In this case I want to compute the integral \int_{1}^{10}\int_{0}^{10}\int_{0}^{10}P(L,x,y,z)dxdydz at each “length” step inside the loop. Can this be done?