This document provides a brief description of the various structured meshes that are distributed with the library. Most of these meshes were developed for specific example codes but we expect them to be useful in other problems too. Many of the meshes exist in many different variants, usually constructed by multiple inheritance. When meshes are relatively trivial variations of each other, e.g. a basic mesh and its refineable equivalent, we only list the mesh once. The detailed documentation for the mesh (obtained by following the link) contains the full inheritance diagram, showing the mesh's own base classes and any meshes that are derived from it. For each mesh, we provide a link to a fully-documented example problem that illustrates its use.
We stress that the key feature of any given mesh is its topology, rather than the specific shape for which it was originally developed. For instance, oomph-lib
does not provide a mesh for the discretisation of an annular domain with quadrilateral elements. However, such a mesh is trivial to construct by deriving it from, e.g., the SimpleRectangularQuadMesh
(a mesh that discretises a rectangular domain), and then adjusting its nodal positions. Consult the example in the (Not-So-)Quick-Guide for details.
Since mesh generation tends to be most tedious part of any numerical simulation, oomph-lib's
overall data structure, described in detail elsewhere, aims to facilitate the re-use of meshes in many different applications. For this purpose most specific FiniteElements
in oomph-lib
are derived by multiple inheritance, combining a "geometric" FiniteElement
(e.g. a line/quadrilateral/brick-shaped element from the QElement<DIM,NNODE_1D>
family) with an equations class (such as PoissonEquations<DIM>
) that implements the weak form of a specific PDE. For instance, oomph-lib's
quadrilateral nine-node Poisson element, QPoissonElement<2,3>
, is derived from the PoissonEquations<2>
equations class and the QElement<2,3>
geometric FiniteElement
.
The mesh generation process is mainly concerned with the geometric properties of the mesh's constituent FiniteElements
(their topology, number of nodes, etc.) which are defined by the geometric FiniteElement
. This makes it possible to use a mesh that was originally developed for the solution of a Poisson equation with a QPoissonElement<2,NNODE_1D>
, say, for the solution of an advection-diffusion problem with a QAdvctionDiffusionElement<2,NNODE_1D>
since both elements are derived from the same geometric FiniteElement
. Only two aspects of the mesh generation process require information that is not provided by the geometric FiniteElement:
QElement<2,NNODE_1D>
family of geometric elements is used to solve a (scalar) Poisson equation with nine-noded elements, each Node
has to store a single value. However, if the same mesh is used for the solution of the 2D Navier-Stokes equations with a nine-node quadrilateral elements of type QTaylorHoodElement<2>
, nodes located at the elements' four vertices have to store three values (two velocity components and one pressure) whereas nodes located at the elements' interior and on their edges only have to store two values (the two velocity components). TimeStepper
used to approximate the time-derivative of the nodal values.The meshes used in our example codes (and all the meshes listed below) have a common structure that allows the required information to be become available to the mesh constructor:
ELEMENT
.TimeStepper
. We provide a default for this argument – a pointer to the Steady<0>
timestepper, defined (as static member data) in the Mesh
base class.The availability of the template parameter allows the mesh generator to build elements of the required type. Nodes
are generally built by the FiniteElement::construct_node(...)
function whose arguments are the Node's
local node number within the current element, and a pointer to the timestepper. These arguments provide all the information that is required to build Nodes
with the right number of values (as required by the element) and history values (as required by the TimeStepper
). When the function FiniteElement::construct_node(...)
is called, it creates the new Node
, stores a pointer to the newly created Node
in the FiniteElement's
own lookup scheme, and returns that pointer. This allows the pointer to the newly created Node
to be stored in the Mesh's
own lookup scheme for its constituent Nodes
. The (Not-So-)Quick-Guide contains a section that explains how to write simple meshes.
When using a mesh that was originally developed for a different application, it is sometimes necessary establish the node/element/boundary numbering scheme employed by the mesh writer. While we generally assume that the mesh writer will have carefully documented his/her code, here is what to do if he/she hasn't:
Mesh::output(...)
outputs the elements in the order in which they are stored internally. If you prefer a different element numbering scheme you can re-number the elements; see e.g. the member function element_reorder()
in the RectangularQuadMesh class. Mesh::node_pt(j)
provides pointer-based access to the j
- th Node
in the mesh. To plot a node's position, you can determine its coordinates from the Node::x(...)
function. Mesh::output_boundaries(...)
outputs the nodes located on the mesh boundaries in a tecplot-able format. Nodes that are located on separate mesh boundaries are contained in separate tecplot zones. With this information it should be straightforward to use any of the meshes listed below in one of your own problems. The example code listed next to each mesh illustrates its use in an actual driver code. If you develop a new mesh, let us know! If it is written according to oomph-lib's
coding standards, we'll be delighted to include it into the library.
Mesh | Representative Mesh plot |
OneDMesh<ELEMENT>
| |
SimpleRectangularQuadMesh<ELEMENT>
| |
RectangularQuadMesh<ELEMENT>
| |
TwoDAnnularMesh<ELEMENT>
| |
ChannelWithLeafletMesh<ELEMENT>
| |
SimpleRectangularTriMesh<ELEMENT>
| |
FishMesh<ELEMENT>
| |
FiniteElements
that are derived from the geometric finite element QElement<2,NNODE_1D>
.GeomObject
and the mesh has a Domain
representation, allowing a MacroElement
- based node update.Mesh
was mainly developed for the solution of Turek & Hron's FSI benchmark problems. The curvilinear boundaries of the cylinder and the "flag" are represented by GeomObjects
.AlgebraicMesh
or using a Domain/MacroElement
- based node update.QElement<2,NNODE_1D>
.SpineMesh
was mainly developed for the simulation of the Bretherton problem but it can, of course, also be used in other problems. The mesh topology would be suitable for the simulation of flows in a bifurcating channel, say.QElement<2,NNODE_1D>
.FiniteElements
that are derived from the geometric finite element QElement<2,NNODE_1D>
.GeomObject
and the mesh has a Domain
representation, allowing a MacroElement
- based node update.FiniteElements
that are derived from the geometric finite element QElement<3,NNODE_1D>
.q_convergence_3d.cc
FiniteElements
that are derived from the geometric finite element TElement<3,NNODE_1D>
.t_convergence_3d.cc
FiniteElements
that are derived from the geometric finite element QElement<3,NNODE_1D>
.GeomObject
and the mesh has a Domain
representation, allowing a MacroElement
- based node update.FiniteElements
that are derived from the geometric finite element QElement<3,NNODE_1D>
.GeomObject
and the mesh has a Domain
representation, allowing a MacroElement
- based node update.FiniteElements
that are derived from the geometric finite element QElement<3,NNODE_1D>
.
A pdf version of this document is available.