The discrete exterior calculus (DEC) for simplicial sets.
This module provides the dual complex associated with a delta set (the primal complex), which is a discrete incarnation of Hodge duality, as well as the many operators of the DEC that depend on it, such as the Hodge star, codifferential, wedge product, interior product, and Lie derivative. The main reference for this module is Hirani's 2003 PhD thesis.
Abstract type for dual complex of a 1D delta set.
Abstract type for dual complex of a 2D delta set.
Barycenter, aka centroid, of a simplex.
Circumcenter, or center of circumscribed circle, of a simplex.
Wrapper for chain of dual cells of dimension
In an $N$-dimensional complex, the elementary dual simplices of each $n$-simplex together comprise the dual $(N-n)$-cell of the simplex. Using this correspondence, a basis for primal $n$-chains defines the basis for dual $(N-n)$-chains.
In (Hirani 2003, Definition 3.4.1), the duality operator assigns a certain sign to each elementary dual simplex. For us, all of these signs should be regarded as positive because we have already incorporated them into the orientation of the dual simplices.
Edge in simplicial set: alias for
Wrapper for form, aka cochain, on dual cells of dimension
Triangle in simplicial set: alias for
Vertex in simplicial set: alias for
Wrapper for vector field on dual vertices.
Incenter, or center of inscribed circle, of a simplex.
Wrapper for vector field on primal vertices.
A notion of "geometric center" of a simplex.
Laplace-de Rham operator on discrete forms.
This linear operator on primal $n$-forms is defined by $Δ := δ d + d δ$. Restricted to 0-forms, it reduces to the negative of the Laplace-Beltrami operator
∇²: $Δ f = -∇² f$.
Wedge product of discrete forms.
The wedge product of a $k$-form and an $l$-form is a $(k+l)$-form.
The DEC and related systems have several flavors of wedge product. This one is the discrete primal-primal wedge product introduced in (Hirani, 2003, Chapter 7) and (Desbrun et al 2005, Section 8). It depends on the geometric embedding and requires the dual complex.
Hodge star operator from primal 1-forms to dual 1-forms.
This specific hodge star implementation is based on the hodge star presented in (Ayoub et al 2020), which generalizes the operator presented in (Hirani 2003). This reproduces the diagonal hodge for a dual mesh generated under circumcentric subdivision and provides off-diagonal correction factors for meshes generated under other subdivision schemes (e.g. barycentric).
Hodge star operator from primal $n$-forms to dual $N-n$-forms.
Some authors, such as (Hirani 2003) and (Desbrun 2005), use the symbol $⋆$ for the duality operator on chains and the symbol $*$ for the Hodge star operator on cochains. We do not explicitly define the duality operator and we use the symbol $⋆$ for the Hodge star.
Alias for the codifferential operator
Boundary of chain of dual cells.
Discrete exterior derivative of dual form.
dual_boundary. For more info, see (Desbrun, Kanso, Tong, 2008: Discrete differential forms for computational modeling, §4.5).
Point associated with dual vertex of complex.
Boundary dual vertices of a dual triangle.
This accessor assumes that the simplicial identities for the dual hold.
Dual vertex corresponding to center of primal edge.
List of elementary dual simplices corresponding to primal simplex.
In general, in an $n$-dimensional complex, the elementary duals of primal $k$-simplices are dual $(n-k)$-simplices. Thus, in 1D dual complexes, the elementary duals of...
- primal vertices are dual edges
- primal edges are (single) dual vertices
In 2D dual complexes, the elementary duals of...
- primal vertices are dual triangles
- primal edges are dual edges
- primal triangles are (single) dual triangles
Alias for the flat operator
Calculate the center of simplex spanned by given points.
The first argument is a list of points and the second specifies the notion of "center", via an instance of
Alias for the Hodge star operator
Interior product of a vector field (or 1-form) and a $n$-form.
Specifically, this operation is the primal-dual interior product defined in (Hirani 2003, Section 8.2) and (Desbrun et al 2005, Section 10). Thus it takes a primal vector field (or primal 1-form) and a dual $n$-forms and then returns a dual $(n-1)$-form.
Interior product of a 1-form and a $n$-form, yielding an $(n-1)$-form.
Usually, the interior product is defined for vector fields; this function assumes that the flat operator
♭ (not yet implemented for primal vector fields) has already been applied to yield a 1-form.
Inverse Hodge star operator from dual $N-n$-forms to primal $n$-forms.
Confusingly, this is not the operator inverse of the Hodge star
⋆ because it carries an extra global sign, in analogy to the smooth case (Gillette, 2009, Notes on the DEC, Definition 2.27).
Alias for the Laplace-Beltrami operator
Alias for the Laplace-de Rham operator
Alias for Lie derivative operator
Lie derivative of $n$-form with respect to a 1-form.
Assumes that the flat operator
♭ has already been applied to the vector field.
Primal vertex associated with a dual simplex.
Alias for the sharp operator
Compute geometric subdivision for embedded dual complex.
Supports different methods of subdivision through the choice of geometric center, as defined by
geometric_center. In particular, barycentric subdivision and circumcentric subdivision are supported.
List of dual simplices comprising the subdivision of a primal simplex.
A primal $n$-simplex is always subdivided into $n!$ dual $n$-simplices, not be confused with the
elementary_duals which have complementary dimension.
The returned list is ordered such that subsimplices with the same primal vertex appear consecutively.
Dual vertex corresponding to center of primal triangle.
Dual vertex corresponding to center of primal vertex.
Alias for the wedge product operator
Codifferential operator from primal $n$ forms to primal $n-1$-forms.
Lie derivative of $n$-form with respect to a vector field (or 1-form).
Specifically, this is the primal-dual Lie derivative defined in (Hirani 2003, Section 8.4) and (Desbrun et al 2005, Section 10).
Laplace-Beltrami operator on discrete forms.
For following texts such as Abraham-Marsden-Ratiu, we take the sign convention that makes the Laplace-Beltrami operator consistent with the Euclidean Laplace operator (the divergence of the gradient). Other authors, such as (Hirani 2003), take the opposite convention, which has the advantage of being consistent with the Laplace-de Rham operator
Flat operator converting vector fields to 1-forms.
A generic function for discrete flat operators. Currently only the DPP-flat from (Hirani 2003, Definition 5.5.2) and (Desbrun et al 2005, Definition 7.3) is implemented.
See also: the sharp operator
Sharp operator for converting 1-forms to vector fields.
A generic function for discrete sharp operators. Currently only the primal-primal flat from (Hirani 2003, Definition 5.8.1 and Remark 2.7.2) is implemented.
A PP-flat is also defined in (Desbrun et al 2005, Definition 7.4) but differs in two ways: Desbrun et al's notation suggests a unit normal vector, whereas the gradient of Hirani's primal-primal interpolation function is not necessarily a unit vector. More importantly, Hirani's vector is a normal to a different face than Desbrun et al's, with further confusion created by the fact that Hirani's Figure 5.7 agrees with Desbrun et al's description rather than his own. That being said, to the best of our knowledge, our implementation is the correct one and agrees with Hirani's description, if not his figure.
See also: the flat operator