\section{Modeling diffusion problems}

\begin{intro}
  Diffusion problems arise when a balance law, for instance for mass
  in ground water flow or for energy in temperature conduction is
  coupled with a constitutive equation relating the direction of
  movement to the gradient of the quantity of interest.
\end{intro}

\begin{intro}
  Let $\rho$ be the density of a conserved quantity. Then, for any given
  volume we have the ``mass''
  \begin{gather*}
    m = \int_V \rho\dx.
  \end{gather*}
  Changes of this mass can be due to two processes:
  \begin{enumerate}
  \item Generation of additional mass by a source $g$,
  \item Flow of mass over the boundary of $V$ at a velocity $v$.
  \end{enumerate}
  In formulas, we have
  \begin{gather*}
    \tfrac{d}{d t} m = \int_V g\dx - \oint_{\d V} J\cdot \n \ds,
  \end{gather*}
  also known as \define{Reynolds transport theorem}. Here, $J$ is the
  \define{flux}. The exact form of the flux will be modeled later.
  The formula above is somewhat unwieldy, since it combines volume and
  surface integrals. Therefore, we apply the \putindex{Gauss theorem}
  to obtain
  \begin{gather}
    \label{eq:darcy:2}
    \frac{d}{dt} \int_V \rho\dx = \int_V g\dx - \int_V \div J \dx.
  \end{gather}
  Concentrating and assuming sufficient regularity, we arrive at the
  equation
  \begin{gather}
    \label{eq:darcy:3}
    \d_t \rho + \div J = g.
  \end{gather}
  As before in these notes, we ignore the time dependence and only
  look at stationary limits. In this case, this reduces to
  \begin{gather}
    \label{eq:darcy:4}
    \div J = g.
  \end{gather}
\end{intro}

\begin{example}
  Next we consider constitutive relations between $\rho$ and $J$ such
  that we can complement equation~\eqref{eq:darcy:4} by a second
  equation and obtain a solvable system. To this end, we consider
  thermal diffusion and ground water flow.

  \begin{description}
  \item[Heat conduction:] Here, the conserved quantity is not the
    density $\rho$, but the temperature $T$. \define{Fourier's law}
    states that the flux is proportional to the gradient of the
    temperature, pointing in opposite direction:
    \begin{gather*}
      J = -k\nabla T.
    \end{gather*}
    The constant of proportionality $k$ is the heat conductivity.
  \item[Porous media flow:] The conserved quantity is the amount of
    fluid, represented by the hydraulic head or pressure
    $p$. \define{Darcy's law} says that the flux is the product of the
    hydraulic \define{permeability} of the media and the gradient of the
    pressure:
    \begin{gather*}
      J = -K\nabla p.
    \end{gather*}
    Here, the permeability $K$ is either a positive scalar function or
    a symmetric, positive definite matrix. Note that in the latter
    case, $J$ and $\nabla p$ do not point in the same direction.
    \item[General diffusion processes:] \define{Fick's law} states,
      that the flux of a diffusion process is determined by the
      gradient of the diffusing quantity $p$ by the relation
    \begin{gather*}
      J = -D\nabla p.
    \end{gather*}
    $D$ is the symmetric, positive definite \define{diffusion tensor}.
  \end{description}
\end{example}

\begin{intro}
  From the two equations for $J$, we derive the following system of
  PDE, where we replace the letter $J$ by the more familiar $u$:
  \begin{gather}
    \label{eq:darcy:5}
    \arraycolsep2pt
    \begin{matrix}
      K^{-1} u &+& \nabla p &=& 0 \\
      \div u &&&=& f.
    \end{matrix}
  \end{gather}
  This system is closed by boundary conditions. Let $\Gamma_D$ be the
  Dirichlet boundary and $\Gamma_N$ be the Neumann boundary such that
  $\Gamma_D \cap \Gamma_N = \emptyset$ and
  $\Gamma_D\cup\Gamma_N = \d\domain$. Then, we let
  \begin{gather}
    \label{eq:darcy:6}
    \begin{aligned}
      p(x) &= p^D(x) & x & \in \Gamma_D, \\
      u(x)\cdot\n &= u^N(x)\cdot n & x & \in \Gamma_N.
    \end{aligned}
  \end{gather}

  Following the concept of finding spaces such that we have an inf-sup
  condition, we are looking for a pair with minimal regularity, such
  that we have a stable and bounded inf-sup condition. We begin the
  usual way by multiplying with a test function and integrating:
  \begin{gather}
    \label{eq:darcy:7}
    \arraycolsep2pt
    \begin{matrix}
      \displaystyle\int_\domain K^{-1} u\cdot v\dx
      &+&
      \displaystyle\int_\domain \nabla p \cdot v\dx
      &=& 0 \\
      \displaystyle\int_\domain \div u q\dx
      &&&=&
      \displaystyle\int_\domain f q\dx.
    \end{matrix}
  \end{gather}
  It turns out, we have two immediate options: first, we can integrate
  the first equation by parts, having all derivatives on $u$ and $v$.
  On the other hand, we can integrate by parts in the second equation,
  leaving all derivatives on $p$ and $q$. In the second case,
  we obtain the equation
  \begin{gather*}
    -\int_\domain u\cdot\nabla q\dx + \int_{\d\domain} u\cdot\n q \ds
    = \int_\domain f q\dx.
  \end{gather*}
  Applying the boundary condition, we first follow the recipe of
  elliptic partial differential equations and implement $p=p^D$ as an
  \putindex{essential boundary condition}, that is, the test function
  space has zero trace on $\Gamma_D$. Then, we can swap in $u^N$ for
  $u$ on $\Gamma_N$, such that the boundary term ends up on the right
  hand side.
\end{intro}

\begin{Definition}{primal-mixed}
  The \define{primal mixed formulation} of the mixed diffusion
  problem~\eqref{eq:darcy:5} reads: find $(u,p)\in V\times Q$ such
  that for all $v\in V$ and $q\in Q$ holds
  \begin{gather}
    \label{eq:darcy:8}
    \arraycolsep2pt
    \begin{array}{rcccl}
      \form(K^{-1} u, v) &+& \form( \nabla p, v)
      &=& 0 \\
      -\form(u,\nabla q)
      &&&=& \form(f,q) - \forme(u^N\cdot\n, q)_{\Gamma_N}.
    \end{array}
  \end{gather}
  The spaces are
  \begin{gather}
    \label{eq:darcy:9}
    \begin{split}
      V &= L^2(\domain;\R^d), \\
      Q &= H^1_{\Gamma_D}(\domain) = \bigl\{
      q\in H^1(\domain) \big| \;q_{|\Gamma_D} = 0
      \bigr\}.
    \end{split}
  \end{gather}
\end{Definition}

\begin{remark}
  Since the first equation is tested with the test function $v$ itself
  in all terms, we can eliminate this equation and there holds
  $u= K\nabla p$ in $L^2(\domain;\R^d)$. Entering this into the second
  equation, we obtain the well-known \putindex{primal formulation}
  \begin{gather*}
    \form(K \nabla p,\nabla q) = \form(f,q)
    - \forme(u^N\cdot\n, q)_{\Gamma_N}.
  \end{gather*}
  Just keep in mind that the ``\putindex{natural boundary condition}''
  in this case is
  \begin{gather*}
    K\nabla p\cdot n = 0.
  \end{gather*}
  Hence, the primal mixed formulation does not provide any advantages
  compared to the primal formulation, and we are not going to pursue
  it further.
\end{remark}

\begin{intro}
  Now we return to the first alternative, namely integrating by parts
  in the first equation of~\eqref{eq:darcy:7}:
  \begin{gather*}
    \int_\domain K^{-1} u \cdot v \dx - \int_\domain p \div v\dx
    + \int_{\d\domain} v\cdot \n p\ds = 0.
  \end{gather*}
  Ensuing is a formulation multiplying and integrating the divergences
  of $u$ and $v$, respectively, with functions in $Q$. In order to fit
  this into our standard framework, we have to introduce a new Sobolev
  space. In addition, since $u\cdot\n$ does not appear as a boundary
  integral, we must make this an \putindex{essential boundary
    condition}. Thus, we require that the test functions have zero
  normal trace on $\Gamma_N$ (and justify this below). Note that now
  the Dirichlet condition $p=0$ has become a ``\putindex{natural
    boundary condition}''!
\end{intro}

\begin{Definition}{hdiv}
  Let $\domain \subset \R^d$ be a domain.  We define the
  Sobolev space
  \begin{gather}
    \Hdiv(\domain) = \bigl\{
    v\in L^2(\domain;\R^d) \big\vert
    \div v\in L^2(\domain)\bigr\},
  \end{gather}
  and its inner product
  \begin{gather}
    \scal(u,v)_{\Hdiv} = \form(u,v)_0 + \form(\div u,\div v)_0.
  \end{gather}
  Furthermore, let $C^\infty_{00}(\domain)$ be the space of smooth
  functions with compact support in $\domain$. Then, we define its
  closure in $\Hdiv(\domain)$:
  \begin{gather}
    \Hdiv_0(\domain) = \overline{C^\infty_{00}(\domain)}.
  \end{gather}
  For subset $\Gamma\subset\d\domain$, the space
  $\Hdiv_\Gamma(\domain)$ is defined accordingly (compare to
  $H^1_\Gamma(\domain)$)
\end{Definition}

Using the space $\Hdiv$ and for the moment the assumption, that
$\Hdiv_0$ and $\Hdiv_\Gamma$ serve to set boundary conditions, we can
write down our second weak formulation of the mixed diffusion problem:

\begin{Definition}{dual-mixed}
  The \define{dual mixed formulation} of the mixed diffusion
  problem~\eqref{eq:darcy:5} reads: find $(u,p) \in V\times Q$ such
  that for all $v\in V$ and $q\in Q$ holds
  \begin{gather}
    \label{eq:darcy:10}
    \arraycolsep2pt
    \begin{array}{rcccl}
      \form(K^{-1} u, v) &-& \form(p, \div v)
      &=& \forme(p^D,v\cdot \n)_{\Gamma_D} \\
      \form(\div u, q)
      &&&=& \form(f,q).
    \end{array}
  \end{gather}
  The spaces are
  \begin{gather}
    \label{eq:darcy:11}
    V = \Hdiv_{\Gamma_N}(\domain),
    \qquad
    Q = L^2(\domain).
  \end{gather}
\end{Definition}

\subsection{Properties of $\Hdiv(\domain)$}

\begin{Theorem}{Hdiv-separable}
  Let $\domain$ be a bounded Lipschitz domain. Then, the space
  $C^\infty(\overline\domain;\R^d)$ is dense in $\Hdiv(\domain)$.
\end{Theorem}

\begin{proof}
  % We use the statement, that a subspace $W$ is dense in a space $V$ if
  % and only if all linear functionals vanishing on $W$ also vanish on
  % $V$. Therefore, let $L \in \Hdiv(\domain)^*$. By the
  % \putindex{Riesz representation theorem}, there is
  % $u\in\Hdiv(\domain)$ such that
  % \begin{gather*}
  %   L(v) = \scal(u,v)_{\Hdiv} = \sum_{i=1}^d \scal(u_i,v_i)_0
  %   + \scal(\div u,\div v)_0
  %   \quad\forall v\in \Hdiv(\domain).
  % \end{gather*}
  % Now assume $L(\phi) = 0$ for all $\phi\in
  % C^\infty(\overline\domain;\R^d)$. Let us extend $u$ and $\div u$ outside
  % of the domain $\domain$ by zero. Then, there holds
  % \begin{gather*}
  %   \int_{\R^d} u\cdot \phi \dx + \int_{\R^d}
  % \end{gather*}
  Either by a standard mollifier argument~\cite{AdamsFournier03} or
  following~\cite[Theorem 2.4]{GiraultRaviart86}
\end{proof}

\begin{remark}
  The condition of boundedness entered the assumptions since we use
  the space $C^\infty(\overline\domain)$. It could be dropped, if we
  used a more appropriate space (cf.~\cite[Theorem
  2.4]{GiraultRaviart86}).
\end{remark}

\begin{Theorem}{Hdiv-trace}
  The \putindex{trace operator}
  $\gamma_n\colon C^\infty(\overline\domain;\R^d) \to
  C^\infty(\overline{\d\domain})$
  which maps $v\mapsto v\cdot\n_{|\d\domain}$ can be extended to a
  continuous, linear mapping
  \begin{gather}
    \gamma_n\colon \Hdiv(\domain) \to H^{-1/2}(\d\domain),
  \end{gather}
  where $H^{-1/2}(\d\domain)$ is the dual of $H^{1/2}(\d\domain)$.
\end{Theorem}

\begin{proof}
  Let $q\in C^\infty(\overline\domain)$ and
  $v\in C^\infty(\overline\domain;\R^d)$. Then, there holds
  \putindex{Green's formula}
  \begin{gather*}
    \form(v,\nabla q)_\domain
    + \form(\div v,q)_\domain
    = \forme(v\cdot\n,q)_{\d\domain}.
  \end{gather*}
  Hence,
  \begin{gather*}
    \left\vert\int_{\d\domain} v\cdot \n q \ds \right\vert
    \le \norm{v}_{\Hdiv} \norm{q}_{H^1}.
  \end{gather*}
  Applying the density of $C^\infty(\overline\domain)$ in
  $H^1(\domain)$ and of $C^\infty(\overline\domain;\R^d)$ in
  $\Hdiv(\domain)$, we can let $q$ and $v$ pass to a limit, but the
  inequality holds uniformly.

  Now apply that $H^{1/2}(\d\domain)$ is the trace space of
  $H^1(\domain)$. Therefore, for any $g\in H^{1/2}(\d\domain)$, there
  is a $q\in H^1(\domain)$ such that $q_{|\d\domain} = g$ and
  $\norm{q}_{1;\domain} \le \norm{g}_{1/2;\d\domain}$. We obtain
  \begin{gather*}
    \left\vert\int_{\d\domain} v\cdot \n g \ds \right\vert
    \le \norm{v}_{\Hdiv(\domain)} \norm{g}_{H^{1/2}(\d\domain)}
    \qquad\forall v\in \Hdiv(\domain), g\in H^{1/2}(\d\domain).
  \end{gather*}
  Hence,
  \begin{gather*}
    \norm{v\cdot\n}_{H^{-1/2}(\d\domain)} \le
    \norm{v}_{\Hdiv(\domain)}
    \qquad\forall v\in \Hdiv(\domain).
  \end{gather*}
  Thus, we have proven the continuity of the extension of $\gamma_n$
  to $\Hdiv(\domain)$.
\end{proof}

\begin{remark}
  The trace theorem tells us that our interpretation of the spaces
  $\Hdiv_0(\domain)$ and $\Hdiv_\Gamma(\domain)$ as spaces with zero
  boundary condition of the normal component is justified. This notion
  will be fortified by the two theorems below. Therefore, we will
  later avoid the notational overhead of using $\gamma_n$ and will
  simply write $v\cdot\n_{|\d\domain}$.
\end{remark}

\begin{Problem}{trace-dnu}
  Show the following result. Let $p\in H^1(\domain)$ and
  $\Delta p \in L^2(\domain)$. Then, $\d_n p\in H^{-1/2}(\d\domain)$
  and
  \begin{gather*}
    \form(\nabla p,\nabla q) = -\form(\Delta p,q) + \forme(\d_n
    p,q)_{\d\domain} \quad\forall q\in H^1(\domain).
  \end{gather*}
\begin{solution}
Since $p, q \in H^1(\domain)$ we can perform integration by parts to obtain
\begin{align*}
 (\Delta p,q)=-(\nabla p,\nabla q)+\forme(\d_n p, q)_{\d\domain}.
\end{align*}
Now, we can use the continuity of the trace operator as follows
\begin{align*}
 \norm{\d_n p}_{-1/2,\d\domain}
 &=\sup_{q\in H^{1/2}(\domain)\setminus\{0\}}\frac{\langle\d_n p,q\rangle_{\d\domain}}{\norm{q}_{H^{1/2}(\d\domain)}}\\
 &\leq
  \sup_{q\in H^{1/2}(\domain)\setminus\{0\}}\frac{\norm{\nabla p}_0 \norm{\nabla q}_0 +\norm{\Delta p}_0\norm{q}_0}
  {\norm{q}_{1/2,\d\domain}}\\
  &\leq C (\norm{\nabla p}_0+\norm{\Delta p}_0).
\end{align*}
Therefore, $\d_n p\in H^{-1/2}(\d\domain)$.
\end{solution}
\end{Problem}

\begin{Theorem}{Hdiv-trace-surjective}
  The trace theorem is optimal in the sense that
  $\gamma_n\colon \Hdiv(\domain) \to H^{-1/2}(\d\domain)$ is
  surjective.
\end{Theorem}

\begin{proof}
  Let $\mu \in H^{-1/2}(\d\domain)$. We have to show that there exists
  $v\in \Hdiv(\domain)$ such that
  \begin{gather*}
    v\cdot\n = \mu \quad\text{on } \d\domain
    \qquad\text{and}\qquad
    \norm{v}_{\Hdiv(\domain)} \le \norm{\mu}_{H^{-1/2}(\d\domain)}.
  \end{gather*}

  We know that the problem
  \begin{xalignat*}2
    -\Delta \phi + \phi &= 0 &\text{in }&\domain, \\
    \d_n \phi &= \mu &\text{on }&\d\domain,
  \end{xalignat*}
  has a unique solution $\phi\in H^1(\domain)$ with
  \begin{gather*}
    \norm{\phi}_{H^1(\domain)}^2 = \forme(\mu,\phi)_{\d\domain}
    \le \norm{\mu}_{H^{-1/2}(\d\domain)}\norm{\phi}_{H^1(\domain)}.
  \end{gather*}
  The first equation then implies $\Delta\phi\in L^2(\domain)$ and
  thus $v=\nabla \phi\in \Hdiv(\domain)$. Since from this equation
  there even holds $\div v=\phi$, we obtain
  \begin{gather*}
    \norm{v}_{\Hdiv(\domain)} \le \norm{\mu}_{H^{-1/2}(\d\domain)}.
  \end{gather*}
\end{proof}

\begin{Theorem}{Hdiv-trace-kernel}
  There holds
  \begin{gather}
    \ker{\gamma_n} = \Hdiv_0(\domain).
  \end{gather}
\end{Theorem}

\begin{proof}
  The inclusion $\Hdiv_0(\domain) \subset \ker{\gamma_n}$ follows
  immediately from the definition and continuity of $\gamma_n$. For
  the opposite inclusion, we have to show that the traces of functions
  in $C^\infty_{00}(\domain)$ are dense in $\ker{\gamma_n}$. We do
  this by using, that a subspace $W$ is dense in a space $V$ if and
  only if all linear functionals vanishing on $W$ also vanish on
  $V$. Choose $u\in\ker{\gamma_n}$ and use the \putindex{Riesz
    representation theorem} to associate with it
  $L\in \ker{\gamma_n}^*$ by
  \begin{gather*}
    L(v) = \scal(u,v)_{\Hdiv} \qquad\forall v\in \ker{\gamma_n}.
  \end{gather*}
  Assume now that $L(\phi) = 0$ for all $\phi\in
  C^\infty_{00}(\domain;\R^d)$. This implies by
  \begin{gather*}
    0 = L(\phi) = \form(u,\phi)_{L^2} + \form(\div u, \div \phi),
  \end{gather*}
  that $u=\nabla \div u$ in distributional sense, and by taking limits
  of $\phi$ in $H^1$ that $\div u\in H^1(\domain)$. Hence, Green's
  formula yields
  \begin{gather*}
    L(v) = \form(\nabla\div u,v)+\form(\div u,\div v)
    = \forme(v\cdot\n,\div u)_{\d\domain} = 0
    \qquad\forall v\in \ker{\gamma_n}.
  \end{gather*}
  Thus, $L$ vanishes on all elements of $\ker{\gamma_n}$ and the
  theorem is proven.
\end{proof}

% \begin{example}
%   The trace theorem involves the space $H^{-1/2}(\d\domain)$, which
%   requires a short discussion. On one dimensional boundaries, elements
%   in $H^{1/2}(\d\domain)$ have continuous representatives. The
%   situation in three dimensions is similar, where no jumps across a
%   line, for instance between two faces is allowed. Therefore,
%   functions in $H^{-1/2}(\d\domain)$ cannot be localized to parts of
%   the boundary, for instance the edge of a cell.

%   We give an example (modified from \cite[Section
%   2.5.1]{BoffiBrezziFortin13}) of this phenomenon.  On the disc
%   $\mathcal D$ around the origin of radius $e^{-1}$ consider the
%   function
%   \begin{gather*}
%     u(x,y) = \ln\Bigl(-\ln\bigl(\sqrt{x^2+y^2}\bigr)\Bigr).
%   \end{gather*}
%   There holds $u\in H^1_0(\mathcal D)$.\marginpar{Volunteers computing
%     the derivative?} Now, consider the domain $\domain$ consisting
%   only of the upper half circle:
%   \begin{align*}
%     \domain &= \bigl\{(x,y)\in \R^2 \big\vert
%               x^2+y^2<e^{-2} \text{ and } y>0 \bigr\}
%     \\
%     \d\domain &= [-e^{-1},e^{-1}]
%                 \cup \bigl\{ (x,\sqrt{e^{-2}-x^2}) \big\vert
%                 x\in (-e^{-1},e^{-1}) \bigr\}
%   \end{align*}
%   Thus, the trace of $u$ on the boundary is in
%   $H^{1/2}(\d\domain)$. We now define $\mu\in H^{-1/2}(\d\domain)$ as
%   the distributional derivative in tangential direction, say
%   counter-clockwise,
%   \begin{gather*}
%     \scal(\mu,\phi) = - \int_{\d\domain} u \d_{\tau} \phi
%     \qquad\forall \phi\in C^1(\d\domain).
%   \end{gather*}

%   Computation yields
%   \begin{gather*}
%     \mu(x) = \frac1{x\ln \abs{x}} \times
%     \begin{cases}
%       1 & x\in (-e^{-1},0) \\
%       -1& x\in (0,e^{-1}).
%     \end{cases}
%   \end{gather*}
%   Both integrals
%   \begin{gather*}
%     \int_{-e^{-1}}^0 \mu(x)\dx
%     \qquad
%     \int^{e^{-1}}_0 \mu(x)\dx,
%   \end{gather*}
%   are not bounded, such that on these parts of the boundary, $\mu$
%   cannot even be tested with a constant function.
%   Now, we consider the integral
%   \begin{gather*}
%     \forme(\mu,\phi) = \int_{-e^{-1}}^{e^{-1}} \ln(-\ln\abs x) \d_\tau \phi \dx.
%   \end{gather*}
%   If we split $\phi$ into an odd and an even part, the intgral with
%   the even part vanishes, since $\ln(-\ln\abs x)$ is even and the
%   derivative is odd. Therefore,
%   \begin{gather*}
%     \forme(\mu,\phi)
%     = \int_{-e^{-1}}^{e^{-1}}
%     \frac{\phi_{\text{odd}}(x)}{x\ln\abs x} \dx
%   \end{gather*}
%   Finally, we use the fact that $\phi_{\text{odd}}(0) = 0$ and that
%   it's growth is limited by its regularity. In order to be square
%   integrable, the groth of $\phi_{\text{odd}}$ must be limited by a
%   positive, fractional power,
%   \begin{gather*}
%     \abs{\phi_{\text{odd}}(x)} \le c \abs x^\alpha,
%     \qquad \alpha>0.
%   \end{gather*}
%   Then,
%   \begin{gather*}
%     \int_0^{e^{-1}} \frac{\abs{\phi_{\text{odd}}(x)}}{x\ln\abs x} \dx
%     \le \frac{x^{\alpha-1}}{\ln\abs x} \dx < \infty.
%   \end{gather*}
% \end{example}

\begin{Theorem}{Hdiv-helmholtz}
  Let $\domain$ be connected. Let
  \begin{gather}
    \label{eq:darcy:1}
    V_0 = \bigl\{ v\in \Hdiv_0(\domain) \big\vert
    \div v = 0 \bigr\}.
  \end{gather}
  Then,
  \begin{gather}
    L^2(\domain;\R^d) = V_0 \oplus \ortho V,
  \end{gather}
  and
  \begin{gather}
    \ortho V = \bigl\{ v = \nabla q \big\vert
    q\in H^1(\domain) \bigr\}.
  \end{gather}
\end{Theorem}

\begin{proof}
  Let $X=\{ v= \nabla q \vert q\in H^1(\domain)\}$. we have to show
  $\ortho V = X$. Observe that $X$ is closed in $L^2$ since $H^1$ is
  complete. We show that $V_0 = \ortho X$ and thus
  \begin{gather*}
    \ortho {V_0} = \ortho{(\ortho{V_0})} = \overline X = X.
  \end{gather*}
  First, let $u\in V_0$. Then, Green's formula reduces to
  \begin{gather*}
    \form(u,\nabla q) = 0 \qquad\forall q\in H^1(\domain).
  \end{gather*}
  Hence, $V_0\subset \ortho X$. Let now conversely
  $u\in L^2(\domain;\R^d)$ such that the previous identity
  holds. Choosing $q\in C^\infty_{00}(\domain)$ yields $\div u=0$,
  which in turn means $u\in\Hdiv(\domain)$. Therefore, we can use
  Green's formula to obtain $u\cdot\n=0$ on $\d\domain$. This together
  implies $u\in V_0$, proving $\ortho X \subset V_0$.
\end{proof}

\subsection{Well-posedness of the dual mixed formulation}

\begin{intro}
  In order to apply the theory from
  Chapter~\ref{sec:mixed-wellposedness}, we have to define the
  abstract bilinear forms $a(.,.)$ and $b(.,.)$. We read from the dual
  mixed formulation
  \begin{align*}
    a(u,v) &= \form(K^{-1}u,v) \\
    b(v,q) &= \form(\div v,q).
  \end{align*}
\end{intro}

\begin{Problem}{mixed-inhomogeneous-bc}
  In both the primal and the dual mixed formulation, we ignored
  inhomogeneous essential boundary conditions. Show that the usual
  lifting method applies. Determine the modified equations and the
  spaces needed for the liftings.
\begin{solution}
The inhomogeneous problem reads in strong form:\\
\begin{align*}
K^{-1} {\mathbf u} + \nabla p &= 0 && \textrm{ in } \Omega,\\
-{\textrm{div}}\ {\mathbf u} &= -f && \textrm{ in } \Omega,\\
p &= p^D && \textrm{ on } \Gamma_D, \\
u\cdot n &=  u^N \cdot n && \textrm{ on } \Gamma_N.
\end{align*}

The corresponding primal weak form is then given as: \\
Find $(u,q)\in V\times Q=L^2(\domain)\times H_{\Gamma_D}^1(\domain)$ such that
\begin{align*}
A(\{{\mathbf u},p\},\{{\mathbf v},q\}) &= F(\{{\mathbf v},q\}), \\
A(\{{\mathbf u},p\},\{{\mathbf v},q\}) &= ({\mathbf v}, K^{-1}{\mathbf u})_\Omega +({\mathbf v}, \nabla p)_\Omega + (\nabla q,{\mathbf u})_\Omega \\
F(\{{\mathbf v},q\}) &= (q, {\mathbf u}^N\cdot {\mathbf n})_{\Gamma_N} - (f,q)_\Omega.
\end{align*}
Treating the Dirichlet boundary condition $p = p^D$ strongly requires us to
split into $p=p_{hom} + p_{inhom}$ where $p_{inhom}$ fulfills the inhomogeneous
boundary conditions. Provided $g\in H^{1/2}(\Omega)$ the trace operator acts
as a lifting operator here to construct $p_{inhom}$.
For $p_{hom}$ we then have to solve
\begin{align*}
A(\{{\mathbf u},p_{hom}\},\{{\mathbf v},q\}) &= F(\{{\mathbf v},q\}), \\
A(\{{\mathbf u},p_{hom}\},\{{\mathbf v},q\})
  &= ({\mathbf v}, K^{-1}{\mathbf u})_\Omega +({\mathbf v}, \nabla p_{hom})_\Omega
     + (\nabla q,{\mathbf u})_\Omega \\
F(\{{\mathbf v},q\})
  &= (q, {\mathbf u}^N\cdot {\mathbf n})_{\Gamma_N}-
     ({\mathbf v}, \nabla p_{inhom})_\Omega - (f,q)_\Omega.
\end{align*}

There doesn't exist a continuous trace operator
\begin{align*}
 \Vert T f \Vert_{L^2(\partial \Omega)}\le C \Vert f \Vert_{L^2(\Omega)}
\end{align*}
in $L^2(\Omega)$.

The corresponding dual weak form is then given as: \\
Find $(u,q)\in V\times Q=H^\textrm{div}(\domain)\times L^2(\domain)$ such that
\begin{align*}
A(\{{\mathbf u},p\},\{{\mathbf v},q\}) &= F(\{{\mathbf v},q\}), \\
A(\{{\mathbf u},p\},\{{\mathbf v},q\}) &=
  ({\mathbf v}, K^{-1}{\mathbf u})_\Omega - ({\textrm{div}}\ {\mathbf v}, p)_\Omega
  - (q,{\textrm{div}}\ {\mathbf u})_\Omega \\
F(\{{\mathbf v},q\}) &= -(p^D,{\mathbf v}\cdot {\mathbf n})_{\partial\Omega} -(f,q)_\Omega
\end{align*}
where $V_0$ and $Q_0$ are the homogeneous spaces corresponding to $V$ and $Q$.
Here, we are enforcing $u\cdot n = u^N \cdot n$ strongly. Again, the trace operator can be used
for the lifting and the equations for the homogeneous part read
\begin{align*}
A(\{{\mathbf u}_{hom},\},\{{\mathbf v},q\}) &= F(\{{\mathbf v},q\}), \\
A(\{{\mathbf u}_{hom},p\},\{{\mathbf v},q\})
  &= ({\mathbf v}, K^{-1}{\mathbf u}_{hom})_\Omega
  - ({\textrm{div}}\ {\mathbf v}, p)_\Omega - (q,{\textrm{div}}\ {\mathbf u}_{hom})_\Omega \\
F(\{{\mathbf v},q\})
  &= -(p^D,{\mathbf v}\cdot {\mathbf n})_{\partial\Omega}
     -({\mathbf v}, K^{-1}{\mathbf u}_{inhom})_\Omega\\
     &\quad+ (q,{\textrm{div}}\ {\mathbf u}_{inhom})_\Omega - (f,q)_\Omega
\end{align*}
\end{solution}
\end{Problem}

\begin{Lemma}{darcy-reduced-wellposed}
  Let $V=\Hdiv(\domain)$ and $Q=L^2(\domain)$ with their norms. Let
  \begin{gather}
    \label{eq:darcy:12}
    V_0 = \ker{B} = \bigl\{v\in V\big\vert
    \form(\div v,q) =0 \;\forall q\in Q\bigr\}.
  \end{gather}
  Assume there exist constants $\ellipa$ and $\norm a$ such that
  \begin{gather}
    \label{eq:darcy:13}
    \ellipa \abs{\xi}^2
    \le \xi^T K^{-1} \xi \le \norm a \abs{\xi}^2
    \qquad\forall \xi\in\R^d.
  \end{gather}
  Then, there holds
  \begin{xalignat}2
    \label{eq:darcy:14}
    a(u,v) & \le \norm a \norm{u}_V \norm{v}_V
    & \forall u,v&\in V\\
    \label{eq:darcy:15}
    a(u,u) & \ge \ellipa \norm{u}_V^2
    & \forall u &\in \ker B.
  \end{xalignat}
\end{Lemma}

\begin{remark}
  Differing from the Stokes problem, ellipticity of $a(.,.)$ cannot be
  extended to the whole space $V$. This is going to be the major
  difference between this chapter and the previous.
\end{remark}

\begin{Lemma}{darcy-infsup}
  Let $V=\Hdiv(\domain)$ and $Q=L^2(\domain)$ with their norms.  Then,
  the inf-sup condition
  \begin{gather}
    \inf_{q\in Q} \sup_{v\in V} \frac{b(v,q)}{\norm{v}_V\norm{q}_Q}
    \ge \beta
  \end{gather}
  holds with a constant $\beta$ depending on the domain.
\end{Lemma}

\begin{proof}
  We can use the construction leading to
  \slideref{Corollary}{stokes-iso}. In fact, since the norm of $\Hdiv$
  is weaker than the one of $H^1$, the same function $v$ can be chosen
  in the Stokes inf-sup condition~\eqref{eq:stokes:1}, yielding a
  constant $\beta$ not worse than for Stokes.
\end{proof}

Combining these lemmas yields the assumptions of
\slideref{Theorem}{infsup-mixed2}. Thus, we have proven:

\begin{Theorem}{darcy-well-posed}
  Under the assumptions on \slideref{Lemma}{darcy-reduced-wellposed},
  the \putindex{dual mixed formulation} is well-posed.
\end{Theorem}

\section{Discretization of dual mixed problems}

\subsection{Conforming subspaces of $\Hdiv(\domain)$}

\begin{intro}
  Our goal in this section is the derivation of general criteria
  applying to the approximation of $\Hdiv(\domain)$ by piecewise
  polynomial functions. This affects in particular continuity
  conditions and the properties of $\ker{B_h}$.

  As be before, we will assume that all families of meshes $\mesh_h$
  for $h\to 0$ are shape-regular. We will also assume that meshes are
  regular, unless otherwise stated.
\end{intro}

\begin{Lemma}{normal-continuity}
  Let $\mesh_h$ be a subdivision of the domain $\domain$. Let the
  space $V_h$ be cell-wise polynomial. We have $V_h \subset
  \Hdiv(\domain)$ if and only if on each interior face $\face$
  between two cells $\cell_1$ and $\cell_2$ holds
  \begin{gather}
    v_1 \cdot \n_1 + v_2 \cdot\n_2 = 0.
  \end{gather}
  Here, $v_1$ and $v_2$ are the traces of the functions on $\face$
  from each cell.
\end{Lemma}

\begin{proof}
  Since $V_h$ is by definition finite dimensional, all norms are
  bounded. It remains to show that the distributional divergence is
  in $L^2(\domain)$, that is, all its contributions which are Borel
  measures of faces vanish. To this end, let $\phi\in
  C^\infty_{00}(\domain)$ be a test function such that its support
  does not have a nonempty intersection with any face except
  $\face$. Then, we have by Green's formula for $u\in V_h$
  \begin{gather*}
    \form(\div u,\phi) = -\form(u,\nabla \phi)
    + \forme(u_1 \cdot \n_1 + u_2 \cdot\n_2, \phi)_F
  \end{gather*}
  We have $\div u \in L^2(\domain)$ if and only if the face term
  vanishes.
\end{proof}

\begin{Problem}{h1-continuity}
  Show that the corresponding condition for $H^1$-conforming finite elements
  is continuity of the function. In particular, this implies continuity at
  vertices.
\begin{solution}
  Let $\phi\in (C^\infty_{00}(\domain))^d$ be a test function such that its support
  does not have a nonempty intersection with any face except
  $\face$. Then, we have by Green's formula for $u\in V_h$
  \begin{gather*}
    \form(\nabla u,\phi) = -\form(u,\nabla \cdot \phi)
    + \forme(u_1 - u_2,n_1 \cdot \phi)_F
  \end{gather*}
  and thus require $\forme(u_1 - u_2, \phi)_F = 0$ for all $\phi\in C^\infty_{00}(\domain)$.
  This implies $u_1=u_2$ and in particular continuity at the vertices.
\end{solution}
\end{Problem}

\begin{remark}
  The continuity of the normal component over faces does not imply
  continuity at vertices, since it is not transferred in tangential
  direction.

  As a consequence of this remark, part of the construction of
  $\Hdiv$-conforming finite element spaces consists of defining a
  polynomial trace space on each face, such that continuity of normal
  traces can be established by this space.
\end{remark}

\begin{intro}
  In \slideref{Lemma}{darcy-reduced-wellposed}, we saw that the
  bilinear form $a(.,.)$ is elliptic only on the kernel of
  $B$. Indeed, for the simplest case with $K\equiv 1$, we conclude
  that the uniform estimate for $v_h\in \ker{B_h}$
  \begin{gather*}
    \norm{v_h}^2_{L^2}
    \ge \ellipa \norm{v_h}^2_{\Hdiv}
    = \ellipa \bigl(\norm{v_h}^2_{L^2} + \norm{\div v_h}^2_{L^2}\bigr),
  \end{gather*}
  necessary for quasi-bestapproximation requires a constant $c$
  independent of $h$ such that
  \begin{gather*}
    \norm{\div v_h}^2_{L^2} \le c \norm{v_h}^2_{L^2}
    \qquad\forall v_h\in\ker{B_h}.
  \end{gather*}
  The inverse estimate is insufficient by two powers of $h$, such that
  this is actually a hard condition. Therefore, we focus on
  methods where
  \begin{gather}
    \label{eq:darcy:16}
    \ker{B_h} \subset \ker B.
  \end{gather}
\end{intro}

\begin{remark}
  A particularly elegant way to achieve~\eqref{eq:darcy:16} is the
  choice
  \begin{gather}
    \label{eq:darcy:17}
    \div V_h = Q_h.
  \end{gather}
  We will indeed focus on methods with this property.
\end{remark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Finite elements on simplices}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{intro}
  Simplicial elements based on the polynomial spaces $\P_k$ of
  polynomials of total degree less or equal $k$ can be defined on the
  actual mesh cell. We present here the two most common families.
\end{intro}

\begin{Definition}{rt-simplex}
  The \define{Raviart-Thomas element} of degree $k \ge 0$ on simplices
  consists of the polynomial space
  \begin{gather}
    \label{eq:darcy:18}
    RT_k = \P_k^d + x\P_k.
  \end{gather}
  Its \putindex{node functionals} are
  \begin{xalignat}3
    \label{eq:darcy:19}
    \nodal_{1,i,j}(v) &= \int_{\face_i} v\cdot\n \,q_j\ds
    & q_j&\in \P_k(\face_i)
    & \face_i &\subset \d\cell, \\
    \label{eq:darcy:20}
    \nodal_{2,i}(v) &= \int_\cell v\cdot w_i \dx
    & w_i &\in \P_{k-1}^d(\cell).
  \end{xalignat}
  Here, and in further definitions of this kind, the notation $q_j$
  and $w_i$ indicate that we choose a basis for the polynomial spaces.
\end{Definition}

\begin{remark}
  In equation~\eqref{eq:darcy:19}, the $\face_i$ are all faces of the
  simplex, that is, three edges in two dimensions and four triangular
  faces in three dimensions.

  If the simplex $\cell$ is obtained by affine transformation from the
  reference simplex $\refcell$, the definitions of the space $RT_k$
  directly on the cell $\cell$ and by mapping from $\refcell$
  coincide. Therefore, we can use arguments by mapping or without at
  our convenience.

  For $k=0$ there are no nodal values of type $\nodal_{2,i}$ since all
  gradients of functions in $\P_0$ are zero.

  The unisolvence will be shown in
  \slideref{Lemma}{rt-simplex-unisolvence}. But first, we have to look
  at some important properties.
\end{remark}

\begin{Example}{rt-simplex}
  The first members of the Raviart-Thomas family on triangles are
  \begin{center}
    \begin{tabular}{c@{\hspace{.05\textwidth}}c@{\hspace{.05\textwidth}}c}
      \includegraphics[width=.25\textwidth]{./fig/rt0-tri.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/rt1-tri.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/rt2-tri.tikz}
      \\[5mm]
      \includegraphics[width=.25\textwidth]{./fig/p0-p.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/dgp1-p-tri.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/dgp2-p-tri.tikz}
    \end{tabular}
  \end{center}
\end{Example}

\begin{Lemma}{rt-simplex-1}
  For any simplex $\cell\in\R^d$ we have for
  any $v\in RT_k$ and any $\face\subset\d\cell$
  \begin{align}
    \label{eq:darcy:21}
    \div v &\in \P_k(\cell), \\
    \label{eq:darcy:26}
    v\cdot\n_{|\face} &\in \P_k(\face).
  \end{align}
  The divergence operator is surjective from $RT_k$ to
  $\P_k$, hence
  \begin{gather}
    \label{eq:darcy:22}
    \div RT_k = \P_k.
  \end{gather}
  For the divergence free functions holds
  \begin{gather}
    \label{eq:darcy:24}
    RT_{k,0} = \bigl\{v\in RT_k \big\vert
    \div  v=0\bigr\} \subset \P_k^d.
  \end{gather}
\end{Lemma}

\begin{proof}
  We write an arbitrary element $v\in RT_k$ as $v=v_0+x p_k$ where
  $v_0\in \P_k^d$ and $p_k\in \P_k$. Clearly, $\div v_0 \in
  \P_{k-1}$. On the other hand,
  \begin{gather*}
    \div (x p_k) = \div x p_k + x\nabla p_k = d p_k + x q,
  \end{gather*}
  where $q\in \P_{k-1}^d$. Therefore, $\div(x p_k) \in \P_k$ and so is
  $\div v$.

  For a given face $\face$, choose $x_0\in\face$. Every other point
  $x\in \F$ can be represented as $x=x_0+ \tau$, where $\tau$ is a
  vector tangential to $\face$. Therefore, using the same splitting of
  $v$ as above
  \begin{gather*}
    v\cdot\n = v_0\cdot\n + p_k (x\cdot\n)
    = v_0\cdot\n + p_k (x_0\cdot\n + \tau\cdot\n).
  \end{gather*}
  The last term vanishes by definition of $\tau$ and $\n$ and the two
  other terms are both in $\P_k$.

  Finally, we show surjectivity of the divergence operator. We show
  indeed that the divergence is surjective from
  $\tilde V = (x-x_c)\P_k$ to $\P_k$, where $x_c$ is the center of
  $\cell$. Note that $x_c\P_k\in \P_k^d$ such that
  $\tilde V\subset RT_k$. Furthermore, $\tilde V$ and $\P_k$ have the
  same dimension. Therefore, it is sufficient to show that the
  divergence is injective. For simplicity, we assume $x_c=0$. Then,
  for any $p\in \P_k$
  \begin{align*}
    \int_\cell \div (x p)p \dx
    &= d \int_\cell p^2\dx + \int_\cell x \cdot\nabla p p\dx
    \\
    &= d \int_\cell p^2 + \frac12 \int_\cell x \cdot\nabla(p^2)\dx
    \\
    &= \frac d2 \int_\cell p^2 + \frac12 \int_{\d\cell} (x\cdot\n) p^2\ds.
  \end{align*}
  Thus, $\div(x p) = 0$ implies $p=0$ and thus $x p=0$, which proves the
  injectivity. Using the same idea, we see that $\div v=0$ for
  $v=v_0+x p$ implies $x p=0$ and thus $v=v_0\in\P_k^d$.
\end{proof}

\begin{Lemma}{rt-simplex-dimension}
  There for the simplicial Raviart-Thomas element in $\R^d$ there
  holds
  \begin{gather}
    \label{eq:darcy:25}
    \begin{split}
      \dim RT_k &= (d+1)\dim\P_k - \dim \P_{k-1}
      \\
      &= (d^2+k d+d)\frac{(k+d-1)!}{d!k!}.
    \end{split}
  \end{gather}
  In particular,
  \begin{gather}
    \label{eq:darcy:23}
    \dim RT_k =
    \begin{cases}
      (k+1)(k+3) & d=2,
      \\
      \tfrac12 (k+1)(k+2)(k+4) & d=3.
    \end{cases}
  \end{gather}
\end{Lemma}

\begin{proof}
  First, we observe that
  \begin{gather*}
    RT_k = \P_k^d \oplus x\breve\P_k,
  \end{gather*}
  where $\breve \P_k$ is the space of \putindex{homogeneous
    polynomials} of degree $k$, that is, those strictly of degree
  $k$. There also holds
  \begin{gather*}
    \P_{k} = \P_{k-1} \oplus \breve \P_k.
  \end{gather*}
  Hence,
  \begin{gather*}
    \dim RT_k = d \dim \P_k + \dim\breve\P_k = d \dim \P_k + \dim \P_k
    - \dim \P_{k-1},
  \end{gather*}
  which proves the general formula. Using
  \begin{gather}
    \dim\P_k
    =\frac1{d!} \frac{(k+d)!}{k!}
    =
    \begin{cases}
      \frac{(k+1)(k+2)}{2} & d=2,\\
      \frac{(k+1)(k+2)(k+3)}{6} & d=3,
    \end{cases}
  \end{gather}
  proves the explicit formulas.
\end{proof}

\begin{Lemma}{rt-simplex-unisolvence}
  The Raviart-Thomas element with the nodal values in
  \slideref{Definition}{rt-simplex} is unisolvent.
\end{Lemma}

\begin{proof}
  As usual, the proof consists of two parts: first, we prove that the
  number of node functionals equals the dimension of $RT_k$. To this
  end, we observe that
  \begin{gather}
    \label{eq:darcy:32}
    \dim \P_k(\R^d) = \frac1{d!} \frac{(k+d)!}{k!}
%    = \frac{k+d}d \frac1{(d-1)!} \frac{(k+d-1)!}{k!}
    = \frac{k+d}d \dim \P_k(\R^{d-1}).
  \end{gather}
  The number of node functionals is
  \begin{align*}
    N &= (d+1) \dim \P_k(\R^{d-1}) + d \dim \P_{k-1}(\R^d)
    \\
    &= (d+1)\frac{(k+d-1)!}{(d-1)!k!}
      + d\frac{(k+d-1)!}{d! (k-1)!}\\
    &= (d^2+d+k d)\frac{(k+d-1)!}{d!k!}
  \end{align*}
  Thus, the number of node functionals is equal to the dimension of
  $RT_k$. Therefore, every element in $RT_k$ is uniquely determined
  by the node functionals if and only if for $v\in RT_k$
  \begin{gather*}
    \left\{
      \begin{array}{r@{\,}ll}
        \nodal_{1,i,j}(v) &=0 &\forall i,j
        \\
        \nodal_{2,i}(v) &=0 &\forall i
      \end{array}
      \right\}
      \quad\Longrightarrow\quad
      v=0.
  \end{gather*}
  To this end, we first observe that due to~\eqref{eq:darcy:26} the
  node functionals $\nodal_{1,i,j}$ for $j=1,\dots,\dim \P_k(\face_i)$
 uniquely determine $v$ on each face $\face_i$. Therefore,
 \begin{gather*}
   \bigl\{\nodal_{1,i,j}(v) =0 \quad\forall i,j\bigr\}
   \quad\Longrightarrow\quad
   v\in \Hdiv_0(\cell).
 \end{gather*}
 Next, we test~\eqref{eq:darcy:20} with $w=\nabla q$ and $q\in
 \P_k$ arbitrary. After integration by parts, this implies $v\in
 RT_{k,0} \cap \Hdiv_0(\cell) \subset \P_k^d$.

 For the remaining part of the proof, we need a result which will be
 presented later in full generality. At this point, we only mention
 that in two dimensions, the space $V_0$ of divergence free functions
 in $L^2(\cell)$ has the representation
 \begin{gather}
   \label{eq:darcy:34}
   V_0 = \left\{ \vcurl \phi
     \big\vert \; \phi\in H^1(\cell) \right\},
   \qquad
   \vcurl \phi = \begin{pmatrix}
     \d_2 \phi \\ -\d_1 \phi
   \end{pmatrix}
 \end{gather}

 We also notice that $v\cdot n = \d_{\tau} \phi$, where $\tau$ is the
 tangential vector with the domain $\cell$ on the right. Thus,
 $v\in \Hdiv_0(\cell)$ implies $\phi$ is constant on the
 boundary. Since moreover we only use derivatives of $\phi$, we can
 choose $\phi \in H^1_0(\cell)$. Finally, since $v\in RT_{k,0}$, we
 have $\phi\in\P_{k+1}$. Any function $\phi$ with these properties can
 be expressed by the cubic bubble function as
 \begin{gather*}
   \phi = b_\cell \psi \qquad\psi\in \P_{k-2}.
 \end{gather*}
We conclude the proof with
\begin{gather*}
  0 = \int_\cell v\cdot w \dx = \int_\cell
  \curl\phi \cdot w\dx
  = \int_\cell b_\cell \psi (\d_2 w - \d_1 w)\dx.
\end{gather*}
Choose $w$ such that $\d_2 w-\d_1 w = \psi$ to obtain $\psi=0$.
\end{proof}

\begin{Definition}{bdm-simplex}
  The \define{BDM element} (Brezzi-Douglas-Marini) of degree $k \ge 1$
  on simplices consists of the polynomial space
  \begin{gather}
    \label{eq:darcy:27}
    BDM_k = \P_k^d.
  \end{gather}
  Its \putindex{node functionals} are
  \begin{xalignat}3
    \label{eq:darcy:28}
    \nodal_{1,i,j}(v) &= \int_{\face_i} v\cdot\n \,q_j\ds
    & q_j&\in \P_k(\face_i)
    & \face_i &\subset \d\cell,
    \\
    \label{eq:darcy:29}
    \nodal_{2,i}(v) &= \int_\cell v\cdot \nabla q_i \dx
    & q_i &\in \P_{k-1}(\cell).
    \\
    \label{eq:darcy:30}
    \nodal_{3,i}(v) &= \int_\cell v\cdot w_i \dx
    & w_i &\in V_{k,0}(\cell),
  \end{xalignat}
  where
  \begin{gather}
    \label{eq:darcy:31}
    V_{k,0}(\cell) = \bigl\{
    v\in \P_k^d(\cell)\cap \Hdiv_0(\cell) \big\vert
    \;\div v=0 \bigr\}.
  \end{gather}
\end{Definition}

\begin{Example}{bdm-simplex}
  The first members of the BDM family on triangles are
  \begin{center}
    \begin{tabular}{c@{\hspace{.2\textwidth}}c}
      \includegraphics[width=.25\textwidth]{./fig/bdm1-tri.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/bdm2-tri.tikz}
      \\[5mm]
      \includegraphics[width=.25\textwidth]{./fig/p0-p.tikz}
      &
      \includegraphics[width=.25\textwidth]{./fig/dgp1-p-tri.tikz}
    \end{tabular}
  \end{center}
\end{Example}

\begin{Lemma}{bdm-simplex-unisolvence}
  The BDM element with the nodal values in
  \slideref{Definition}{bdm-simplex} is unisolvent.
\end{Lemma}

\begin{proof}
  % Again, we begin by counting the shape functions, which,
  % using~\eqref{eq:darcy:32} yields
  % \begin{gather}
  %   \label{eq:darcy:33}
  %   \dim BDM_k(\cell) = d\dim \P_k(\R^d)
  %   = \frac1{(d-1)!} \frac{(k+d)!}{k!}.
  % \end{gather}
  Let $v\in BDM_k(\cell)$.
  First, we note that $\div BDM_k \subset \P_{k-1}$. Therefore,
  setting the
  node functionals in~\eqref{eq:darcy:28} and~\eqref{eq:darcy:29} to
  zero implies $v\in V_{0,k}$. But then, the remaining node
  functionals are an inner product on $V_{0,k}$ and thus $v=0$.
\end{proof}

\begin{remark}
  What is missing here is a characterization of the space
  $V_{0,k}$. Thus, we cannot really implement the method
  yet. Furthermore, we cannot verify that the node functionals form a
  dual basis for $BDM_k(\cell)$. The answer to these questions will be
  given in Chapter~\ref{cha:derham}.
\end{remark}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Stability by commuting diagrams}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{intro}
  Again, we show stability by constructing a \putindex{Fortin
    projection}. To this end, we show that the nodal interpolation of
  the Raviart-Thomas and BDM families indeed commute with the
  divergence operator. We first show that this holds for smooth
  functions and then discuss the extension to functions in
  $\Hdiv(\domain)$.
\end{intro}

\begin{Definition}{canonical-interpolation}
  Let a finite element be defined by its shape function space
  $\mathcal P_\cell$ and the \putindex{node functionals} $\nodal_i$
  for $i=1,\dots,n$ where $n=\dim\mathcal P_\cell$. Let $\{\phi_j\}$
  be the basis of $\mathcal P_\cell$ such that
  \begin{gather*}
    \nodal_i(\phi_j) = \delta_{ij}
    \qquad i,j=1,\dots,n.
  \end{gather*}
  Then, the operator $I_h\colon C^\infty(\cell)\to \mathcal P_\cell$
  defined for any $f\in C^\infty(\cell)$ by
  \begin{gather}
    I_h(f) = \sum_{i=1}^n \nodal_i(f) \phi_i,
  \end{gather}
  is called the \define{canonical interpolation} operator. The
  definition applies to vector valued elements replacing
  $C^\infty(\cell)$ by $C^\infty(\cell;\R^d)$.
\end{Definition}

\begin{remark}
  For a vector polynomial space $\mathcal V_\cell$, we define its
  divergence space
  \begin{gather*}
    \mathcal P_\cell = \div \mathcal V_\cell.
  \end{gather*}
  From \slideref{Lemma}{rt-simplex-1}, we obtain
  \begin{gather}
    \label{eq:darcy:37}
    \div RT_k = \P_k.
  \end{gather}
  For the BDM family, it is easy to verify
  \begin{gather*}
    \div BDM_k = \P_{k-1}.
  \end{gather*}
\end{remark}

\begin{Lemma}{commuting-diagram-hdiv}
  Let $I_h\colon C^\infty(\cell;\R^d)\to \mathcal V_\cell$ be the
  canonical interpolation onto the space $\mathcal V_\cell$, which is
  either $RT_k(\cell)$ or $BDM_{k+1}(\cell)$. Let $\mathcal P_\cell = \div
  \mathcal V_\cell = \P_k$ and $\Pi_h\colon C^\infty(\cell)\to \mathcal
  P_\cell$ be the $L^2$-projection onto $\mathcal P_\cell$. Then, the
  diagram
  \begin{gather}
    \label{eq:darcy:35}
    \begin{CD}
      C^\infty(\cell;\R^d) @>\div>> C^\infty(\cell) \\
      @V{I_h}VV @VV{\Pi_h}V\\
      \mathcal V_\cell @>\div>> \mathcal P_\cell
    \end{CD}
  \end{gather}
  commutes, that is, for any $v\in C^\infty(\cell;\R^d)$, there holds
  \begin{gather}
    \label{eq:darcy:36}
    \div (I_h v) = \Pi_h(\div v).
  \end{gather}
\end{Lemma}

\begin{proof}
  Let $v\in C^\infty(\cell;\R^d)$ and $q\in C^\infty(\domain)$ be
  chosen arbitrarily. Then,
  \begin{gather*}
    \int_\cell q(\div (I_h v) - \div v)\dx
    = \int_\cell(v-I_h v) \cdot \nabla q\dx
    - \int_{\d\cell} (v-I_h v)\cdot\n q \ds
  \end{gather*}
  Let now $q\in \mathcal P_\cell$ chosen as
  \begin{gather*}
    q = \Pi_h (\div (I_h v) - \div v).
  \end{gather*}
  Then, the left hand side of the equation above becomes
  $\norm{\div(I_h v) - \Pi_h(\div v)}_\cell^2$. The first integral on
  the right vanishes by testing~\eqref{eq:darcy:20} with
  $\nabla q$ and by testing~\eqref{eq:darcy:29} with $q$,
  respectively.
  The same holds for the second integral using the node values in
  equations~\eqref{eq:darcy:19} and~\eqref{eq:darcy:28},
  respectively. Thus, we have proven $\div (I_h v) = \Pi_h(\div v)$.
\end{proof}

\begin{remark}
  The next natural step is the extension of $I_h$ to
  $\Hdiv(\domain)$. Then, $I_h$ would be our Fortin
  projection. Unfortunately, this is not possible, as the following
  example shows. Meanwhile, we note that the operator $I_h$ is
  well-defined on the space $\tilde V=\Hdiv(\domain) \cap H^s(\domain;\R^d)$
  for any $s>0$. Thus, if the domain allows for an inf-sup condition
  of the form
  \begin{gather*}
    \inf_{q\in Q}\sup_{v\in \tilde V} \frac{(\div
      v,q)}{\norm{v}_{\tilde V}\norm{q}_Q} \ge \beta > 0,
  \end{gather*}
  then we are done here. The case of minimal regularity will require
  us to extend the ideas of the Clément interpolant to commuting
  interpolation operators, which will be done in
  Chapter~\ref{cha:derham}.
\end{remark}

\begin{example}
  The trace theorem involves the space $H^{-1/2}(\d\domain)$, which
  requires a short discussion. On one dimensional boundaries, elements
  in $H^{1/2}(\d\domain)$ have continuous representatives. The
  situation in three dimensions is similar, where no jumps across a
  line, for instance between two faces is allowed. Therefore,
  functions in $H^{-1/2}(\d\domain)$ cannot be localized to parts of
  the boundary, for instance the edge of a cell.

  We give an example (modified from \cite[Section
  2.5.1]{BoffiBrezziFortin13}) of this phenomenon.  On the disc
  $\mathcal D$ around the origin of radius $e^{-1}$ consider the
  function
  \begin{gather*}
    u(x,y) = \ln\Bigl(-\ln\bigl(\sqrt{x^2+y^2}\bigr)\Bigr).
  \end{gather*}
  There holds $u\in H^1_0(\mathcal D)$. Now, consider the domain
  $\domain$ consisting only of the upper half circle:
  \begin{align*}
    \domain &= \bigl\{(x,y)\in \R^2 \big\vert
              x^2+y^2<e^{-2} \text{ and } y>0 \bigr\}
    \\
    \d\domain &= [-e^{-1},e^{-1}] \times \{0\}
                \cup \bigl\{ (x,\sqrt{e^{-2}-x^2}) \big\vert
                x\in (-e^{-1},e^{-1}) \bigr\}
  \end{align*}
  Thus, the trace of $u$ on the boundary is in
  $H^{1/2}(\d\domain)$. We now define $\mu\in H^{-1/2}(\d\domain)$ as
  the distributional derivative in tangential direction, say
  counter-clockwise,
  \begin{gather*}
    \scal(\mu,\phi) = - \int_{\d\domain} u \d_{\tau} \phi
    \qquad\forall \phi\in C^1(\d\domain).
  \end{gather*}

  Computation yields
  \begin{gather*}
    \mu(x) = \frac1{x\ln \abs{x}} \times
    \begin{cases}
      1 & x\in (-e^{-1},0) \\
      -1& x\in (0,e^{-1})\\
       0& x\not\in (-e^{-1},e^{-1}).
    \end{cases}
  \end{gather*}
  Both integrals
  \begin{gather*}
    \int_{-e^{-1}}^0 \mu(x)\dx
    \qquad
    \int^{e^{-1}}_0 \mu(x)\dx,
  \end{gather*}
  are not bounded, such that on these parts of the boundary, $\mu$
  cannot even be tested with a constant function.
  Now, we consider the integral
  \begin{gather*}
    \forme(\mu,\phi) = \int_{-e^{-1}}^{e^{-1}} \ln(-\ln\abs x) \d_\tau \phi \dx.
  \end{gather*}
  If we split $\phi$ into an odd and an even part, the integral with
  the even part vanishes, since $\ln(-\ln\abs x)$ is even and the
  derivative is odd. Therefore,
  \begin{gather*}
    \forme(\mu,\phi)
    = \int_{-e^{-1}}^{e^{-1}}
    \frac{\phi_{\text{odd}}(x)}{x\ln\abs x} \dx
  \end{gather*}
  Finally, we use the fact that $\phi_{\text{odd}}(0) = 0$ and that
  it's growth is limited by its regularity. In order to be square
  integrable, the growth of $\phi_{\text{odd}}$ must be limited by a
  positive, fractional power,
  \begin{gather*}
    \abs{\phi_{\text{odd}}(x)} \le c \abs x^\alpha,
    \qquad \alpha>0.
  \end{gather*}
  Then,
  \begin{gather*}
    \int_0^{e^{-1}} \frac{\abs{\phi_{\text{odd}}(x)}}{x\ln\abs x} \dx
    \le \frac{x^{\alpha-1}}{\ln\abs x} \dx < \infty.
  \end{gather*}
\end{example}

\begin{intro}
  Very much like the construction of Clément for $H^1(\domain)$, we
  define interpolation operators stable on $\Hdiv(\domain)$ by
  replacing the face integrals by volume integrals. We only have to
  make sure we do not destroy conformity with $\Hdiv(\domain)$, in
  particular continuity of normal components. But, this can be
  achieved by integrating over both cells adjacent to a face and using
  this integral for interpolation.
\end{intro}

\begin{Definition}{hdiv-clement}
  An $\Hdiv$-stable interpolation operator is obtained from
  \slideref{Definition}{canonical-interpolation} of the
  \putindex{canonical interpolation}
  \begin{enumerate}
  \item by choosing the standard degrees of freedom for every cell
    integral as in~\eqref{eq:darcy:20}, ~\eqref{eq:darcy:29},
    and~\eqref{eq:darcy:30}, and
  \item by replacing every face integral as in~\eqref{eq:darcy:19}
    and~\eqref{eq:darcy:28} by integrals of the form
    \begin{gather}
      \int_{\face} f\cdot\n \,q \ds
      \to
      c_q \int_{\domain_\face} f\cdot \n \,q \dx,
    \end{gather}
    where $\domain_\face$ consists of the cells sharing $\face$ and
    $c_q$ is a normalization constant.
  \end{enumerate}
\end{Definition}

Summarizing the results from this section and applying the general
theory, in particular \slideref{Corollary}{galerkin-mixed-u-kerb} and
\slideref{Theorem}{galerkin-mixed-p}, we obtain

\begin{Theorem}{darcy-quasi-best}
  Let $V_h\subset V\subset \Hdiv(\domain)$ and $Q_h\subset Q$ be
  chosen such that an $\Hdiv$-stable commuting interpolation operator
  exists. Then, the solutions $(u,p) \in V\times Q$ and
  $(u_h,p_h) \in V_h\times Q_h$ admit the \putindex{quasi-optimality}
  estimates
  \begin{align}
    \norm{u-u_h}_{\Hdiv} & \le c_1 \inf_{v\in V_h} \norm{u-v_h}_{\Hdiv} \\
    \norm{p-p_h}_{L^2} & \le c_2 \inf_{v\in V_h} \norm{u-v_h}_{\Hdiv}
                         + c_3 \inf_{q\in Q_h} \norm{p-q_h}_{L^2}.
  \end{align}
\end{Theorem}

\begin{Corollary}{darcy-convergence}
  The elements $RT_k$ and $BDM_{k+1}$ with their matching pressure
  space $\P_k$ admit the error estimates
  \begin{align}
    \norm{u-u_h}_{L^2} &\le c h^{k+1} \snorm{u}_{H^{k+1,\text{div}}} \\
    \norm{\div u-\div u_h}_{L^2} &\le c h^{k+1} \snorm{u}_{H^{k+1,\text{div}}} \\
    \norm{p-p_h}_{L^2} &\le c h^{k+1}
                         \bigl(\snorm{u}_{H^{k+1,\text{div}}}
    + \snorm{p}_{H^{k+1}} \bigr),
  \end{align}
  where
  \begin{gather}
    \snorm{u}_{H^{k+1,\text{div}}}^2 = \snorm{u}_{H^{k+1}}^2
    + \snorm{\div u}_{H^{k+1}}^2.
  \end{gather}
\end{Corollary}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Finite elements on quadrilaterals and hexahedra}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{intro}
  Shape functions for quadrilaterals and hexahedra can only be defined
  on a reference cell. But, when mapping from a reference cell
  $\refcell$ to the actual mesh cell $\cell$, we have to preserve the
  information whether a vector field is normal or tangential to a
  face. To this end, we recapitulate the basic notation and properties
  of the transformation of scalar fields and then add the definition
  for vector fields in $\Hdiv(\domain)$.
\end{intro}

\begin{Notation}{recap-reference-transform}
  Let $\refcell$ be a reference cell, either the reference
  simplex spanned by $\{0,e_1,\dots,e_d\}$ or the reference hypercube
  $[-1,1]^d$. Then, a mesh cell $\cell\in\mesh_h$ is defined as the
  image of $\widehat \cell$ under a mapping $\Phi$ (we suppress the
  index $\cell$ and understand that $\Phi$ is different for every
  cell). We define the Jacobi matrix, the Jacobi determinant, and the
  face Jacobian
  \begin{gather}
    \mathrm D\Phi(\widehat x) = \Bigl(\d_j\Phi_i\Bigr),
    \qquad
    \mathrm J(\widehat x) = \det \mathrm D\Phi(\widehat x),
    \qquad
    \mathrm J_n(\widehat x) = J
    \abs{\mathrm D\Phi^{-T}(\widehat x) \widehat\n},
  \end{gather}

 The basic relations are for $\widehat x\in\widehat \cell$ and
  shape functions $\widehat p$:
  \begin{gather}
    x = \Phi(\widehat x),
    \qquad p(x) = \widehat p(\widehat x)
    \qquad \nabla p(x) = \mathrm D\Phi^{-T}(\widehat x)
    \widehat\nabla\widehat p(\widehat x).
  \end{gather}
  Integrals transform as
  \begin{xalignat*}2
    \int_\cell p \dx &= \int_{\refcell} \widehat p J \dxref
    &
    \int_{\d\cell} p \ds &= \int_{\d\refcell} \widehat p J_n \dsref.
  \end{xalignat*}
\end{Notation}

\begin{Definition}{Piola-transform}
  The \define{Piola transform} or \putindex{contravariant}
    transformation of a vector field under the mapping
  $\Phi\colon\refcell\to\cell$ is the mapping
  \begin{gather}
    v(x) = \tfrac1{\mathrm J} \mathrm D\Phi \widehat v(\widehat x).
  \end{gather}
  There holds
  \begin{gather}
    \nabla v(x) = \tfrac1{\mathrm J} \mathrm D\Phi
    \bigl[\widehat\nabla \widehat v(\widehat x)\bigr] \mathrm D\Phi^{-1},
    \qquad
    \div v(x) = \tfrac1{\mathrm J} \widehat\nabla\!\cdot\!
    \widehat v(\widehat x).
  \end{gather}
\end{Definition}

\begin{Lemma}{Piola-transform-integrals}
  Let $q$ be a scalar function and $v$ be a \putindex{contravariant}
  vector field mapped by the \putindex{Piola transform}. Then, cell
  and surface integrals are transformed according to the rules
  \begin{gather}
    \begin{split}
      \int_{\cell} v \cdot \nabla q \dx
      &= \int_{\refcell} \widehat v \cdot \widehat \nabla \widehat q \dxref,
      \\
      \int_{\cell} q \div v \dx
      &= \int_{\refcell} \widehat q \widehat \nabla\!\cdot\! \widehat v \dxref,
      \\
      \int_{\d\cell} q v\cdot\n \ds
      &= \int_{\d\refcell} \widehat q \widehat v\cdot\widehat \n \dsref.
    \end{split}
  \end{gather}
\end{Lemma}

\begin{Problem}{Piola-transform-integrals}
  Verify \slideref{Lemma}{Piola-transform-integrals}.
\begin{solution}
  We use the definitions
  \begin{align*}
    p(x) &= \widehat p(\widehat x),&
    \nabla p(x) &= \mathrm D\Phi^{-T}
    \bigl[\widehat\nabla\widehat p(\widehat x)\bigr], \\
    v(x) &= \tfrac1{\mathrm J} \mathrm D\Phi \widehat v(\widehat x), &
    \nabla v(x) &= \tfrac1{\mathrm J} \mathrm D\Phi
    \bigl[\widehat\nabla \widehat v(\widehat x)\bigr] \mathrm D\Phi^{-1}, &
    \div v(x) &= \tfrac1{\mathrm J} \widehat\nabla \cdot
    \widehat v(\widehat x).
  \end{align*}
For the first claim we compute
  \begin{align*}
    \int_{\cell} v \cdot \nabla q \dx
    &= \int_{\refcell}
       \tfrac1{\mathrm J} \mathrm D\Phi \widehat v(\widehat x) \cdot
       \mathrm D\Phi^{-T}\bigl[\widehat\nabla\widehat q(\widehat x)\bigr]
       J \dxref
    = \int_{\refcell} \widehat v \cdot \widehat \nabla \widehat q \dxref.
  \end{align*}
  For the second we get
  \begin{align*}
    \int_{\cell} q \div v \dx
    &= \int_{\refcell}
       \widehat q(\widehat x)
       \tfrac1{\mathrm J} \widehat\nabla \cdot \widehat v(\widehat x)
       J \dxref
    = \int_{\refcell} \widehat q \widehat \nabla\!\cdot\! \widehat v \dxref,
  \end{align*}
  Finally, the last equality holds due to
  \begin{align*}
    \int_{\d\cell} q v\cdot\n \ds
    &= \int_{\cell} \nabla \cdot(q v) \dx
    = \int_{\cell} v\cdot \nabla q + q\nabla \cdot v \dx \\
    &= \int_{\refcell} \widehat v\cdot \widehat \nabla \widehat q
                      + \widehat q \widehat \nabla \cdot \widehat v \dxref
    = \int_{\refcell}\widehat \nabla \cdot(\widehat q \widehat v) \dxref
    = \int_{\d\refcell} \widehat q \widehat v\cdot\widehat \n \dsref.
  \end{align*}

\end{solution}
\end{Problem}

\begin{remark}
  The last equation of the previous lemma indicates, that the
  \putindex{Piola transform} preserves normal components of a vector
  field. Thus, it can be used to define shape functions for normal
  continuity on a reference cell.
\end{remark}

\begin{Notation}{tensor-product-polynomials}
  The space of \putindex{tensor product polynomials} $\Q_k$ in $d$ space
  dimensions is
  \begin{gather}
    \label{eq:darcy:39}
    \begin{split}
    \Q_k(\R^d) &= \underbrace{\P_k(\R) \otimes \dots\otimes \P_k(\R)
    }_{d\text{ factors}},
    \\
    q(x_1,\dots,x_d) &= \prod_{i=1}^d p_i(x_i)
    \qquad p_i\in \P_k(\R).
    \end{split}
  \end{gather}
  Similarly, we define \putindex{anisotropic tensor product} polynomials
  \begin{gather}
    \label{eq:darcy:40}
    \begin{split}
    \Q_{k1,\dots,k_d}(\R^d)
    &= \underbrace{\P_{k_1}(\R) \otimes \dots\otimes \P_{k_d}(\R)
    }_{d\text{ factors}},
    \\
    q(x_1,\dots,x_d) &= \prod_{i=1}^d p_i(x_i)
    \qquad p_i\in \P_{k_i}(\R).
    \end{split}
  \end{gather}
\end{Notation}

\begin{Definition}{rt-quad}
  The \define{Raviart-Thomas element} of degree $k \ge 0$ on the
  reference cell $\refcell = [-1,1]^d$
  consists of the polynomial space
  \begin{gather}
    \label{eq:darcy:38}
    RT_{[k]}(\refcell) = \Q_k^d(\refcell) + x\Q_k(\refcell).
  \end{gather}
  Its \putindex{node functionals} are
  \begin{xalignat}2
    %\label{eq:darcy:19}
    \nodal_{1,i,j}(v) &= \int_{\face_i} v\cdot\n \,q_j\ds
    & q_j&\in \Q_k(\face_i)
    \qquad\face_i \subset \d\refcell, \\
    %\label{eq:darcy:20}
    \nodal_{2,i}(v) &= \int_{\refcell} v\cdot w_i \dx
    & w_i &\in \Q_{k-1,k\ldots k}\times\cdots\times\Q_{k\ldots k,k-1}.
  \end{xalignat}
\end{Definition}

\begin{Lemma}{rt-quad-1}
  There holds
  \begin{gather}
    \dim RT_{[k]} = d(k+1)^{d-1}(k+2),
  \end{gather}
  and
  \begin{gather}
    \label{eq:darcy:41}
    \div RT_{[k]} = \Q_k.
  \end{gather}
  Furthermore, for each $\face \subset\widehat\cell$ and each
  $v\in RT_{[k]}(\refcell)$there holds
  \begin{gather}
    \label{eq:darcy:42}
    v\cdot \n|_{\face} \in \Q_k.
  \end{gather}
\end{Lemma}

\begin{proof}
  The proof of this lemma is exactly the same as the one of \slideref{Lemma}{rt-simplex-1}.
\end{proof}

\begin{Example}{rt-quad}
  The first members of the Raviart-Thomas family on quadrilaterals are
  \begin{center}
    \begin{tabular}{c@{\hspace{.05\textwidth}}c@{\hspace{.05\textwidth}}c}
      \includegraphics[width=.22\textwidth]{./fig/rt0-quad.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/rt1-quad.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/rt2-quad.tikz}
      \\[5mm]
      \includegraphics[width=.22\textwidth]{./fig/q0-p.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/dgq1-p.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/dgq2-p.tikz}
    \end{tabular}
  \end{center}
\end{Example}

The construction principle of the Raviart-Thomas element on simplices
as well as on rectangles and cubes can be seen as adding vector
polynomials to the velocity space until its divergence is equal to
$\P_k$ or $\Q_k$. The principle of the BDM elements is the opposite:
Starting from the polynomial spaces for triangles, we add divergence
free shape functions until we achieve continuity of the normal
component over all edges. We give their definitions on squares and
cubes.

\begin{Definition}{bdm-quad}
  The \putindex{BDM element} of degree $k\ge 1$ on the reference cell
  $\refcell = [-1,1]^2$ consists of the polynomial space
  \begin{gather}
    BDM_{[k]} = \P_k^2 \oplus
    \operatorname{span}\bigl\{\curl(x^{k+1}y),\curl(x y^{k+1}\bigr\}.
  \end{gather}
  Its \putindex{node functionals} are
  \begin{xalignat}2
    %\label{eq:darcy:19}
    \nodal_{1,i,j}(v) &= \int_{\face_i} v\cdot\n \,q_j\ds
    & q_j&\in \P_k(\face_i)
    \qquad\face_i \subset \d\refcell, \\
    %\label{eq:darcy:20}
    \nodal_{2,i}(v) &= \int_{\refcell} v\cdot w_i \dx
    & w_i &\in \P_{k-2}^2.
  \end{xalignat}
\end{Definition}

\begin{Example}{bdm-quad}
  The first members of the Brezzi-Douglas-Marini family on
  quadrilaterals are
  \begin{center}
    \begin{tabular}{c@{\hspace{.05\textwidth}}c@{\hspace{.05\textwidth}}c}
      \includegraphics[width=.22\textwidth]{./fig/bdm1-quad.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/bdm2-quad.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/bdm3-quad.tikz}
      \\[5mm]
      \includegraphics[width=.22\textwidth]{./fig/q0-p.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/q-p1-p.tikz}
      &
      \includegraphics[width=.22\textwidth]{./fig/q-p2-p.tikz}
    \end{tabular}
  \end{center}
\end{Example}

\begin{Lemma}{bdm-quad}
  The dimension of the space $BDM_{[k]}$ is
  \begin{gather}
    \dim BDM_{[k]} = (k+1)(k+2)+2.
  \end{gather}
  The element in \slideref{Definition}{bdm-quad} is unisolvent.
\end{Lemma}

\begin{Problem}{bdm-quad}
  Prove \slideref{Lemma}{bdm-quad}.
\begin{solution}
 The dimension of the space is by definition
 \begin{align*}
    \dim BDM_{[k]} = d\binom{k+d}{d}+2=2\frac{(k+2)(k+1)}{2}+2=(k+1)(k+2)+2.
 \end{align*}
 The number of functionals is
 \begin{align*}
  2^d \binom{k+d-1}{d-1}+d \binom{k+d-2}{d} &= 4 \frac{k+1}{1}+2\frac{k(k-1)}{2}
  = 4k+4+k^2-k+4\\
  &= k^2-3k+4 = (k+2)(k+1)+2.
 \end{align*}
 Now we only have to check the unisolvence, i.e.
 \begin{align*}
p\in BDM_{[k]}, \nodal_* (p) = 0 \Rightarrow p \equiv 0.
\end{align*}
 An arbitrary element $p\in BDM_{[k]}$ can be written as
 \begin{align*}
  p_1 (x,y) &= a x^{k+1} +b (k+1) x y^k+ q_{k,1}(x,y) \\
  p_2 (x,y) &= -a (k+1) y x^k-b y^{k+1}+ q_{k,2}(x,y)
 \end{align*}
 where $q_{k,1},q_{k,2}\in \mathbb{P}_k$. Now consider the evaluation of the first component for $x=\pm1$:
 \begin{align*}
  p_1 (\pm1,y) &= a (\pm1)^{k+1} \pm b (k+1) y^k+ q_{k,1}(\pm1,y)\in \mathbb{P}_k(e_i)
 \end{align*}
 and the first condition requires $p_1 (\pm1,y)\equiv 0$ which implies $\pm b(k+1)+c_{0,k}=0$ and hence $b=0$.
 Similarly, evaluating the second component for $y=\pm1$ gives
 \begin{align*}
  p_2 (x,\pm1) &= \pm a (k+1) x^k+ q_{k,2}(x,\pm1)\in \mathbb{P}_k(e_i)
 \end{align*}
 and the first condition requires $p_3 (x,\pm1)\equiv 0$ which implies $\pm a(k+1)+c_{k,0}=0$ and hence $a=0$.
 In combination, the first condition requires $p_1,p_2\in \mathbb{P}_k$. Furthermore, the first component vanishes
 at $x=\pm1$ and the second component at $y=\pm1$ implying $p_1=(1-x^2) \hat{p}_1, p_2=(1-y^2) \hat{p}_2$
 where $\hat{p}_1, \hat{p}_2 \in \mathbb{P}_{k-2}$. Thus, the second condition implies $p_1, p_2\equiv 0$.
\end{solution}

\end{Problem}

\begin{Corollary}{darcy-convergence-affine}
  Let the mesh be such that each cell is obtained by affine
  transformation from the reference cell $\refcell$. Then,
  \slideref{Theorem}{darcy-quasi-best} applies and we obtain
  quasi-bestapproximation.
\end{Corollary}

\begin{remark}
  If the mapping of the cells is not affine, we do not have
  \begin{gather*}
    \div V_h = Q_h.
  \end{gather*}
  Indeed, on each cell, we have
  \begin{gather}
    \div V_h = \tfrac1{J} Q_h,
  \end{gather}
  where the \putindex{Jacobi determinant} $J$ is not constant. As a
  consequence, \slideref{Lemma}{commuting-diagram-hdiv} about the
  commuting diagram property does not apply directly anymore and
  indeed, approximation may
  suffer~\cite{ArnoldBoffiFalk05}. In particular, it
  is shown there that for the $RT_{[k]}$ on general
  quadrilateral meshes, which do \emph{not} converge to affine meshes
  as $h\to0$, there holds
  \begin{align*}
    \inf_{v_h\in V_h}\norm{u-v_h} &= \mathcal O(h^{k+1}), \\
    \inf_{v_h\in V_h}\norm{\div u-\div v_h} &= \mathcal O(h^{k}).
  \end{align*}
  The optimal approximation of the divergence can be recovered by
  enriching the space like the Arnold-Boffi-Falk element below.
\end{remark}

\begin{Definition}{abf-quad}
  The \define{Arnold-Boffi-Falk element} of degree $k \ge 0$ on the
  reference cell $\refcell = [-1,1]^2$
  consists of the polynomial space
  \begin{gather}
    %\label{eq:darcy:38}
    ABF_k(\refcell) = \Q_{k+2,k}\times \Q_{k,k+2}
  \end{gather}
  Its \putindex{node functionals} are
  \begin{xalignat}2
    %\label{eq:darcy:19}
    \nodal_{1,i,j}(v) &= \int_{\face_i} v\cdot\n \,q_j\ds
    & q_j&\in \Q_k(\face_i)
    \qquad\face_i \subset \d\refcell, \\
    %\label{eq:darcy:20}
    \nodal_{2,i}(v) &= \int_{\refcell} v\cdot w_i \dx
    & w_i &\in \Q_{k-1,k}\times\cdots\times\Q_{k,k-1}, \\
    \nodal_{3,x,i}(v) &= \int_{\refcell} \div v (x^iy^{k+1})
    & i&=1,\dots,k,\\
    \nodal_{3,y,i}(v) &= \int_{\refcell} \div v (x^{k+1}y^i)
    & i&=1,\dots,k.
  \end{xalignat}
\end{Definition}

\begin{remark}
  Degrees of freedom in this section have been written as moments with
  respect to polynomials in $\P_k$ or $\Q_k$, which is natural in this
  context and allows for an easy proof of the commutating diagram
  property of the \putindex{Fortin projection}. On the other hand,
  degrees of freedom based on point interpolation are sometimes more
  natural for the implementation.

  In one dimension, for instance for the integration over edges, we
  realize that
  \begin{gather*}
    \nodal_{1,i,j} (v) = \int_{\face} v\cdot\n \,q_j \ds
    = \sum_{\ell=1}^{k+1} \omega_\ell v(x_\ell)\cdot\n\,q(x_\ell),
  \end{gather*}
  for any Gauss-Legendre or Gauss-Lobatto quadrature rule on
  $\face$. What was left unspecified in the definition of the element
  was the choice of a basis $\{q_j\}$ for $\P_k$. From the point of
  view of moments, it is natural to choose Legendre polynomials as a
  basis. But, we can also choose the basis which is orthogonal with
  respect to the quadrature rule, which is up to the weights a
  Lagrange basis. Thus, we can transform the moment degrees of freedom
  back to interpolating degrees of freedom easily.

  This construction extends automatically to tensor product space
  $\Q_k$. For polynomials space $\P_k$, suitable quadrature sets on
  triangles and quadrilaterals must be constructed.
\end{remark}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "main"
%%% End: