Dear Jessica,
On 23 Aug 2019, at 11:03, Jessica Williams <williamsj@maths.ox.ac.uk> wrote:
I was just wondering whether there’s a simple way to integrate a 2D solution, p(x,y), over an arbitrary line segment, e.g., p(0 <= x <= 1, y = 1)?
I imagine p will have to be interpolated along relevant points, but not sure how best to do this.
As David say, the current best option we have would be for you to evaluate your function at some sample points along the line and then compute the integral by hand with your favourite numerical integration scheme. Note that this is mathematically a little dubious, because even H^1 functions don't have enough regularity for point evaluation. The nice way to do this would be to mesh the line segment, then compute a super mesh projection, take the trace of your field and integrate along the line: effectively using the approach espoused here https://www.sciencedirect.com/science/article/pii/S0021999112000885. But we don't have facility for doing this right now. Being able to do such kinds of geometrically specified integrals is on the roadmap however, and I believe we might have someone starting in October on this stuff. Thanks, Lawrence