Geometry
The module geometry contains classes to describe meshes (topology, coordinates, cells etc.), the list below shows the most important ones. More...
Classes | |
class | concepts::Attribute |
Attributes for elements of the topology. More... | |
class | concepts::Cell |
A cell in a mesh consist of topological information (neighbours, connectivity, orientation) and geometrical information (coordinates). More... | |
class | concepts::Connector |
An abstract class for elements of the topology. More... | |
class | concepts::ConvertMeshQuads |
Mesh converter. More... | |
class | concepts::Edge |
An edge in the topology. More... | |
class | concepts::Edge1d |
A 1D cell: edge. More... | |
class | concepts::Edge2d |
A 1D cell: edge in 2D. More... | |
class | concepts::EdgeNd |
A 1D cell in any dimension: edge. More... | |
class | concepts::Hex3dSubdivision |
Interface for geometrical subdivision strategies for hexahedrons. More... | |
class | concepts::Hexahedron |
A hexahedron in the topology. More... | |
class | concepts::Hexahedron3d |
A 3D cell: hexahedron. More... | |
class | concepts::HexSubdivision |
Interface for topological subdivision strategies for hexahedrons. More... | |
class | concepts::Import2dMeshBase |
Imports 2D mesh with triangles and quadrilaterals (possibly mixed). More... | |
class | concepts::Import2dMeshEz4u |
Imports 2D mesh with triangles(currently not supported) and quadrilaterals (possibly mixed) from mesh generator ez4u. More... | |
class | concepts::Import3dMesh |
Imports 3D mesh with tetrahedra and hexahedra. More... | |
class | concepts::InfiniteEdge |
An infinite edge in the topology, which possess only one vertex as the other lies in the infinite. More... | |
class | concepts::InfiniteQuad |
A infinite quadrilateral in the topology, which possess one Edge and two InfiniteEdges since one edge lies in the infinite. More... | |
class | concepts::InfiniteQuad2d |
A 2D cell: infinite quadrilateral. More... | |
class | concepts::InfiniteRect2d |
A 2D cell: infinite rectangle. More... | |
class | concepts::InfQuadSubdivision |
Interface for topological subdivision strategies for infinite quadrilaterals. More... | |
class | concepts::Map1d |
An abstract class for a 1d map. More... | |
class | concepts::Map2d |
An abstract class for a 2d map. More... | |
class | concepts::Map3d |
An abstract class for a 3d map. More... | |
class | concepts::Mesh |
An abstract class for meshes. More... | |
class | concepts::Parallelepiped3d |
A 3D cell: parallelepiped. More... | |
class | concepts::Quad |
A quadrilateral in the topology. More... | |
class | concepts::Quad2d |
A 2D cell: quadrilateral. More... | |
class | concepts::Quad2dSubdivision |
Interface for geometrical subdivision strategies for quadrilaterals. More... | |
class | concepts::Quad3d |
A quadrilateral cell in 3D. More... | |
class | concepts::QuadSubdivision |
Interface for topological subdivision strategies for quadrilaterals. More... | |
class | concepts::StrategyChange |
Exception indicating that changing the subdivision strategy is not allowed (but was tried anyway). More... | |
class | concepts::Subdivision |
Common base class for QuadSubdivision and HexSubdivision. More... | |
class | concepts::Tetrahedron |
A tetrahedron in the topology. More... | |
class | concepts::Tetrahedron3d |
A 3D cell: tetrahedron. More... | |
class | concepts::Triangle |
A triangle in the topology. More... | |
class | concepts::Triangle2d |
A 2D cell: triangle. More... | |
class | concepts::Triangle3d |
A 3D cell: triangle. More... | |
class | concepts::UniformlyRefinedMesh2 |
Wrapper class refining an existing 2d mesh uniformly. More... | |
class | concepts::Vertex |
A vertex in the topology. More... | |
Detailed Description
The module geometry contains classes to describe meshes (topology, coordinates, cells etc.), the list below shows the most important ones.
All header files declaring classes for the geometry can be found in the subdirectory geometry.
The geometry of the domain of interest consists of the topology (vertices, edges etc. and how they are connected) of the elements and the element mappings (introduces the coordinates). A topological element of the mesh together with its element mapping forms a cell of the mesh. All cells together form the mesh itself.
Topology
The classes which describe the topology of a mesh are all declared in the file topology.hh. The basic class for the topology is concepts::Connector (refer to the respective pages for more detailed documentation).
Also part of the topology is how elements have to be subdivided to reach a higher level of refinement. Eg. a vertex is not subdivided but simply copied. An edge is cut into two new edges. A triangle or a quadrilateral are cut into four new. More on subdivisions can be found in the description of concepts::QuadSubdivision, concepts::Quad2dSubdivision, concepts::HexSubdivision and concepts::Hex3dSubdivision.
Element Mapping
An element mapping maps a reference element to the physical element. The application operator of the class maps a point from the reference element to the physical element.
The following classes are declared: concepts::Map1d, concepts::Map2d, concepts::Map3d.
Cell
The cells combine the topology and the element maps. They will finally be assembled to a mesh. The base class for all cells is concepts::Cell.
Mesh
A mesh is simply several cells together with a public subclass acting as some sort of scanner for the mesh. The mesh holds the vertices, edges, triangles or quadrilaterals and cells of the original mesh which is built in the constructor. There are quite a few examples which are already implemented such as the unit disk, or a square.
The base class for all meshes is concepts::Mesh.
HOWTO Implement a New Mesh
I describe the procedure to implement a new mesh with the example of the unit square [0, 1]2. More complex examples can be found in the meshes tutorial. Most meshes do not have to be programmed though, they can be imported from a file using concepts::Import2dMesh or concepts::Import3dMesh.
Derive a New Class
In order to implement a new mesh one needs to derive a new class from one of the children of concepts::Mesh. In our example this would be the class Quadrat derived from concepts::Mesh2.
The easiest way to achieve this is to copy the definition of an existing mesh.
New Topology and Geometry
Besides changing the declaration of the member (triangles, cells etc.) the constructor and the destructor have to be changed.
-
The constructor of Quadrat looks like this: vtx_[0] = new Vertex;vtx_[1] = new Vertex;vtx_[2] = new Vertex;vtx_[3] = new Vertex;edg_[0] = new Edge(*vtx_[0], *vtx_[1]);edg_[1] = new Edge(*vtx_[1], *vtx_[2]);edg_[2] = new Edge(*vtx_[2], *vtx_[3]);edg_[3] = new Edge(*vtx_[3], *vtx_[0]);quad_[0] = new Quad(*edg_[0], *edg_[1], *edg_[2], *edg_[3]);cell_[0] = new Quad2d(*quad_[0],MapQuad2d("(x, y)", 1.0, 1.0));
-
The destructor of Quadrat looks like this: for(uint l = 1; l--;)delete cell_[l];for(uint k = 1; k--;)delete quad_[k];for(uint j = 4; j--;)delete edg_[j];for(uint i = 4; i--;)delete vtx_[i];
For more complex geometries, one has to be very careful about the orientation of the edges in the mesh as a whole and in the different cells.