# Approximate $\|\Delta f\|^2_{L^2(\Omega)}$ in finite element context

I have minimization problem of the form $$G(f) + \|\Delta f\|^2_{L^2(\Omega)} \to \min$$ over all $$f\in C^2(\Omega)$$, $$\Omega$$ being closed and bounded.

Let us forgot about $$G$$; I'm interested in how to discretize the $$L^2$$-norm. In the context of finite volumes, one has $$\begin{multline} \int_\Omega (\Delta f)^2 = \sum_i \int_{V_i} \left(\Delta f\right)^2 \approx \sum_i |V_i| (\Delta f)(x_i)^2\\ \approx \sum_i |V_i| \left(|V_i|^{-1} \int_{V_i} \Delta f\right)^2 = \sum_i |V_i|^{-1} \left(\int_{V_i} \Delta f\right)^2, \end{multline}$$ so $$\|\Delta f\|_{L^2(\Omega)} \approx \|\Delta_h P_h(f)\|_{M^{-1}}$$ where $$M$$ is the mass matrix and $$P_h$$ the projection into the discretized space.

It seems from numerical experiments (see below) that this is also true for finite-element-type functions (withe the respective mass matrix; see the code below).

Does anyone know why that is?

import sympy
from dolfin import (
Expression,
FacetNormal,
Function,
FunctionSpace,
TestFunction,
TrialFunction,
UnitSquareMesh,
assemble,
dot,
ds,
dx,
project,
solve,
)

mesh = UnitSquareMesh(500, 500)
V = FunctionSpace(mesh, "CG", 1)

u = TrialFunction(V)
v = TestFunction(V)

n = FacetNormal(mesh)
M = assemble(u * v * dx)

f = Expression("sin(pi * x) * sin(pi * x)", element=V.ufl_element())
x = project(f, V)

Ax = A * x.vector()
Minv_Ax = Function(V).vector()
solve(M, Minv_Ax, Ax)
val = Ax.inner(Minv_Ax)

print(val)

# Exact value
x = sympy.Symbol("x")
y = sympy.Symbol("y")
f = sympy.sin(sympy.pi * x) * sympy.sin(sympy.pi * y)
f2 = -sympy.diff(f, x, x) - sympy.diff(f, y, y)
val2 = sympy.integrate(sympy.integrate(f2 ** 2, (x, 0, 1)), (y, 0, 1))
print(sympy.N(val2))


Output:

97.75031146783857
97.4090910340024

• Does computing the Laplacian from the quadratic function constructed from the star sorrounding each node? – nicoguaro Aug 12 '19 at 15:46

The problem, of course, is that the typical finite element shape functions are not twice differentiable and so $$\Delta f$$ doesn't exist as a function of which you can easily take the norm. To be more precise, the typical shape functions are continuous, and so the derivative is discontinuous across cell interfaces, and the second derivative therefore has an easily integrable part in the cell interiors, and a distribution-valued part that lives on the interfaces. This part can not be squared and integrated.
• Of course; the issue is the same with finite volumes. I'm looking for an approximation of the Laplacian norm, however, in the sense that if you project a $C^2$ function into the appropriate space $S_h$ (let's say piecewise linear functions) that $\|\Delta f\|_{L^2(\Omega)^2 \approx \|\Delta_h P_h(f)\|_{S_h}^2$. I'll clarify that in the question.When looking at the "hat" at node points piecewise linear functions, I feel that there should be an approximation of the Laplacian at that point. – Nico Schlömer Aug 12 '19 at 12:38
• In $\|\Delta_h P_h(f)\|_{M^{-1}}$, I think I've actually found the expression I was after, and I've reformulated the question accordingly. – Nico Schlömer Aug 12 '19 at 16:46
• @NicoSchlömer: Can you clarify what $\Delta_h$ is? Presumably you're thinking of $P_h$ as an operator from $C^2$ to ${\mathbb R}^n$ if you take the norm with the inverse mass matrix? – Wolfgang Bangerth Aug 13 '19 at 0:29
• Indeed; I'm thinking of $P_h$ as a projection of $C^2$ into the discretized space, e.g., the coefficients of the finite elements of the interpolated piecewise-linear function. See the project(f, V) in the attached FEniCS code. – Nico Schlömer Aug 13 '19 at 9:01
• But is $V$ a function, or a set of coefficients? Depending on this, how do you define $\Delta_h$? – Wolfgang Bangerth Aug 13 '19 at 20:51