Creating a mesh, refining it, writing it to a file.
