How to integrate on different edges

Hi all

If a computation domain has two subdomains \Omega1 and \Omega2, how do we obtain the inner edges and boundary edges (remove the interface edges) of a subregion, and how do we integrate over them?

Best regards,

Jing Wen