Integrating over an interior surface

Thank you, Miroslav. May I expand on my previous question?

In fact, my integrand g has the form

inner(kappa*grad(T),FacetNormal(mesh))

The problem is that kappa and grad(T) are discontinuous across the interior surface and the FacetNormal is ambiguous, too.

I guess the most natural way to resolve this would be to restrict T to the subdomain omega2 and to compute the integral over the corresponding part of the boundary. How can such a restriction be done?

Explanation: I am trying to compute the energy flow across a contact surface. Mathematically and physically, the integral must be independent of the side (material 1 or material 2) that we look at. However, there will be a numerical error. Therefore, I want to compute the integrals over each side separately, and therefore I cannot make use of avg or jump.