The code in documentation is:
problem Adual(cc, w)
= int2d(Th)(
(cc/dt+(v1*dx(cc)+v2*dy(cc)))*w
)
+ intalledges(Th)(
(1-nTonEdge)*w*(al*abs(n)-n/2)*jump(cc)
)
- int2d(Th)(
ccold*w/dt
);
1 - nTonEdge = 0 where in the set of boundary edges
and = -1 where in the set of inner edges
So, the formulation should be
where E is the set of inner edges. (E_{\Gamma}^{-} is the set of boundary edges where u \cdot n < 0 and in that case there is no such edges)
But when I read the artical to learn the so-called dual-P_1^{DC} formulation
(see [ERN2006]
ERN, A. and GUERMOND, J. L. Discontinuous Galerkin methods for Friedrichs’ symmetric systems.I. General theory. SIAM J. Numer. Anal.)
It shows:
,
and
so from (17) and (27) I got (ignore the term of E_{\Gamma}^{-})
I’m not sure where the mistake I make that caused the loss of the −1 corresponding to 1−nTonEdge. (And the program is correct)


