I am slightly confused regarding the meaning of the $i-th$ gradient-jump term $[\nabla \phi_i]$ in the context of finite element methods, used in the assembly of the stiffness matrix (an example with deal.ii
). On face $F$ with unit normal $\nu$, the jump term is defined as
$$
[\nabla \phi ] = \nu \cdot (\nabla\phi^+-\nabla\phi^-)
$$
For example, consider the case of a Lagrangian, bilinear quadrilateral element, where $i \in \{0,1,2,3\}$. We want to compute the gradient-jump penalty term on face $F$
\begin{gather}
\int_F [\nabla u][\nabla \phi] \tag{$\star$}
\end{gather}
But we see that, since $u = \sum_i \phi_i u_i$ and $u_0^+ \equiv u_3^-$, $u_1^+ \equiv u_2^-$ (based on the numbering depicted in the figure below)
\begin{align}
\nabla u^+ - \nabla u^- &= (\nabla \phi_0^+-\nabla \phi_3^-)\ u_0^+ + (\nabla \phi_1^+ - \nabla \phi_2^-)\ u^+_1 \\
&+ \nabla \phi_2^+\ u_2^+ - \nabla \phi_1^- u_1^- + \nabla \phi_3^+\ u_3^+ - \nabla \phi_0^-\ u_0^-
\end{align}
So I observe that for the shared vertices the terms can be grouped and the calculations can be made on the $+$ element but for the non-shared vertices there are terms for both elements ($+,-$).
That being said, what is the meaning of $[\nabla \phi_i]$ if $(\star)$ cannot be written in the form $$ \sum_j \int_F [\nabla \phi_i] [\nabla \phi_j]\ u_j \quad ? $$
Note.
I can see that in deal.ii
there is a class named FEInterfaceValues
and probably what I am asking is what its function dofmap
is actually doing, but I don't understand the implementation.