0
$\begingroup$

I wanted to solve a periodic elliptic equation of the form $$-\nabla\cdot(A\nabla u)=-\nabla\cdot F$$ on $Y=[0,2\pi)^d$ using FreeFem++, where $A$ and $F$ are $Y$-periodic. The space of solutions is $H^1_{per}(Y)/\mathbb{R}$, which can also be seen as the space of periodic $H^1$ functions with zero mean. How does one typically impose the zero mean condition in FEM?

$\endgroup$
2
$\begingroup$

There are two approaches to solve this.

The first approach is given by Lagrange multipliers and is well explained here. You have to solve an extended linear system where you impose the solution to be zero-mean.

The second approach, which may be easier, is to modify the system so that one nodal value inside the domain is clamped to zero, i.e., you impose $u_{i^*} = 0$ for some index $i^*$, where $\mathbf{u} = (u_1, \ldots, u_N)^\top$ is the vector of nodal values of your discrete solution $u_h$. This is obtained by replacing an equation $u_{i^*} = 0$ on the $i^*$-th line of your FEM linear system. Then, your final solution $u_h$ is obtained as $$ u_h \leftarrow u_h - \frac{1}{|Y|}\int_{Y} u_h, $$ where $|Y| = (2\pi)^d$, which is trivially zero-mean.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.