While looking at step6 of deal.ii tutorials, I decided to try to understand how the constraints coming from hanging nodes are imposed. So I started by watching video lecture 16 by prof. Bangerth
As far as I understood: some of the basis functions $\varphi_i$ are now discontinuous, and that's of course a problem as we want to compute $L^2$ products of gradients on local cells. Also, our space is no more a subspace of $H^1$. In practice, what they do is to ensure that every linear combination $\sum_i V_i \varphi(x)$ of such basis functions is indeed continuous, by playing with the cofficients and imposing continuity at the hanging nodes.
What I can't understand is the sentence at 10:10, when basically he says:
I need that the value of the function $v_h$ at vertex 1 is one half the value at vertex 0 plus one half the value at vertex 2
I know this follows by imposing continuity, but I can't see the computation behind this. I can't see how the continuity is imposed, mathematically.