Reduced dimension in the right hand side using levelset

I’d like to implement a problem where the right-hand side integral is over a reduced dimension. I believe I want to implement the level sets argument, like I found under the heading “Problem Definition” : https://doc.freefem.org/documentation/finite-element.html

I can’t figure out how to properly define phi, and I can’t find an example code. There was one similar question I found in the General Discussion, but it’s not general enough because I want to integrate over a parametrised curve inside the interior of a cube.

Does anyone have an example they can share with me?

Define phi so that it is equal to zero along your curve. For example, to integrate along x=1, int1d(Th,levelset=(x-1))(…);

Thank you for your quick response! So I guess this is my confusion, in R^3, x =1 is a plane. So how does FreeFEM decide where the curve that I want to integrate over is in that plane? For example suppose I want to integrate only along the line x = 1, y = t, z = 2, a < t < b.

Ah, sorry didn’t realize you wanted a curve from a 3d mesh. I do not think you can directly extract a parameterized curve from a 3D mesh using the levelset argument. A possible solution would be to define a meshS that contains your curve of interest and then use the levelset option in an int1d involving that 2D surface mesh.

ok I see, I will give this a try. Thank you!