<a name="Intro"></a>
<h1>Introduction</h1>

@dealiiVideoLecture{14}

This example does not show revolutionary new things, but it shows many
small improvements over the previous examples, and also many small
things that can usually be found in finite element programs. Among
them are:
<ul>
  <li> Computations on successively refined grids. At least in the
       mathematical sciences, it is common to compute solutions on
       a hierarchy of grids, in order to get a feeling for the accuracy
       of the solution; if you only have one solution on a single grid, you
       usually can't guess the accuracy of the
       solution. Furthermore, deal.II is designed to support adaptive
       algorithms where iterative solution on successively refined
       grids is at the heart of algorithms. Although adaptive grids
       are not used in this example, the foundations for them is laid
       here.
  <li> In practical applications, the domains are often subdivided
       into triangulations by automatic mesh generators. In order to
       use them, it is important to read coarse grids from a file. In
       this example, we will read a coarse grid in UCD (unstructured
       cell data) format. When this program was first written around
       2000, UCD format was what the AVS Explorer used -- a program
       reasonably widely used at the time but now no longer of
       importance. (Nonetheless, the file format has survived and is
       still understood by a number of programs.)
  <li> Finite element programs usually use extensive amounts of
       computing time, so some optimizations are sometimes
       necessary. We will show some of them.
  <li> On the other hand, finite element programs tend to be rather
       complex, so debugging is an important aspect. We support safe
       programming by using assertions that check the validity of
       parameters and %internal states in a debug mode, but are removed
       in optimized mode. (@dealiiVideoLectureSeeAlso{18})
  <li> Regarding the mathematical side, we show how to support a
       variable coefficient in the elliptic operator and how to use
       preconditioned iterative solvers for the linear systems of
       equations.
</ul>

The equation to solve here is as follows:
@f{align*}
  -\nabla \cdot a(\mathbf x) \nabla u(\mathbf x) &= 1 \qquad\qquad & \text{in}\ \Omega,
  \\
  u &= 0 \qquad\qquad & \text{on}\ \partial\Omega.
@f}
If $a(\mathbf x)$ was a constant coefficient, this would simply be the Poisson
equation. However, if it is indeed spatially variable, it is a more complex
equation (often referred to as the "extended Poisson equation"). Depending on
what the variable $u$ refers to it models a variety of situations with wide
applicability:

- If $u$ is the electric potential, then $-a\nabla u$ is the electric current
  in a medium and the coefficient $a$ is the conductivity of the medium at any
  given point. (In this situation, the right hand side of the equation would
  be the electric source density and would usually be zero or consist of
  localized, Delta-like, functions.)
- If $u$ is the vertical deflection of a thin membrane, then $a$ would be a
  measure of the local stiffness. This is the interpretation that will allow
  us to interpret the images shown in the results section below.

Since the Laplace/Poisson equation appears in so many contexts, there are many
more interpretations than just the two listed above.

When assembling the linear system for this equation, we need the weak form
which here reads as follows:
@f{align*}
  (a \nabla \varphi, \nabla u) &= (\varphi, 1) \qquad \qquad \forall \varphi.
@f}
The implementation in the <code>assemble_system</code> function follows
immediately from this.
