Meshes, charts, and differential geometry for finite and boundary element solvers.
In addition to the dependencies declared in REQUIRE, this package relies for some of its functionality on
gmsh. Make sure
gmsh is installed and on the system path if you require this functionality.
This package provides the geometric framework to facilitated the construction of finite element spaces and the assembly of matrices stemming from the discretisation of local (differential) and global (integral) operators on those finite element spaces.
The package roughly contains three components:
Meshes: allowing for the (almost) linear construction of connectivity matrices. A default implementation is provided but the algorithms should be easily extendable to user defined mesh structures. It is very common, for example, that mesh data structures contain problem specific information (local elasticity, permittivity, boundary conditions). User can use those enriched structures if they extend a limited number of functions.
Charts: a concept designed after the differential geometric concept of a chart on a manifold. It allows for the construction of points in Euclidian space from a set of parameters and the other way around.
Neighborhoods: a concept designed after the derivative of a chart as a map from the parametrising vector space to the tangent space of a point of the manifold. It allows querying for tangents, normal, and the Jacobian determinant for use in integration routines.
This package introduces a minimalistic mesh interface and a standard implementation
CompScienceMeshes.Mesh. The interface is defined by the semantics of the following functions:
dim = dimension(mesh)
Returns the dimension of the mesh. Note that this is the dimension of the cells, not of the surrounding space.
Return the manifold dimension of the simplex.
Returns the dimension of the surrounding space. Equals the number of coordinates required to describe a vertex.
vt = vertextype(mesh)
Returns type of the vertices used to define the cells of the mesh.
Return coordinate type used by simplex.
Returns the number of vertices in the mesh.
Note: this is the number of vertices in the vertex buffer and might include floatin vertices or vertices not appearing in any cell. In other words the following is not necessarily true:
numvertices(mesh) == numcells(skeleton(mesh,0))
Returns the number of cells in the mesh.
Returns an indexable iterable to the vertices of the mesh
Return an iterable collection containing the cells making up the mesh.
Returns a mesh comprising the
dim-dimensional sub cells of
mesh. For example to retrieve the edges of a given surface
edges = skelton(mesh, 1)
skeleton(pred, mesh, dim)
skeleton(mesh, dim), but only cells for which
pred(cell) returns true are withheld.
connectivity(faces, cells, op=sign)
Create a sparse matrix
D of size
numcells(faces) that contiains the connectivity info of the mesh. In particular
r is the local index of face
k in cell
m. The sign of
r is positive or negative depending on the relative orientation of face
k in cell
op=sign, the matrix returned is the classic connectivity matrix, i.e. the graph version of the exterior derivative.