Suppose I have a mesh Th defined in the square from x = 0 to 1, y = 0 to 1. I solve a PDE on this mesh, getting solution u. Now I want to know the line integral of u along the straight path from (0, 1/2) to (1, 1/2), that is, along a horizontal line that goes through the center of the square. What is the correct syntax for this?
I tried defining a border “bb” that runs from (0, 1/2) to (1, 1/2), then calling
but this gives zero. I assume this fails because bb is not an actual border of Th.