Charts

Charts represent maps from parameter domains to configuration space. Their main use is to provide the geometric description of the cells that make up meshes.

The Chart concept is defined by the following API

CompScienceMeshes.universedimension — Function
universedimension(mesh)

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

source

universedimension(p)

Return the dimension of the universe in which p is embedded.

source
universedimension(s::CurvilinearSimplex)
universedimension(::Type{CurvilinearSimplex})

Return the dimension of the embedding space (e.g. 2 for curves in the plane).

source
CompScienceMeshes.neighborhood — Function
neighborhood(ch::CurvilinearSimplex, bary)

Construct a MeshPoint located at the parametric (barycentric) coordinate bary on the given curvilinear simplex.

The returned object stores:

  • the chart ch,
  • the parametric point bary,
  • the corresponding physical coordinates cartesian.

This is the canonical way to create a point for evaluating reference functions or geometric quantities on curvilinear elements.

source
neighborhood(chart, params)

Create a neighborhood from a chart and a set of parameter values.

source

The most important example of a Chart is a Simplex. For Simplices, the following additional functions are available

CompScienceMeshes.simplex — Function
simplex(vertices)
simplex(v1, v2, ...)
simplex(vertices, Val{D})

Build a D-dimensional simplex. The vertices can be passed in an array (static or dynamic), or supplied separately. If the length of the array is not part of its type, the speed of the construction can be improved by supplying an extra Val{D} argument. In case it is not clear from the context whether the vertex array is dynamically or statically sized, use the third form as it will not incur notable performance hits.

Note that D is the dimension of the simplex, i.e. the number of vertices supplied minus one.

source
CompScienceMeshes.center — Function
center(ch::CurvilinearSimplex)

Return the physical midpoint of the 1D curvilinear element, obtained by evaluating the mapping at ζ = 0.5.

source
center(simplex) -> neighborhood

Create the neighborhood at the center of the simplex, i.e. the point corresponding to parameter (1/(D+1), 1/(D+1), ...) where D is the simplex dimension.

source