I am implementing a finite element solver in MATLAB and I have the following problem. Let's say I have a mesh $\mathcal{T}_1$ with triangular elements on a rectangular domain $\Omega\subset\mathbb{R}^2$. I know the positions of all the nodes on the mesh, and I have an approximate solution $\hat{u}_1(x,y)$ to my PDE on this mesh (this approximation is stored as a vector of real numbers for each node, and then interpolated between nodes). To be exact, I use piecewise affine basis functions, like seen in this illustration.
If I now create a new mesh $\mathcal{T}_2$ (which may or may not be more coarse/fine, and positions of nodes may be changed), is there a way I can "project" the data of $\hat{u}_1(x,y)$ onto the new mesh $\mathcal{T}_2$, call it $\hat{u}_2(x,y)$, so that $\hat{u}_1(x,y)\approx \hat{u}_2(x,y)$? In short I want $u_2(x,y)$ to be the "best representation" of $u_1(x,y)$ at the new mesh.
As an example, let's say there is a disk of radius $1$ around the origin, $B_1(0,0)\subset\Omega$, and perhaps in the initial mesh $\mathcal{T}_1$ the nodes $v_3^{(1)},v_5^{(1)},v_6^{(1)},$ and $v_8^{(1)}$ are contained in this disk. However in the new mesh $\mathcal{T}_2$, perhaps a coarser mesh, there are only $2$ nodes contained in the disk, say $v_2^{(2)}$ and $v_3^{(2)}$. I now want a solution that interpolates in the nodes, and is approximately equal to the solution on the old mesh.
I understand that if the new mesh is much more coarse, of course the solutions can't be that similar, but I just want a decent approximation. If anyone knows any existing MATLAB code to do this, or anything to help me implement it myself, I'll be happy.
It's a bit difficult to explain exactly what I mean in just words, so if it is not clear at all what I'm asking, please say so, and I'll try to clarify.
Thanks