CompScienceMeshes.jl

Meshes, charts, and differential geometry for finite and boundary element solvers.

Installation

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.

Introduction

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:

Mesh Interface

This package introduces a minimalistic mesh interface and a standard implementation CompScienceMeshes.Mesh. The interface is defined by the semantics of the following functions:

Functions to query a mesh for its characteristics

# CompScienceMeshes.dimensionMethod.

dim = dimension(mesh)

Returns the dimension of the mesh. Note that this is the dimension of the cells, not of the surrounding space.

source

# CompScienceMeshes.universedimensionMethod.

universedimension(mesh)

Returns the dimension of the surrounding space. Equals the number of coordinates required to describe a vertex.

source

# CompScienceMeshes.vertextypeFunction.

vt = vertextype(mesh)

Returns type of the vertices used to define the cells of the mesh.

source

# CompScienceMeshes.coordtypeMethod.

coordtype(mesh)

Returns eltype(vertextype(mesh))

source

# CompScienceMeshes.numverticesFunction.

numvertices(mesh)

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))

source

# CompScienceMeshes.numcellsFunction.

numcells(mesh)

Returns the number of cells in the mesh.

source

Functions to iterate over the mesh' cells and the underlying point set

# CompScienceMeshes.verticesFunction.

vertices(mesh)

Returns an indexable iterable to the vertices of the mesh

source

# CompScienceMeshes.cellsFunction.

cells(mesh)

Return an iterable collection containing the cells making up the mesh.

source

Functions to retrieve adjacency information about the mesh

# CompScienceMeshes.skeletonFunction.

skeleton(mesh, dim)

Returns a mesh comprising the dim-dimensional sub cells of mesh. For example to retrieve the edges of a given surface mesh,

edges = skelton(mesh, 1)

source

skeleton(pred, mesh, dim)

Like skeleton(mesh, dim), but only cells for which pred(cell) returns true are withheld.

source

# CompScienceMeshes.connectivityFunction.

connectivity(faces, cells, op=sign)

Create a sparse matrix D of size numcells(cells) by numcells(faces) that contiains the connectivity info of the mesh. In particular D[m,k] is op(r) where 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 m.

For op=sign, the matrix returned is the classic connectivity matrix, i.e. the graph version of the exterior derivative.

source