
This demo illustrates:

* How to mark subdomains of a mesh
* How to store subdomain markers as a mesh function to DOLFIN XML files and VTK files

Problem definition
------------------

In this demo, we focus on how to mark subdomains, so we do not have
any equations to solve. The mesh we will work on is a unit square
where the shape of a dolphin is removed from the middle of the square.
This mesh and the subdomain markers produced by this demo program are
the ones used for the Stokes demo programs.  We will mark the
boundaries so that the boundary to the right (:math:`x = 1`) is
inflow, the boundary to the left (:math:`x = 0`) is outflow, and the
top, bottom and the interior boundary around the dolphin will be
noslip. We thus have

.. math::
	\partial \Omega &= \Gamma_{\mathrm{inflow}} \cup \Gamma_{\mathrm{outflow}} \cup \Gamma_{\mathrm{noslip}}, \\
	\Gamma_{\mathrm{inflow}} &= (1, y), \\
	\Gamma_{\mathrm{outflow}} &= (0, y), \\
	\Gamma_{\mathrm{noslip}} &= \partial \Omega \backslash (\Gamma_{\mathrm{inflow}} \cup \Gamma_{\mathrm{outflow}}). \\

The mesh with marked boundaries looks as follows:

.. image:: ../plot_subdomains.png
	:scale: 75%
