Mesh, Submesh , Torus, Boundary

Fragment means that it takes multiple geometries, merge them, but keep the boundary between them. For more information see: Gmsh 4.11.1

You should no need N any longer.

mft is the marked cells (tetrahedrons) of the torus and surrounding box, while mff is the marked facets of the boundary of the torus (with value 3) and outer boundary (with value 4).

if you want to compute the integral over the torus, you can use:

dx = Measure("dx", domain=mesh, subdomain_data=mft)
print(assemble(Constant(1)*dx(1)))

which should give you the volume of the torus (note that dx(1) indicates that we are integrating all cells tagged in mft with value 1).
Similarly, for the box surrounding the torus (marked with 2), you would get
print(assemble(Constant(1)*dx(2)))

1 Like