# DG local equation, how to interpret mean-averaged test function

In the paper http://www.sciencedirect.com/science/article/pii/S0045782509003521, an HDG element-local equation is described on page 584 equation (4), with one of the equations taking the following form

$$-(u_h,\nabla q)_K = -\left\langle\hat{u}_h \cdot n, q - \bar{q}\right\rangle_{\partial K}$$

Which is the variational approximation to the continuous equation $\nabla \cdot u = 0$, with a scalar-valued test function $q$ in a space that makes sense.

The paper defines $$\bar{q} = \frac{1}{|\partial K|} \int_{\partial K} q$$.

How is this interpreted, in a finite element sense? From my understanding, we multiply both sides by a test function $q$ and then attempt to find the solution which satisfies the equation for all possible choices of $q$. How is it possible to modify the test space in this manner?

The paper also states that this is necessary to enforce the identity $$\left\langle\hat{u}_h\cdot n, q - \bar{q}\right\rangle_{\partial K} = 0$$ I agree with this statement, but how might a test function $q - \bar{q}$ be implemented in code? Should I take the basis functions on the element and subtract their mean when assembling the element local linear system?

• Have you tried contacting the authors of the paper themselves? – Paul Jul 2 '17 at 3:52

## 1 Answer

I suppose that the space function in which $q$ is sought has a null mean, i.e. the new test functions $q^*$ have been defined such as: $$\int_{\Omega}{q^*\,dx} = \int_{\Omega}{(q-\overline{q})\,dx} = 0$$ This is common in systems in which a compatibility condition arises must be fulfilled.

• Practically, how would one go about implementing such a "null-mean" space? Do you have a reference? – user3482876 May 7 '18 at 18:19
• The test funcion over which the PDE is projected, is defined as any test function (dependent of the coordinates, as you understand it) minus its mean value (simply a constant). Therefore the gradient of such a test function gets rid of this constant that is subtracted to the test function. This constant is set globally. And you can compute it from the beginning. If your basis functions add to one in every point (they are interpolant) just this constant coincides with the area of your domain in 2D. – HBR May 7 '18 at 18:31
• I've read that it actually is Discrete Galerkin, therefore this constant is equal to the element area (if the basis add to one) – HBR May 7 '18 at 18:35