See L2 projection of fine mesh solution to a coarse mesh - #6 by dokken Which you can adapt to your needs