Mass matrix between non matching meshes

Hi,

I have the following setup. I have two finite element spaces, T_h and T_H. The mesh of T_h is a true refinement of the mesh of T_H. Also, T_h uses a cg Lagrange basis of degree one, while T_H uses a dg Legendre basis of degree 2. I now want to calculate the mass matrix M between these two meshes, meaning

M_{i,j} = \int_\Omega \varphi_i \psi_j \, dx

where \varphi_i is the i-th basis function of the coarse space and \psi_j is the j-th basis function of the fine space.

As far as I understand this, this is only possible using interpolation on non-matching meshes since the functions must be defined on the same mesh for the dolfinx forms to work. Is there another option? For example, using the cell data from the refinement for some the calculation of some sort of prolongation matrix, to transform the normal mass matrix of the fine space into the matrix I am looking for?

Thanks a lot for your help!
~ Jan