Integral over different lines

39 views
Skip to first unread message

giuseppe orlando

unread,
Mar 11, 2022, 10:26:05 AM3/11/22
to deal.II User Group
Good morning everyone,
I would have a question about the computation of integrals. Suppose I have a rectangular domain, is it there any way to compute the integral of a certain function over different heights (not only on the bottom or top boundary)?

Thanks in advance,
Giuseppe
Message has been deleted

Marco Feder

unread,
Mar 12, 2022, 7:06:43 PM3/12/22
to deal.II User Group
Hi Giuseppe,

if your goal is to compute the integral of an arbitrary function f(x,y) over a random segment inside your rectangle (you can assume the segment is not parallel to x-axis or y-axis), you could just consider its parametrisation \phi(t), t \in [0,1] so that you have a 1D integral that you can compute. Weights and points in the 1D reference domain can then be asked to dealii.

If your line is parallel to one of the axes, you may want to use compute_affine_transformation() (https://www.dealii.org/current/doxygen/deal.II/classQSimplex.html#ab670894e45080a2c39d0698c0f582c9d) to get points and weights in the "real" line, since one coordinate is fixed.

More advanced users probably have nicer solutions :-)


Best,
Marco
Reply all
Reply to author
Forward
0 new messages