diff --git a/docs/Figures/Chain.png b/docs/Figures/Chain.png deleted file mode 100755 index c715f5c..0000000 Binary files a/docs/Figures/Chain.png and /dev/null differ diff --git a/docs/Figures/Coboundary.png b/docs/Figures/Coboundary.png deleted file mode 100755 index 178339b..0000000 Binary files a/docs/Figures/Coboundary.png and /dev/null differ diff --git a/docs/Figures/DiffusionComplex.png b/docs/Figures/DiffusionComplex.png deleted file mode 100755 index 0bac394..0000000 Binary files a/docs/Figures/DiffusionComplex.png and /dev/null differ diff --git a/docs/Figures/DiscreteHodge.png b/docs/Figures/DiscreteHodge.png deleted file mode 100755 index 0f93604..0000000 Binary files a/docs/Figures/DiscreteHodge.png and /dev/null differ diff --git a/docs/Figures/FluxOutgoing.png b/docs/Figures/FluxOutgoing.png deleted file mode 100755 index 2ffe6fc..0000000 Binary files a/docs/Figures/FluxOutgoing.png and /dev/null differ diff --git a/docs/Figures/Hodge.png b/docs/Figures/Hodge.png deleted file mode 100755 index 1bcde01..0000000 Binary files a/docs/Figures/Hodge.png and /dev/null differ diff --git a/docs/Figures/Orient.png b/docs/Figures/Orient.png deleted file mode 100755 index 9469451..0000000 Binary files a/docs/Figures/Orient.png and /dev/null differ diff --git a/docs/Figures/PPsharp.png b/docs/Figures/PPsharp.png deleted file mode 100755 index 21da7f3..0000000 Binary files a/docs/Figures/PPsharp.png and /dev/null differ diff --git a/docs/Figures/Section.png b/docs/Figures/Section.png deleted file mode 100755 index e278767..0000000 Binary files a/docs/Figures/Section.png and /dev/null differ diff --git a/docs/Figures/VectorBundle.png b/docs/Figures/VectorBundle.png deleted file mode 100755 index 0ac9a88..0000000 Binary files a/docs/Figures/VectorBundle.png and /dev/null differ diff --git a/docs/Figures/VectorFields.png b/docs/Figures/VectorFields.png deleted file mode 100755 index e942112..0000000 Binary files a/docs/Figures/VectorFields.png and /dev/null differ diff --git a/docs/conf.py b/docs/conf.py index 90ef978..5f49cdb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -62,6 +62,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ + "nbsphinx", "sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.todo", diff --git a/docs/environment.yml b/docs/environment.yml index a49d703..936ad7e 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -17,6 +17,7 @@ dependencies: - yaml - pyvista - pip: + - nbsphinx - sphinx_rtd_theme - myst-parser[linkify] - sphinx>=3.2.1 diff --git a/docs/index.md b/docs/index.md index d2157d5..b1c0efb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,13 +8,13 @@ Discrete Calculus Toolkit :maxdepth: 2 Overview -Theory License Module Reference +Tutorials ``` ## Indices and tables -* {ref}`genindex` -* {ref}`modindex` -* {ref}`search` +- {ref}`genindex` +- {ref}`modindex` +- {ref}`search` diff --git a/docs/requirements.txt b/docs/requirements.txt index 6cc2c13..eb44c41 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -3,4 +3,5 @@ # under `install_requires` in `setup.cfg` is also listed here! sphinx_rtd_theme myst-parser[linkify] -sphinx>=3.2.1 \ No newline at end of file +sphinx>=3.2.1 +nbsphinx \ No newline at end of file diff --git a/docs/theory.md b/docs/theory.md deleted file mode 100644 index 7d82bcd..0000000 --- a/docs/theory.md +++ /dev/null @@ -1,1986 +0,0 @@ -# Differential Forms - -Differential forms are, in some sense, a generalization of the concept -of derivative. Referring to [@flanders1963differential], differential -forms "are the things which occur under integral signs". In this section -we review formally some well-know concepts of differential geometry, in -order to define correspondent discrete counterparts in the next section. - -Let us fix some notations used in the following sections: - -- $\mathcal{E}^n$ is an $n$-dimensional euclidean space. - -- $\mathcal{V}$ is the $n$-dimensional translation space of - $\mathcal{E}^n$ with base $\{\boldsymbol{e}_1, \dots, \boldsymbol{e}_n\}$. - -- $\langle \langle\cdot , \cdot \rangle \rangle: \mathcal{V}\times \mathcal{V}\rightarrow \mathbb{R}$ - is an inner product, i.e. a symmetric bilinear positive definite - function. - -## Exterior algebra - -::: refbox -**References:** {cite}`grady2010discrete`, Section 2.2.1.1. -[@epstein2010geometrical], Chapter 3. [@crane2018discrete], Section 4.1 -::: - -From a geometric point of view, citing [@crane2018discrete], if linear -algebra can be thought as the natural language of "little arrows", then -exterior algebra is the natural language of "little volumes". For -instance, $1$-vectors represent lengths and $2$-vectors represent area. -They encode two basic pieces of information: direction and magnitude. - -The first ingredient to define $p$-vectors is the **exterior product** -(or wedge product), which is the multiplication operation of the -*exterior algebra*. In this contest, we do not need the formal -definition of this algebra, for more details see Chapter 3 of -[@epstein2010geometrical]. - -Geometrically exterior product provides a way to measure the area of a -parallelogram defined by a pair of vectors or the volume of a -parallelepiped produced by a set of vectors in higher dimensions. - -::: defbox -Given $\boldsymbol{v}_1, \boldsymbol{v}_2 \in \mathcal{V}$ the exterior product -$\boldsymbol{v}_1 \wedge \boldsymbol{v}_2$ is an anticommutative product on the elements -of $\mathcal{V}$ and linear in each of its argument. -::: - -In components, - -$$ -\boldsymbol{v}_1 \wedge \boldsymbol{v}_2 = \sum_{i < j}(v_1^i v_2^j - v_1^j -v_2^i)\boldsymbol{e}_i \wedge \boldsymbol{e}_j. -$$ - -**Definition 1**. For $p= 0,\dots, n$ define the set of $p$**-vectors** -$\bigwedge^p \mathcal{V}$ as follows: - -- $\bigwedge^0 \mathcal{V}:= \mathbb{R}, \bigwedge^1 \mathcal{V}:= \mathcal{V}, \bigwedge^n \mathcal{V}:= \mathbb{R}$. - -- For $2 \leq p \leq n-1$, $\bigwedge^p \mathcal{V}$ is the vector - space spanned by elements represented as - $\boldsymbol{v}_1 \wedge \dots \wedge \boldsymbol{v}_p$, where - $\boldsymbol{v}_i \in \mathcal{V}$. - -It can be proved that the dimension of $\bigwedge^p \mathcal{V}$ is -$\binom{n}{p}$. Note that the exterior product between a $p$-vector and -a $q$-vector can be made and the result is a $(p+q)$-vector. - -:::: defbox -::: Def -**Definition 2**. We define the **dual space** $\mathcal{V}^*$ of -$\mathcal{V}$ as -$$\mathcal{V}^* := \{f: \mathcal{V}\rightarrow \mathbb{R}| \text{ } f \text{ is linear}\}.$$ -::: -:::: - -::: importantbox -It is easy to prove that $\mathcal{V}^*$ is a vector space over -$\mathbb{R}$; we will call the elements of this space **forms**. Since -exterior product is defined over a generic vector space, we have -automatically the definition of $\bigwedge^p \mathcal{V}^*$: the -elements of this set are called **$p$-forms**. -::: - -## Manifolds - -::: refbox -**References:** [@grady2010discrete], Section 2.2.1.2. -[@epstein2010geometrical], Section 4.6 -::: - -:::: defbox -::: Def -**Definition 3**. An **$m$-dimensional manifold** is a topological space -$M$ that is "locally Euclidean", in the sense that for any $x \in M$ -exists $U$ neighborhood of $x$ homeomorphic to an open subset of the -Euclidean space $\mathcal{E}^m$ through $\phi$. The pairs $(U, \phi)$ -are called **charts** and the collection of charts is the **atlas** of -the manifold. A **differential manifold** is a manifold whose -homeomorphisms are indeed diffeomorphisms (i.e. they are -differentiable). -::: -:::: - -We will focus on $n$-dimensional **submanifold** of $\mathcal{E}^{m}$, -i.e. on $n$-dimensional manifold $M \subseteq \mathcal{E}^{m}$. From now -on, we indicate it with $M^n$. - -::: defbox -Since $M^n$ is locally Euclidean, we can define[^1] at each point -$x \in M^n$ the **tangent space** to $M^n$ at $x$, denoted as $T_x M^n$, -as the real vector space consisting of all tangent vectors to $M^n$ at -$x$. -::: - -We can define the **tangent bundle** $T M^n$ of a submanifold $M^n$ as -the set of *all* tangent vectors of $M^n$, i.e. - -$$ -T M^n = \bigcup_{x \in M^n} T_x M^n. -$$ - -:::: defbox -::: Def -**Definition 4**. A **Riemannian manifold** $(M,g)$ is a manifold $M$ -endowed with a positive-definite inner product $g_x$ on the tangent -space $T_x M$ at each point $x \in M$. -::: -:::: - -:::: defbox -::: Def -**Definition 5**. Given $\boldsymbol{v}\in T_x M^n$ and -$f: M^n \rightarrow \mathbb{R}$ differentiable in $x$ we can define the -**directional derivative** of $f$ at point $x$ as - -$$ -(D_{\boldsymbol{v}} f)(x) := \frac{d}{dt}[f(x+t\boldsymbol{v})]_{t = 0} -$$ -::: -:::: - -If $x$ is any local Cartesian coordinate system specified by -$(x^1, \dots, x^n)$ then the directional derivative can be expressed as - -$$ -(D_v f)(q) = \sum_{j = 1}^n \frac{\partial f}{\partial x^j}(q) v^j, -$$ - -from which we discover a one-to-one correspondence between tangent -vectors and differential operators on differentiable functions near $q$. - -:::: defbox -::: Def -**Definition 6**. A **scalar differential form** is a linear functional -$\omega: T_x M^n \rightarrow \mathbb{R}$, i.e. any -$\omega \in (T_x M^n)^*$. We indicate $(T_x M^n)^*$ as $T^*_x M^n$ and -we call it **cotangent space**. -::: -:::: - -As before, we can define the **cotangent bundle** $T^* M^n$ of a -submanifold $M^n$ as the set of *all* scalar differential form on $M^n$, -i.e. $$T^* M^n = \bigcup_{x \in M^n} T^*_x M^n.$$ - -:::: defbox -::: Def -**Definition 7**. Let $f: M^n \rightarrow \mathbb{R}$ be a -differentiable function, we define the **differential** of $f$ at a -point $x \in M^n$ as the linear function -$df|_x: T_x M^n \rightarrow \mathbb{R}$ defined as - -$$ -df(\boldsymbol{v})|_x := D_{\boldsymbol{v}}(f)(x). -$$ -::: -:::: - -What we have done until now can be naturally extended to higher order -vectors and forms. Precisely, we can define the vector space of -$p-$tangent vectors $\bigwedge^p T_q M^n$ in the tangent space $T_q M^n$ -and the dual vector space of **$\mathbf{p}$-differential forms** -$\bigwedge^p T^*_q M^n$ in $T^*_q M^n$. - -## Metric Tensor and Musical Isomorphisms - -::: refbox -**References:** [@grady2010discrete], Section 2.2.1.3. -[@hirani2003discrete], Section 5.2 -::: - -It is well-known that given $\boldsymbol{v},\boldsymbol{w}\in \mathcal{V}$ and -$\tilde{\boldsymbol{v}}, \tilde{\boldsymbol{w}} \in \mathbb{R}^n$ their representation -in components as column vectors - -$$ -\langle \boldsymbol{v},\boldsymbol{w}\rangle = \tilde{\boldsymbol{v}}^T \boldsymbol{G} -\tilde{\boldsymbol{w}}, -$$ - -where a generic entry of $G$ is defined as - -$$ -g_{ij} := \langle \boldsymbol{e}_i, \boldsymbol{e}_j \rangle -$$ - -::: defbox -$\boldsymbol{G}$ is called the **metric tensor**. -::: - -::: importantbox -Every vector $\boldsymbol{v}$ in the inner product space $\mathcal{V}$ can be -associated with a form $\alpha \in \mathcal{V}^*$, which is called the -**covariant version** of $\boldsymbol{v}$. - -Vice versa, given a form $\alpha$ we can associate to it a vector -$\boldsymbol{v}$, which is called the **contravariant version** of $\alpha$. -::: - -These relationships are the so-called **musical isomorphisms**, i.e. -flat and sharp operator. The name of these operators is borrowed from -music: as flat means "lower in pitch" in music, the flat operator lowers -the indices of a $1$-form. Similarly, as sharp means "higher in pitch" -in music, the sharp operator raises the indices of a vector field. - -Let us the formal definition explicitly. - -:::: defbox -::: Def -**Definition 8**. Let $M$ be a Riemannian manifold with metric -$\langle , \rangle$ and let $\alpha$ be a $1$-form on $M$. The **sharp -map** $\sharp$ from $1$-forms to vector fields is defined as - -$$ -\langle \boldsymbol{\alpha}^{\sharp}, \boldsymbol{u}\rangle := \alpha(\boldsymbol{u}), -$$ - -for -any $x \in M$ and $\boldsymbol{u}\in T_x M$ -::: -:::: - -:::: defbox -::: Def -**Definition 9**. Let $M$ be a Riemannian manifold with metric -$\langle , \rangle$ and let $\boldsymbol{v}\in \mathcal{V}(M)$ be a vector field -on $M$. The **flat map** $\flat$ from vector fields to $1$-forms is -defined as $$v^{\flat}(\boldsymbol{u}) := \langle \boldsymbol{v},\boldsymbol{u}\rangle,$$ for -any $x \in M$ and $\boldsymbol{u}\in T_x M$. -::: -:::: - -Note that $\sharp$ and $\flat$ are indeed inverses of each other, as we -should expect. - -## The Exterior Derivative - -::: refbox -**References:** [@grady2010discrete], Section 2.2.2.1. -[@epstein2010geometrical], Section 6.3 -::: - -:::: defbox -::: Def -**Definition 10**. The **exterior derivative** is the unique operator -$d: \bigwedge^p (T^* M^n) \rightarrow \bigwedge^{(p+1)} (T^* M^n)$ that -satisfies the following conditions: for any -$\alpha, \beta \in \bigwedge^p (T^* M^n)$ - -1. $d(\alpha + \beta) = d \alpha + d \beta$. - -2. $d(\alpha \wedge \beta) = (d\alpha) \wedge \beta + (-1)^p \alpha \wedge d\beta$ - (Leibniz's chain rule). - -3. $d(d\alpha) = 0$. - -4. $df$ is the differential of $f$ for any differentiable $0$-form - (i.e. scalar function) $f$. - -A derivative with property 2. is called an **antiderivation**. -::: -:::: - -::: importantbox -Example 2.2 and Example 2.3 of [@grady2010discrete] show how exterior -derivative is linked with the curl of a scalar field and the divergence -of a vector field. -::: - -It is important to stress the difference between $df$ and $\nabla f$: -although there is clearly a link between them, the former is a -*covariant* quantity, whereas the latter is a *contravariant* quantity. -To highlight their connection, we need a metric tensor, from which we -obtain $$df(\boldsymbol{v}) = \langle \langle\nabla f, \boldsymbol{v}\rangle \rangle.$$ - -:::: defbox -::: Def -**Definition 11**. A form $\omega$ is **closed** if $d \omega = 0$. - -A form $\alpha$ is **exact** if exists a form $\beta$ such that -$d \beta = \alpha$. -::: -:::: - -## Integration of Differential Forms in Manifolds - -### The Pull-back of a Form - -::: refbox -**References:** [@epstein2010geometrical], Section 4.13. -[@frankel2011geometry], Section 2.3b and Section 2.7 -::: - -Let $F: M \rightarrow N$ be a smooth map between manifolds $M$ and $N$ -of dimension respectively $m$ and $n$. We start defining the pull-back -for smooth functions (i.e. differential $0$-forms). - -:::: defbox -::: Def -**Definition 12**. Let $\phi: M \rightarrow \mathbb{R}$ be a smooth -function. We define its **pull-back** as the map -$F^*\phi : M \rightarrow \mathbb{R}$ defined as -$$F^*\phi = \phi \circ F$$ -::: -:::: - -:::: defbox -::: Def -**Definition 13**. Let $\omega$ be a $p$-form on $N$. The **pull-back** -of $\omega$ is the $p$-form $F^* \omega$ on $M$ defined as -$$F^* \omega(\boldsymbol{v}_1, \dots, \boldsymbol{v}_p) := \omega(dF(\boldsymbol{v}_1), \dots, dF(\boldsymbol{v}_p)),$$ -where $\boldsymbol{v}_i$ is a vector field on $M$ for every $i$. -::: -:::: - -:::: importantbox -::: Th -**Theorem 14** (Calculus rules). *Let $\alpha$ and $\beta$ be -respectively a $p$-form and a $q$-form in $N$.* - -- *$F^* (\alpha \wedge \beta) = F^* \alpha \wedge F^*\beta$.* - -- *$F* d \alpha = d F^* \alpha$.* -::: -:::: - -### Integration - -::: refbox -**References:** [@flanders1963differential], Section 5.5-5.7. -[@epstein2010geometrical], Chapter 6. [@frankel2011geometry], Chapter 3 -::: - -In this section, we want to define $$\int_{\sigma^p} \omega,$$ where -$\omega$ is a $p$-form and $\sigma^p$ is a $p$-simplex in a -$n$-dimensional manifold $M$. We proceed step by step. - -:::: defbox -::: Def -**Definition 15**. We define the **standard $n$-simplex** $\Delta^n$ in -$\mathbb{R}^n$ as the simplex generated by $p_0 = 0$ and -$$p_i = (0, \dots, \underbrace{1}_\text{i}, \dots, 0),$$ where -$i \in \{1, \dots, n\}$. -::: -:::: - -The first step is to define the integral of an $n$-form in the standard -$n$-simplex. - -:::: defbox -::: Def -**Definition 16**. Let $\omega$ be an $n$-form defined on a domain -$U \subset \mathbb{R}^n$ which includes $\Delta^n$, i.e. -$\Delta^n \subset U$. We can write -$\omega(x) = f(x^1, \dots, x^n) dx^1 \cdots dx^n$ and we define -$$\int_{\Delta^n} \omega := \int_{\Delta^n} f(x^1, \dots, x^n) dx^1 \cdots dx^n,$$ -where the right hand side is the **standard Riemann integral** of the -continuous function $f$. -::: -:::: - -**Example 17**. For example, if $$\omega = dzdydx$$ then -$$\int_{\Delta^3} \omega = -\int_{\Delta^3} dzdydx = - \int^1_0 dy \int_{0}^{1-y} dx \int_{0}^{1-x-y}dz = -\frac{1}{6}.$$ - -Then, finally: - -:::: defbox -::: Def -**Definition 18**. Let $\omega$ be a $p$-form on $M$ and let $\sigma^p$ -be a $p$-simplex in $M$, *i.e.* there exists a smooth mapping $\phi$ of -a neighborhood of $\Delta^p$ into $M$ such that -$\sigma^p = \phi(\Delta^p)$. We define -$$\int_{\sigma^p} \omega := \int_{\Delta^p} \phi^* \omega.$$ -::: -:::: - -The integral of a $p$-form over a $p$-chain on a manifold is then -extended by linearity. - -::: Ex -**Example 19**. **Line integrals**. Consider a curve -$\gamma: \boldsymbol{x}= F(t)$, where $a \leq t \leq b$, in $\mathcal{E}^3$, -oriented such that $d/dt$ defines the positive orientation in -$\mathbb{R}$. If -$\omega = \omega_1(x) dx^1 + \omega_2(x) dx^2 + \omega_3(x) dx^3$ is a -$1$-form on $\mathcal{E}^3$, then -$$\int_\gamma \omega = \int_\gamma \sum_i a_i(x)dx^i = \int^b_a F^*\left[ \sum_i a_i(x) dx^i\right] = \int_a^b \left[ \sum_i a_i(x(t)) \frac{dx^i}{dt} \right] dt,$$ -which is exactly the usual rule for evaluating a line integral! -::: - -We have defined the integral of a $p$-form $\omega$ over a $p$-simplex -in a manifold $M$, however it is possible to define more in general what -is $$\int_M \omega,$$ - -when $M$ is an oriented manifold (see e.g. Section 6.3 in -[@epstein2010geometrical]). - -The most important result regarding the integral of a differential form -is the following - -:::: importantbox -::: Th -**Theorem 20** (Generalized Stokes). *Let $S$ be a $p$-dimensional -oriented submanifold of $M$, let $\partial S$ be its boundary with -induced orientation. Let $\omega$ be a differential $p$-form in the -cotangent bundle $T^* M$, then it holds -$$\int_S d \omega = \int_{\partial S} \omega.$$* -::: -:::: - -::: importantbox -The boundary of the boundary is always zero, hence for Generalized -Stokes the exterior derivative of an exterior derivative is always zero. -::: - -## The Hodge Star Operator - -::: refbox -**References:** [@grady2010discrete], Section 2.2.3 -::: - -The Hodge star operator $\star$ is a linear mapping from $p$-forms to -$(n - p)$-forms that requires a metric tensor and an orientation on the -underlying manifold. It provides a scalar product between forms, and is -necessary to complete the correspondence between standard vector -calculus and the exterior calculus of differential forms. - -:::: defbox -::: Def -**Definition 21**. The **Hodge star operator** -$\star: \bigwedge^p \mathcal{V}^* \rightarrow \bigwedge^{n-p} \mathcal{V}^*$ -is a linear mapping (actually an isomorphism) from $p$-forms to -$(n-p)$-forms defined as follows: given an elementary $p$-form -$\sigma^{i_1} \wedge \dots \wedge \sigma^{i_p}$ -$$\star(\sigma^{i_1} \wedge \dots \wedge \sigma^{i_p}) = \sigma^{i_{p+1}} \wedge \dots \wedge \sigma^{i_n}.$$ -The $(n-p)$-form $\star \omega$ is said to be the **Hodge dual** of the -$p$-form $\omega$. -::: -:::: - -::: importantbox -The Hodge star operator has the following properties, given two -$p$-forms $\alpha$ and $\beta$ and a scalar function $f$. - -- $\star \alpha \wedge \beta = \star \beta \wedge \alpha$. - -- $\star(f\alpha) = f\star\alpha$. - -- $\star (\star \alpha) = (-1)^{p(n-p)} \alpha$. - -- $\star \star \star \star \alpha = \alpha$. - -- $\alpha \wedge \star \alpha = 0$ if and only if $\alpha = 0$. - -Using these properties we obtain -$$\alpha \wedge \star \beta = \langle \boldsymbol{\alpha}, \boldsymbol{\beta}\rangle \text{vol}^n,$$ -where $\boldsymbol{\alpha},\boldsymbol{\beta}$ are respectively the vector of -coefficients of $\alpha,\beta$ and -$$\text{vol}^n = \sqrt{\text{det}(\boldsymbol{G})}dx^1 \wedge \dots \wedge dx^n.$$ -::: - -Through the Hodge star operator, we can define a *global scalar products -of two forms* in a compact manifold $M$ as -$$(\alpha, \beta) := \int_M \alpha \wedge \star \beta = \int_M \langle \boldsymbol{\alpha}, \boldsymbol{\beta}\rangle \text{vol}^n.$$ - -Analogously we can define Hodge star operator between $p$-vectors and -$(n-p)$-vectors. It is important to visualize the Hodge star in -$\mathbb{R}^2$ of $1$-vectors (see next figure), to understand properly -the action of $\star$. - -![Action of $\star$ in $\mathbb{R}^2$ for -$1$-vectors.](Figures/Hodge.png){width="3.5cm" height="3cm"} - -::: importantbox -For a $1$-form $\boldsymbol{\alpha}$ in $\mathbb{R}^3$ -$$\star d \alpha \Leftrightarrow \text{curl}(\boldsymbol{\alpha}), \quad \star d\star\alpha \Leftrightarrow \text{div}(\boldsymbol{\alpha})$$ -::: - -## Laplace-de Rham Operator - -::: refbox -**References:** [@grady2010discrete], Section 2.2.3.1 -::: - -We have already seen that the exterior derivative operator maps -$p$-forms to $(p+1)$-forms. The **codifferential operator** does exactly -the opposite. - -:::: defbox -::: Def -**Definition 22**. The **codifferential operator** -$d^*: \bigwedge^p (T^* M^n) \rightarrow \bigwedge^{p-1} (T^* M^n)$ is -defined as $$d^* := (-1)^{n(p+1)+1}\star d \,\star$$ -::: -:::: - -$d^*$ is the adjoint of the exterior derivative $d$ with respect to the -global scalar product defined previously, precisely -$$(d\alpha, \beta) = (\alpha, d^*\beta).$$ - -:::: defbox -::: Def -**Definition 23**. The **Laplace-de Rahm operator** -$\Delta:\bigwedge^p (T^* M^n) \rightarrow \bigwedge^p (T^* M^n)$ is -defined as $$\Delta := d\,d^* + d^*\,d$$ -::: -:::: - -Note that the Laplace-de Rham operator is self adjoint and is the -extension of the standard Laplacian up to a sign, i.e. if $f$ is a -$0$-form then $$\Delta f = - \nabla^2 f.$$ - -## Vector Bundles and Vector-Valued Differential Forms - -Schema per scrivere sta parte: - -- Covariant differentiation - -- Bundle-valued forms - -[Intro alla sezione?]{style="color: red"} - -### Vector Bundles - -::: refbox -**References:** [@darling1994differential], Chapter 6 -::: - -[Aggiustare]{style="color: red"} - -Hence, another question arises: what is the exterior derivative of a -vector-valued differential forms? More in general, how it is defined a -vector-valued differential form? - -In the differential framework, the generalization of differential forms -are *vector bundle differential forms*, whose are differential forms -with values in some vector bundle $E$ of a smooth manifold $M$. A -*vector-valued differential form* is then a differential forms with -values in the trivial bundle $M \times V$. - -In the general case, i.e. for vector-bundle differential forms, one -defines the concepts of *connection* $\nabla$, *parallel transport* and -finally *exterior covariant derivative* $d_{\nabla}$, which is the -natural counterpart of the exterior derivative for differential forms. - -[Appena possibile aggiungere commenti tra le -definizioni]{style="color: red"} - -:::: defbox -::: Def -**Definition 24**. Let $M$ be a differential manifold and let -$\mathcal{V}$ be a $k$-dimensional vector space. The product manifold -$M \times V$ together with the projection map -$\pi: M \times V \rightarrow M$ such that $\pi(p, \boldsymbol{v}) = p$ is a -**local vector bundle of rank $k$** (or **trivial bundle of rank $k$**) -over $M$. -::: -:::: - -:::: defbox -::: Def -**Definition 25**. Let $E = M \times \mathcal{V}$ and -$E' = N \times \mathcal{W}$ be respectively a trivial bundle of rank $k$ -over $M$ and of rank $q$ over $N$. A $C^r$ map $\Phi: E \rightarrow E'$ -is a **(local) vector bundle morphism** if exists a map -$\varphi: M \rightarrow N$ such that -$$\Phi(p,\boldsymbol{v}) = (\varphi(p), g(p)\boldsymbol{v}) \in N \times \mathcal{W},$$ -where $g(p) \in \text{Lin}(\mathcal{V}, \mathcal{W})$ for any $p$. -::: -:::: - -Simply, a local vector bundle morphism is a map which is "linear on the -fibers". - -:::: defbox -::: Def -**Definition 26**. Let $E = M \times \mathcal{V}$ and -$E' = M \times \mathcal{W}$ be trivial bundles over $M$. The -**homeomorphism bundle** $\text{Hom}(E, E')$ is the trivial bundle -$M \times \text{Lin}(\mathcal{V}, \mathcal{W})$. -::: -:::: - -:::: defbox -::: Def -**Definition 27**. Let $M$ be a differential manifold. A manifold $E$ -together with a smooth surjective map $\pi: E \rightarrow M$ (called -**projection**) is a $C^r$ **vector bundle of rank $k$ over $M$** if the -following three conditions hold: - -- There exists a $k$-dimensional vector space $\mathcal{V}$ such that, - for every $p \in M$, $E_p := \pi^{-1}(p)$ is a real vector space - isomorphic to $\mathcal{V}$. $E_p$ is called the **fiber** over $p$. - -- Each point in $M$ is contained in some open set $U \subseteq M$ such - that there is a $C^r$ diffeomorphism - $$\Phi_U: \pi^{-1}(U) \rightarrow U \times V \label{loctriv}$$ such - that $\Phi_U(E_p) = \{p\} \times V$. - -- For any two open sets $U, U'$ with $U \cap U' \neq \emptyset$, the - map - $$\Phi_U \circ \Phi^{-1}_{U'}: (U \cap U') \times V \rightarrow (U \cap U') \times V$$ - is a $C^r$ local vector bundle isomorphism over identity. -::: -:::: - -[Aggiungere commenti su vector bundles]{style="color: red"} - -![A vector bundle $E$ over a base -$M$.](Figures/VectorBundle.png){width="8cm" height="5cm"} - -:::: defbox -::: Def -**Definition 28**. A $C^s$ **section** of a $C^r$ vector bundle -$\pi: E \rightarrow M$, where $s \leq r$, is a $C^s$ mapping -$\sigma: M \rightarrow E$ such that $\pi \circ \sigma(p) = p, p \in M$. -In other words, $\sigma(p) \in E_p$ for all $p \in M$. -::: -:::: - -![A vector bundle $E$ over a base $M$ with section -$s$.](Figures/Section.png){width="8cm" height="5cm"} - -All the constructions with trivial bundles are valid for any $C^r$ -vector bundle: see 6.4.3 of [@darling1994differential]. - -### Connections on Vector Bundles - -::: refbox -**References:** [@darling1994differential], Chapter 9 -::: - -Let $\pi: E \rightarrow M$ be a smooth rank-$m$ vector bundle and -$\sigma: M \rightarrow E$ be a section. In terms of a local frame field -$\{s_1, \dots, s_m\}$, we can write -$$\sigma(r) = \sum_i \sigma^i(r) s_i(r) \in E_p,$$ where $\sigma^i$ is a -smooth function in some open set of $M$ for any $i$. Given a vector -field $\boldsymbol{v}$ on $M$, we want to define what it means to "differentiate -a section $\sigma$ with respect to $\boldsymbol{v}$". In other terms, we would -like to have a new section $\nabla_{\boldsymbol{v}} \sigma$ which satisfy for -all smooth functions $h \in C^{\infty}(M)$ the Leibniz rule, i.e. -$$\nabla_{\boldsymbol{v}}(h \sigma) = h(\nabla_{\boldsymbol{v}}\sigma) + (\boldsymbol{v}h)\sigma$$ -and satisfying $$\begin{aligned} - &\nabla_{h \boldsymbol{v}} \sigma = h (\nabla_{\boldsymbol{v}} \sigma),\\ - &\nabla_{\boldsymbol{v}_1 + \boldsymbol{v}_2} \sigma = \nabla_{\boldsymbol{v}_1} \sigma + \nabla_{\boldsymbol{v}_2} \sigma,\\ - &\nabla_{\boldsymbol{v}}(\sigma_1 + \sigma_2) = \nabla_{\boldsymbol{v}} \sigma_1 + \nabla_{\boldsymbol{v}} \sigma_2. -\end{aligned}$$ - -:::: defbox -::: Def -**Definition 29**. An operation $\nabla$ satisfying the previous -properties is called a **Koszul connetion** (or simply **connection**) -on $E$ and $\nabla_{\boldsymbol{v}} \sigma$ is called the **covariant -derivative** of $\sigma$ along $\boldsymbol{v}$. -::: -:::: - -:::: defbox -::: Def -**Definition 30**. Let $\pi: E \rightarrow M$ be a vector bundle of rank -$m$ over an $n$-dimensional manifold $M$, let $1 \leq q \leq n$. An -**$E$-valued $q$-form** is a section of the vector bundle -$\text{Hom}(\Lambda^q TM, E)$. By definition, the sections of -$\pi: E \rightarrow M$ will be called **$E$-valued $0$-forms**. The set -of $E$-valued $q$-forms is denoted by $\Lambda^q(M, E)$. -::: -:::: - -If $E$ is the trivial bundle $M \times \mathcal{V}$ the set -$\Lambda^q(M, E)$ (which is usually abbreviated with -$\Lambda^q(M, \mathcal{V})$) can be identified, once a base of -$\mathcal{V}$ is fixed, with a set of $m$-tuples -$(\omega_1, \dots, \omega_m)$ of scalar-valued $q$-forms on $M$. -[continua da qui]{style="color: red"} - -# Discrete Calculus - -::: refbox -**References:** [@grady2010discrete]. [@hirani2003discrete]. -[@grinspun2006discrete] -::: - -After having introduced the basics of exterior calculus, in this section -we focus on its discrete counterpart. The goal is translating -appropriately the tools introduced before in a continuous setting. - -## Discrete Domains - -::: refbox -**References:** [@grady2010discrete], Section 2.3.1. -[@hirani2003discrete], Section 2.1, 2.3. [@grinspun2006discrete] -::: - -:::: defbox -::: Def -**Definition 31**. A **$p$-cell** $\sigma^p$ is defined as a set of -points which is homeomorphic to a closed unit $p$-ball -$B_p := \{x \in \mathbb{R}^p | ||x|| \leq 1\}$. The boundary of the -$p$-cell $\partial \sigma^p$ is the portion of the cell which is mapped -through the homeomorphism to $\partial B_p$. - -When a $p$-cell consists of exactly $p+1$ vertices it is called -**$p$-simplex**. -::: -:::: - -:::: defbox -::: Def -**Definition 32**. A collection of cells defines a **cell complex** if -it satisfies the following rules: - -- The boundary of each $p$-cell (for $p > 0$) comprises the union of - lower-order $p$-cells. - -- The intersection of any two cells is either empty or a boundary - element of both cells. -::: -:::: - -This definition is exactly the concept of discrete manifold in -[@grinspun2006discrete] (see p. 43, Section 3.1.5). In -[@hirani2003discrete] cell complexes defined according to the previous -statement are called *manifold-like cell complex*. Hence, we can think -that a cell complex is the discrete counterpart of a manifold, in the -sense that in discrete calculus it plays the role of a manifold in -classical exterior calculus. - -A **simplicial complex** is a cell complex in which every $p$-cell is a -$p$-simplex. - -![An example of a $2$-simplicial complex (left) and a not simplicial -complex -(right).](Figures/Cell complex vs not cell complex.png){width="8cm" -height="5cm"} - -We now introduce some operative definitions that we are going to use in -the following sections. - -:::: defbox -::: Def -**Definition 33**. A **well-centered simplicial complex** is a -simplicial cell-complex where the circumcenter of any $p$-simplex of the -complex lies in its interior. -::: -:::: - -:::: defbox -::: Def -**Definition 34**. A **flat** simplicial complex $K$ of dimension $n$ in -$\mathbb{R}^N$ is one of which all simplices are in the same affine -$n$-subspace of $\mathbb{R}^N$. -::: -:::: - -We will require that each $p$-cell is oriented and the orientation is -specified by the order of nodes used to represent the $p$-cell. See p. -42-44 of [@grady2010discrete] for more details in this regard. - -::: importantbox -We also introduce the following notation for $p$-simplices: -$\sigma^q \prec \sigma^p$ if and only if $\sigma^q$ is a proper face of -$\sigma^p$. -::: - -:::: defbox -::: Def -**Definition 35**. The **incidence matrix** $\sf{A}_p$ is the matrix -which encodes which $p$-cells are incident to which $(p-1)$-cells in the -$n$-complex and it is defined as $$\sf{A}_p(i,j) = \begin{cases} - 0 \quad \text{if } \sigma^{p-1}_i \text{ is not on the boundary of } \sigma_j^p,\\ - +1 \quad \text{if } \sigma^{p-1}_i \text{ is coherent with the induced orientation of } \sigma^p_j,\\ - -1 \quad \text{if } \sigma^{p-1}_i \text{ is not coherent with the induced orientation of } \sigma^p_j.\\ - \end{cases}$$ -::: -:::: - -::: Ex -**Example 36**. Let us see an explicit example to understand better the -previous definition of incidence matrix. - -![A $2$-simplicial complex](Figures/Oriented.png){width="8cm" -height="5cm"} - -In this case, the incidence matrix $\sf{A}_1$ is -$$\sf{A}_1 = \begin{bmatrix} - -1 & 0 & 1 & 0 & 1\\ - 1 & -1 & 0 & 0 & 0\\ - 0 & 1 & -1 & -1 & 0\\ - 0 & 0 & 0 & 1 & -1\\ - \end{bmatrix}$$ -::: - -:::: defbox -::: Def -**Definition 37**. Let $K$ be a cell complex. A **$p$-chain** is an -$n_p$-tuple of scalars which assigns a coefficient to each $p$-cell, -where $n_p$ is the number of distinct $p$-cells in the complex. Each -$p$-cell is referred to a **basic chain**. The $p$-chains group is -denoted by $\mathcal{C}_p(K, \mathbb{R})$. -::: -:::: - -![An example of $1$-chain.](Figures/Chain.png){width="4cm" height="3cm"} - -A $p$-chain $c_p$ can be expressed with respect to basic chains: -$$c_p = \sum_j c_p(\sigma^p_j) \sigma^p_j,$$ - -where $c_p(\sigma^p_j) \in \mathbb{R}$ and $\sigma_j$ is a basic chain -for any $j$. Thus, any $p$-chain may be represent by a $n_p \times 1$ -(row) vector $\sf{c}_p$ and by applying the incidence matrix -$\mathsf{A}_p$ to it we obtain a $(p-1)$-chain, i.e. in components -$$\sf{c}_{p-1} = \sf{A}_p \sf{c}_p,$$ - -where $\sf{c}_{p-1}$ is the array of the coefficients of the -**boundary** of the $p$-chain $c_p$. Hence, $\sf{A}_p$ may be viewed as -the matrix representation of the **discrete boundary operator**. We will -indicate the boundary operator with the symbol $\partial$. - -::: importantbox -The incidence matrix provides both a representation of the topology of -the manifold and a representation of the boundary operator. -::: - -Geometrically, $p$-chains are the discrete representation of -$p$-vectors: their coefficients (weights) can be used to encode length, -areas, etc. For instance, $1$-chains represents lengths, while -$2$-chains represents areas and so on. - -## Discrete Forms and Coboundary - -::: refbox -**References:** [@grady2010discrete], Section 2.3.1 -::: - -:::: defbox -::: Def -**Definition 38**. A $p$-**cochain**, or discrete form, is a linear -functional that maps chains to scalars. As for the chains, we can -represent cochains in terms of **basic cochains** -$$c^p = \sum_i c^p(\sigma_p^i) \sigma_p^i,$$ where $a_i \in \mathbb{R}$ -and $\sigma_p^i$ is a basic $p$-cochain. The space of $p$-cochains on a -simplicial complex $K$ is denoted by $\mathcal{C}^p(K, \mathbb{R})$. -::: -:::: - -Cochains are the discrete counterpart of differential forms, hence they -are also called *discrete forms*. Indeed, we know that differential -$p$-forms are built taking the dual of the vector space of $p$-vectors -and similarly the space of scalar-valued $p$-cochains is the dual of the -space of scalar-valued $p$-chains. We can represent a $p$-cochain as a -$1 \times n_p$ vector (row vector). - -:::: defbox -::: Def -**Definition 39**. We can define a discrete analogue of **integration** -as the pairing of a $p$-chain with a $p$-cochain, precisely -$$\langle \langle c^p, c_p \rangle \rangle:= \sum_{i=1}^{n_p} c_p(\sigma^p_i)c^p(\sigma_p^i)$$ -::: -:::: - -:::: defbox -::: Def -**Definition 40**. We define the matrix form of **coboundary operator** -$\boldsymbol{D}_p$ as the adjoint of the boundary operator through the pairing -defined previously[^2], i.e. by definition -$$\langle \langle\boldsymbol{D}_p\boldsymbol{c}^{p-1}, \boldsymbol{c}_p \rangle \rangle= \langle \langle\boldsymbol{c}^{p-1}, \boldsymbol{A}_p\boldsymbol{c}_p \rangle \rangle.$$ -Hence, $\boldsymbol{D}_p = \boldsymbol{A}^T_p$. - -Without using components, the previous equality takes the form -$$\langle \langle d c^{p-1}, c_p \rangle \rangle= \langle \langle c^{p-1}, \partial c_p \rangle \rangle.$$ - -The **coboundary operator** (not in components) will be denoted with -$d$. -::: -:::: - -![An example of the application of the coboundary operator to a -$0$-cochain, giving rise to a -$1$-cochain.](Figures/Coboundary.png){width="8cm" height="6cm"} - -The coboundary operator can be seen as the discrete counterpart of the -exterior derivative, since if we apply the coboundary operator to a -$p$-cochain we obtain a $(p+1)$-cochain and a discrete version of -Stokes' Theorem holds (see the previous definition). - -## Primal and Dual Complexes - -::: refbox -**References:** [@grady2010discrete], Section 2.3.3. -[@tonti2013mathematical], Section 4.2.1. [@hirani2003discrete], Chapter -2. -::: - -Given a cell complex of dimension $n$, we can define its *dual* by -associating a $p$-cell with an $(n-p)$-cell, following a specific rule. -In the case of simplicial complex, the following rules are of relevant -importance, since they are the most used in applications. - -- **Circumcentric (Voronoi) dual**. Voronoi cells are polygons whose - sides are the axes of the edges of a primal simplicial complex. - -- **Barycentric dual**. Barycentric cells are polygons obtained by - connecting the barycentre of every triangle with the midpoint of the - edges of the triangles. - -For more details on this construction, see section 4.2 of -[@tonti2013mathematical]. - -The dual of a cell complex $K$ is indicated as $\star K$ and a generic -dual $p$-cell of $\star K$ is indicated as $\star \sigma^{(n-p)}$. - -### Orientations {#orientationsection} - -Once we have a primal complex, we have to orient it in order to compute -properly the boundary matrices. To do so, we choose one of the two -possible orientations, clockwise or counterclockwise, for all the -$n$-cells and this choice induces an orientation for all the $p$-cells -with $0 \leq p \leq n-1$, see [@hirani2003discrete] Definition 2.3.5. - -We follow the vision of [@hirani2003discrete] who says that points (i.e. -$0$-cells) have no orientation, even though in [@tonti2013mathematical] -points are oriented as sinks or sources. - -Following this receipt, we are able to give an orientation to the all -the $p$-cells of the primal complex. This induces an orientation of all -the $p$-cells of the dual complex and this is due to the the fact that -the primal $p$-cells and dual $(n-p)$-cells have a clear association. -Following the algorithm described in Remark 2.5.1 of -[@hirani2003discrete] we are able to orient all the dual $p$-cells. -Geometrically, we orient the dual $(n-p)$-cell rotating of $\pi/2$ -counterclockwise the orientation of the corresponding primal $p$-cell. - -We follow the previous rule to orient primal and dual complex. Note that -this choice is crucial: if we change the orientation rule, we will also -have to touch the definition of the operators (coboundary, hodge star, -etc). For example, in [@grady2010discrete] the induced orientation of -the dual complex is different and consequently the definition of the -operators is different. - -### Dual boundary - -We wish to define the dual boundary $\partial^{\star}$ in order to also -have a dual coboundary $d^\star$ obtained by the relation -$$\langle \langle d^\star \alpha, \star \beta \rangle \rangle= \langle \langle\alpha, \partial^\star \star \beta \rangle \rangle.$$ - -We have to take care about the sign of the dual boundary, as stated in -[@schulz2020convergence]. The following definition -[@schulz2020convergence] is consistent with our orientation rule. - -:::: defbox -::: Def -**Definition 41**. The **dual boundary operator** -$\partial_p^*: \mathcal{C}_p(\star K, \mathbb{R}) \rightarrow \mathcal{C}_{p-1}(\star K, \mathbb{R})$ -is the linear operator such that -$$\partial_p^\star \star \tau = (-1)^{p+1} \sum_{\eta \succ \tau} \star \eta,$$ -where $\star \tau$ is an arbitrary dual $p$-simplex and $\eta$ is a dual -$(p+1)$-simplex oriented in order to induce a consistent orientation on -$\tau$. -::: -:::: - -As we stated previously, the definition of the dual coboundary operator -is straightforward now. The following result -[@munkres2018elements; @milicchio2008codimension], called *Poincarè -duality*, gives us an explicit relation between primal coboundary and -dual boundary. - -:::: importantbox -::: Th -**Theorem 42**. *There exists a family of isomorphisms -$\phi_p: \mathcal{C}^{p}(K) \rightarrow \mathcal{C}_{n-p}(\star K)$ such -that the following diagram commutes for any $k$. $$\begin{CD} - \mathcal{C}^{p-1}(K) @>\phi_{p-1}>> \mathcal{C}_{n-p+1}(\star K)\\ - @VVd_{p-1}V @VV\partial_{n-p+1}^\star V\\ - \mathcal{C}^{p}(K) @>\phi_p>> \mathcal{C}_{n-p}(\star K)\\ - \end{CD}$$* -::: -:::: - -The proof of the previous Theorem (see proof of Theorem 65.1 of -[@munkres2018elements]) is constructive and we can see that the -definition of $\phi_p$ is strongly dependent on the orientation. - -The following result is a practical consequence of the previous -statements [@schulz2020convergence; @desbrun2005discrete] - -::: importantbox -Given a primal $n$-complex, the matrix representation of the boundary -operator on primal $p$-cells $\sf{A}_p$ is the transpose of the (matrix -representation of the) boundary operator on dual $(n - p - 1)$-cells -${\sf{A}^*_{n-p-1}}$, *i.e.* -$$\sf{A}_p = (-1)^{p+1}( {\sf{A}^{\star}_{n-p-1}})^T,$$ or equivalently -$$\sf{A}^\star_{n-p-1} = (-1)^{p+1} \sf{A}^T_p$$ -::: - -All these relations can be summarized by the following diagrams, in -which $\star$ is the *discrete Hodge star* (introduced formally in the -next section) which allows us to pass from a primal $p$-cell to its -correspondent dual $(n-p)$-cell. - -$$\begin{CD} -\mathcal{C}^p(K) @>d_p>> \mathcal{C}^{p+1}(K)\\ -@VV\star_pV @VV\star_{p+1}V\\ -\mathcal{C}^{n-p}(\star K) @0$ is a function - $\mathcal{W}^p: \mathcal{C}^p(K, \mathbb{R}) \rightarrow \Lambda^p(K^{(p)})$ - defined at every basic $p$-cochain $\sigma^i_p$ referred to the - $p$-cell $\sigma^p_i = [x_0, \dots, x_p]$ as - $$\mathcal{W}^p(\sigma^i_p) := p!\sum_{i=0}^p (-1)^i \lambda_{x_i} d\lambda_{x_0} \wedge \dots \widehat{d\lambda_{x_i}} \wedge d\lambda_{x_p},$$ - where $\widehat{\quad \quad}$ indicates a term omitted from the - product. Obviously for a generic $p$-cochain the Whitney map acts as - follows - $$\mathcal{W}^p(\sum_i a_i \sigma^i_p) := \sum_i a_i \mathcal{W}^p(\sigma^i_p).$$ -::: -:::: - -::: Ex -**Example 56**. To get in touch with the definition above, let us see -explicitly the case $p = 1$. Let $\sigma^1 = [\sigma^0_0, \sigma^0_1]$ -be a $1$-simplex and let $\sigma_1$ be the basic cochain associated to -$\sigma^1$, then -$$\mathcal{W}^1(\sigma_1) := \lambda_{\sigma^0_0} d \lambda_{\sigma^0_1} - \lambda_{\sigma^0_1} d \lambda_{\sigma^0_0}.$$ -::: - -:::: importantbox -::: Th -**Theorem 57**. *$\mathcal{W}^p$ is an isomorphism into its image. -Moreover, it holds -$$\mathcal{R}^p\mathcal{W}^p = \text{id}_{\mathcal{C}^p(K, \mathbb{R})}$$* -::: -:::: - -:::: importantbox -::: Th -**Theorem 58**. *Let $c^p$ be a scalar-valued $p$-cochain. Then -$$\mathcal{W}^p d c^p = d \mathcal{W}^p c^p$$* -::: -:::: - -See p.3 of [@lohi2021whitney] for some interesting comments and remarks -regarding Whitney forms. - -## Vector-valued and Tensor-valued Cochains - -Until now, greater attention was given to the discrete counterpart of -scalar fields. However, we frequently face situations where we have to -manipulate vector and tensor fields (in the differential formulation), -hence we need to translate this framework properly. - -Firstly, we need a generalization of the definition of cochain. - -:::: defbox -::: Def -**Definition 59**. A **vector-valued $p$-cochain** is the group of -linear functions from $\mathcal{C}_p(K, \mathbb{R})$ to a vector space -$V$ and it is indicated as $\mathcal{C}^p(K, V)$. In the same fashion, -let Lin be the vector space of tensors. A **tensor-valued $p$-cochain** -is the group of linear functions from $\mathcal{C}_p(K, \mathbb{R})$ to -Lin and it is indicated as $\mathcal{C}^p(K, \text{Lin})$. -::: -:::: - -Any vector-valued $p$-cochain can be written as a linear combination -(with vector coefficients!) of basic $p$-cochains, in other words we can -write a generic vector-valued $p$-cochain as -$$\boldsymbol{c}^p = \sum_i \boldsymbol{c}^p(\sigma_p^i)\sigma_p^i,$$ where each -$\boldsymbol{c}^p(\sigma_p^i) \in \mathcal{V}$. - -Reasoning in components, let $\{\boldsymbol{e}_1, \dots, \boldsymbol{e}_n\}$ be a base -of a vector space $V$. A vector valued $p$-cochain $\boldsymbol{c}^p$ maps a -$p$-chain $c_p$ into a vector $\boldsymbol{c}^p(c_p) = \boldsymbol{c}^p_i \boldsymbol{e}_i$. -Note that $\boldsymbol{c}^p_i$ is a linear map from $p$-chains to scalars, i.e. -a discrete-valued $p$-cochain! An analogous analysis can be done for -tensor-valued cochains. - -## Coboundary of a Vector-Valued Cochain - -A natural way to define the coboundary of a vector-valued cochain is -"component-wise", in the sense that if -$\boldsymbol{c}^p = \sum_i \boldsymbol{c}^p(\sigma^i_p) \sigma^i_p$ is a vector-valued -$p$-cochain and $d$ is the usual coboundary operator for scalar-valued -cochain, then -$$d \boldsymbol{c}^p := \sum_i \boldsymbol{c}^p(\sigma^i_p) d \sigma^p_i. \label{cobvec}$$ -Geometrically, we are adding up the contributions of basic $p$-cochains -to obtain a $(p+1)$-cochain. On the contrary, we also want to preserve -the relationship between continuous and discrete world, in the sense -that vector-valued cochains should be the discrete counterpart of -vector-valued differential forms. - -Berwick-Evans et al [@berwick2021discrete] defined the discrete exterior -covariant derivative and in the special case of trivial bundles this -coincides with [\[cobvec\]](#cobvec){reference-type="eqref" -reference="cobvec"}. Their definition of a discrete $d_\nabla$ is -$$\langle d_\nabla \alpha, [0,\dots, k] \rangle_0 := U_{01}\langle \alpha, [1,\dots,k] \rangle_1 + \sum_{i=1}^k (-1)^i \langle \alpha, [0, \dots, \hat{i}, \dots, k] \rangle_0,$$ - -where the $0$ and $1$ subscripts describe where the vector is -transported through the discrete parallel transport -$U_{01}: \mathcal{V}_1 \rightarrow \mathcal{V}_0$ and -$\sigma^k = [0,\dots, k]$ is a general ordered $k$-simplex. Since in the -case of trivial bundles we have a common vector space $\mathcal{V}$, we -have $U_{ij} = id_{\mathcal{V}}$ for any $i \neq j$, thus we can -disregard subscripts. We have $$\begin{split} - \langle d_\nabla \alpha, [0,\dots, k] \rangle &:= \langle \alpha, [1,\dots,k] \rangle + \sum_{i=1}^k (-1)^i \langle \alpha, [0, \dots, \hat{i}, \dots, k] \rangle\\ - & = \langle \alpha, \sum^k_{i=0} (-1)^i [0, \dots, \hat{i}, \dots, k] \rangle\\ - &= \langle \alpha, \partial \sigma^k \rangle, - \end{split}$$ - -thus $d_\nabla$ is the adjoint with respect to chain-cochain pairing of -the boundary operator. Since also the coboundary operator defined in -[\[cobvec\]](#cobvec){reference-type="eqref" reference="cobvec"} -satisfies this property, they must coincide. - -Of course, for tensor-valued cochains we can repeat exactly the same -reasoning. - -## Interpolation of Discrete Vector and Tensor Fields - -As we have seen previously, it is possible to define primal and dual -discrete vector fields and in the same fashion discrete tensor fields -"attaching arrows to points". Hence, discrete vector and tensor fields -are in principle related to $0$-simplices. This can be a problem when we -want to know the value of a vector field along the edges, i.e. -$1$-simplices. Again, to face this problem an important role is played -by *interpolation*. - -:::: defbox -::: Def -**Definition 60**. Let $K$ be a simplicial complex. A **primal -$\mathbf{1}$-interpolation** is a function -$\mathcal{I}_1: \mathcal{V}_d(K) \cup \mathcal{T}_d(K) \rightarrow \mathcal{V}(K^{(1)}) \cup \mathcal{T}(K^{(1)})$ -such that $$\begin{aligned} - &\forall \boldsymbol{v}\in \mathcal{V}_d(K) \quad \mathcal{I}_1(\boldsymbol{v}) \in \mathcal{V}(K^{(1)}).\\ - &\forall \boldsymbol{T}\in \mathcal{T}_d(K) \quad \mathcal{I}_1(\boldsymbol{T}) \in \mathcal{T}(K^{(1)}). - -\end{aligned}$$ -::: -:::: - -An analogous definition can be made for dual interpolations. - -:::: defbox -::: Def -**Definition 61**. Let $K$ be a simplicial complex. A **dual -$\mathbf{1}$-interpolation** is a function -$\mathcal{I}^{\star}_1: \mathcal{V}_d(\star K) \cup \mathcal{T}_d(\star K) \rightarrow \mathcal{V}(K_{(1)}) \cup \mathcal{T}(K_{(1)})$ -such that $$\begin{aligned} - &\forall \boldsymbol{v}\in \mathcal{V}_d(\star K) \quad \mathcal{I}^{\star}_1(\boldsymbol{v}) \in \mathcal{V}(\star K^{(1)}).\\ - &\forall \boldsymbol{T}\in \mathcal{T}_d(\star K) \quad \mathcal{I}^{\star}_1(\boldsymbol{T}) \in \mathcal{T}(\star K^{(1)}). - -\end{aligned}$$ -::: -:::: - -## General Discrete Flat Operator - -As we have seen in previous sections, Hirani [@hirani2003discrete] -defined flat operators through interpolation. We want to organize and -collect these definitions and extend them to discrete vector and tensor -fields. - -In the following, we denote with $\mathcal{T}_d(K)$ and -$\mathcal{T}_d(\star K)$ respectively the space of discrete primal -tensor fields and discrete dual tensor fields. - -:::: defbox -::: Def -**Definition 62**. The **discrete primal $\mathbf{0}$-flat** operator is -a map -$\flat_0: \mathcal{V}_d(K) \cup \mathcal{T}_d(K) \rightarrow \mathcal{C}^0(K, V) \cup \mathcal{C}^0(K, \textsl{Lin})$ -defined as follows $$\begin{aligned} - &\forall \boldsymbol{v}\in \mathcal{V}_d(K) \quad \flat_0 \boldsymbol{v}:= \sum_i \boldsymbol{v}(\sigma^0_i) \sigma^0_i \in \mathcal{C}^0(K, V).\\ - &\forall \boldsymbol{T}\in \mathcal{T}_d(K) \quad \flat_0 \boldsymbol{T}:= \sum_i \boldsymbol{T}(\sigma^0_i) \sigma^0_i \in \mathcal{C}^0(K, \textsl{Lin}). - -\end{aligned}$$ - -The **discrete dual $\mathbf{0}$-flat** operator is a map -$\flat^{\star}_0: \mathcal{V}_d(\star K) \cup \mathcal{T}_d( \star K) \rightarrow \mathcal{C}^0(\star K, V) \cup \mathcal{C}^0(\star K, \textsl{Lin})$ -defined as follows $$\begin{aligned} - &\forall \boldsymbol{v}\in \mathcal{V}_d(\star K) \quad \flat^{\star}_0 \boldsymbol{v}:= \sum_i \boldsymbol{v}(\star \sigma^n_i){\star\sigma^0_i} \in \mathcal{C}^0(\star K, V).\\ - &\forall \boldsymbol{T}\in \mathcal{T}_d(K) \quad \flat^{\star}_0 \boldsymbol{T}:= \sum_i \boldsymbol{T}(\star \sigma^n_i){\star\sigma^n_i} \in \mathcal{C}^0(\star K, \textsl{Lin}). - -\end{aligned}$$ -::: -:::: - -The $0$-flat operator previously defined is exactly the one described in -[@boom2022geometric] extended in a straightforward way to discrete -tensor field. Before defining the discrete $1$-flat operator we have to -extend the definition of the de Rham map for vector-valued forms. - -To do so, we just have to say what is $$\int_{\sigma^p} \omega,$$ - -for a vector-valued form $\omega$ and a $p$-simplex $\sigma^p$. A -vector-valued $p$-form in a trivial bundle can be expressed as -$\omega = \sum_i \boldsymbol{e}_i \otimes \omega^i$ where $\omega^i$ is a -scalar-valued $p$-form. Hence, since in this case we have a global frame -we define -$$\int_{\sigma^p} \omega := \sum_i \int_{\sigma^p} \omega^i \boldsymbol{e}_i.$$ - -In particular, the de Rham map can be trivially extended, using the same -definition for the scalar case. - -In the following, we indicate with $\flat_c$ the continuous flat -operator defined in Chapter 1. Since we work with a global metric, we -identify a vector field with its associated $1$-form and a tensor field -with its associated vector-valued $1$-form (it corresponds to apply -properly the continuous flat operator). - -:::: defbox -::: Def -**Definition 63**. The **discrete primal $\mathbf{1}$-flat** -$\flat_1: \mathcal{V}_d(K) \cup \mathcal{T}_d(K) \rightarrow \mathcal{C}^1(K, \mathbb{R}) \cup \mathcal{C}^1(K, V)$ -is defined as $$\begin{aligned} - &\forall \boldsymbol{v}\in \mathcal{V}_d(K) \quad \flat_1 \boldsymbol{v}:= \mathcal{R}^1(\mathcal{I}_1(\boldsymbol{v})) \in \mathcal{C}^1(K, \mathbb{R}).\\ - &\forall \boldsymbol{T}\in \mathcal{T}_d(K) \quad \flat_1 \boldsymbol{T}:= \mathcal{R}^1(\mathcal{I}_1(\boldsymbol{T})) \in \mathcal{C}^1(K, \mathcal{V}). - -\end{aligned}$$ - -The definitions of the **discrete dual $\mathbf{1}$-flat** -$\flat^{\star}_1$ is analogous. -::: -:::: - -The idea of this definition comes from [@hirani2003discrete] and -[@boom2022geometric], the difference is that we extend this operator to -discrete tensor fields and that we explicitly separate the contribute of -interpolation from the process of integration. - -::: Ex -**Example 64**. Let $\boldsymbol{v}\in \mathcal{V}(K)$ and suppose that -$\mathcal{I}_1$ is the linear $1$-interpolation, i.e. -$\mathcal{I}_1(\boldsymbol{v})$ is the piecewise linear vector field on -$K^{(1)}$ which coincides with $\boldsymbol{v}$ in the vertices, we want to -compute $\flat_1 \boldsymbol{v}$. Let -$\sigma^1 \in K^{(1)} = [\sigma^0_0, \sigma^0_1]$ be a $1$-simplex of -$K$ and suppose that -$\boldsymbol{v}(\sigma^0_0) = \boldsymbol{v}_0, \boldsymbol{v}(\sigma^0_1) = \boldsymbol{v}_1$. We can -define a parameterization $F: [0,1] \rightarrow \sigma^1$ as -$$F(t) := (1-t) \sigma^0_0 + t \sigma^0_1.$$ $\mathcal{I}_1(\boldsymbol{v})$ can -be written as -$\mathcal{I}_1(\boldsymbol{v})[x] = a_1(x) \boldsymbol{e}_1 + a_2(x) \boldsymbol{e}_2 + a_3(x) \boldsymbol{e}_3$ -for any $x \in \sigma_1$ and in particular we know that -$$a_i(x(t)) = (1-t)(\boldsymbol{v}_0)_i + t(\boldsymbol{v}_1)_i. \quad i=1,2,3$$ -Identifying trivially $\mathcal{I}_1(\boldsymbol{v})$ with the $1$-form (named -with abuse of notation $\mathcal{I}_1(\boldsymbol{v})$) -$a_1(x) dx^1 + a_2(x) dx^2 + a_3(x) dx^3$, then $$\begin{split} - \langle \flat_1\boldsymbol{v}, \sigma^1 \rangle &= \int_{\sigma^1} \mathcal{I}_1(\boldsymbol{v})\\ - &= \int_{\sigma_1} a_1(x) dx^1 + a_2(x) dx^2 + a_3(x) dx^3\\ - &= \int_{0}^1 F^*[a_1(x) dx^1 + a_2(x) dx^2 + a_3(x) dx^3]\\ - &= \int_0^1 \left[ a_1(x(t)) \frac{dx^1}{dt} + a_2(x(t)) \frac{dx^2}{dt} + a_3(x(t)) \frac{dx^3}{dt} \right] dt\\ - &= \int_0^1 [(1-t)\boldsymbol{v}_0 + t\boldsymbol{v}_1] \cdot (\sigma^0_1 - \sigma^0_0) dt\\ - &= \frac{\boldsymbol{v}_0 + \boldsymbol{v}_1}{2} \cdot (\sigma^0_1 - \sigma^0_0). - \end{split}$$ -::: - -## The metric of a simplex - -[Continuare qui]{style="color: red"} - -# Examples and Benchmarks - -## Poisson equation - -::: refbox -**References:** [@crane2018discrete], Section 6.3. [@grady2010discrete], -Section 2.5.5. [@tonti2013mathematical] -::: - -In this section we derive the stationary diffusion equation with source -term (or Poisson equation) using the tools of discrete calculus seen in -the previous sections. We remark that our formulation is inherently -discrete, *i.e.* we *do not* to discretize the well-known continuous -Poisson equation. - -### Classical derivation - -In 2D, let us consider a primal 2-complex consisting of $n$ vertices. We -assign an orientation of the primal complex and the dual complex as -described in Section [2.3.1](#orientationsection){reference-type="ref" -reference="orientationsection"}. In particular, we orient every primal -$2$-cell counterclockwise and we find, by applying the algorithm of -Remark 2.5.1 in [@hirani2003discrete], that also dual $2$-cell are -oriented counterclockwise. - -![Example of a possible orientation of a small portion of the cell -complex. Black arrows indicate the orientation of the primal, whereas -blue ones describe the induced orientation of the -dual.](Figures/Orient.png){width="7cm" height="4cm"} - -We represent the diffusing quantity (temperature, concentration of a -species) as a primal (scalar-valued) $0$-cochain denoted by the symbol -$u$. - -
- -
A portion of the simplicial cell complex (left) and its dual -circumcentric complex (right).
-
- -Applying the coboundary operator $d_0$ we get a primal scalar-valued -$1$-cochain $d_0 u$ in which the scalars attached to every basic -$1$-cochain are the discrete equivalent of the gradient of the -continuous temperature scalar field integrated along the edge. To pass -from a circulation to a flux across the edges, we apply the Hodge star -operator $\star_1$, which provides a scalar-valued dual $1$-cochain -$\star_1 d_0 u$. Then, using a linear and isotropic constitutive -equation to relate the diffusive flux $h$ to $\star_1 \, d_0 u$, we -write $$h = - k \star_1 d_0 u,$$ where $k$ is a material parameter -(conductivity/diffusivity). Since the dual $2$-cells are oriented -counterclockwise, following [@tonti2013mathematical] the positive -orientation for $h$ describes the flux *leaving* any dual $2$-cell. - -![The flux through the boundary of the simplex is outwards if the -coefficients of the $2$-cochain are positive (same orientation as the -one induced by the corresponding $3$-simplex), otherwise it is -inwards.](Figures/FluxOutgoing.png){width="5cm" height="4cm"} - -To obtain the *net* flux *entering* any dual $2$-cell we have to add up -the contributions along its boundary using the dual coboundary operator -$d^\star$ $(= -d^t_0$, see Section 2.3) and then change the sign of the -result. If $f$ is a known dual $2$-cochain which describes the external -sources of the dual $2$-cells, the balance equation reads -$$-d^\star h + f = 0.$$ Using the constitutive equation for the flux -$$k \, d^t_0 (\, \star_1 d_0 u) + f = 0. \label{withoutlap}$$ - -To recover the formulation of diffusion equation with discrete -Laplacian, recall that $$\Delta := \delta d + d\delta.$$ Since $u$ is a -$0$-cochain, $d \delta u = 0$ by definition of $\delta$. Moreover, since -$\delta_1 = - \star d^\star \star$, applying the (inverse of) Hodge star -operator (we again write $\star$ both for primal to dual map and dual to -primal map) to [\[withoutlap\]](#withoutlap){reference-type="eqref" -reference="withoutlap"} we get $$-k \Delta u + \Tilde{f} = 0,$$ where -$\Tilde{f} := \star f$. Since the Laplacian acting on fields $\nabla^2$ -is minus the Laplacian on forms (see [@frankel2011geometry]), the last -equation is the discrete analogous of the Poisson equation -$k\nabla ^ 2 u + \Tilde{f} = 0$. - -### Variational formulation - -## Elastica - -In the following, $\mathcal{I} = [0,L]\subset \mathbb{R}$ is a -one-dimensional interval that represents the coordinates of the points -of the longitudinal axis of the rod in its undeformed, straight -configuration, $L$ is the length of the rod, $u(\sigma)$ is the angle -formed by the tangent to the axis of the rod and the horizontal -direction at the dimensionless arc-length $\sigma := s/L$. For a -constant cross-section rod subject to a vertical end-load at the right -end and clamped at the left end, the boundary-value problem for the -(dimensionless) continuous Euler's Elastica equation reads -[@audoly2000elasticity] $$\begin{aligned} - \frac{\textrm{d}^2 u}{\textrm{d}\sigma^2} + f \cos u = 0 \quad \text{in } [0,1], \quad u(0) = 0, \quad \frac{\textrm{d}u}{\textrm{d}\sigma}(1) = 0. \label{contElastica} -\end{aligned}$$ In - [\[contElastica\]](#contElastica){reference-type="eqref" -reference="contElastica"} $f = PL^2/B$ is the dimensionless load -parameter, where $P<0$ is the vertical component of the load applied at -the right end and $B$ is the *bending stiffness* of the rod. The -variational formulation of - [\[contElastica\]](#contElastica){reference-type="eqref" -reference="contElastica"} is -$$\min_{u}\ \frac{1}{2}\int_{0}^1 \left(\frac{\textrm{d}u}{\textrm{d}\sigma}\right)^2\,\textrm{d}\sigma - \int_{0}^1 f \sin u \,\textrm{d}\sigma ,\quad u (0) = 0. \label{contElasticaEnergy}$$ - -To derive the discrete version of - [\[contElastica\]](#contElastica){reference-type="eqref" -reference="contElastica"} and - [\[contElasticaEnergy\]](#contElasticaEnergy){reference-type="eqref" -reference="contElasticaEnergy"}, consider a simplicial $1$-complex -approximating the rod. The discrete elastica energy can be formulated as -$$\mathcal{E}_{\text{el}}(u) := \frac{1}{2} \langle \mathbbm{1}_{\text{int}} \odot \star d^\star u, \star d^\star u \rangle - \langle f\mathbbm{1}, \sin u \rangle, \label{discElasticaEnergy}$$ - -where $\mathbbm{1}$ is the dual one $0$-cochain and -$\mathbbm{1}_{\text{int}}$ is the primal $0$-cochain that is identically -$1$ on the interior and $0$ on the boundary nodes. We can re-write - [\[discElasticaEnergy\]](#discElasticaEnergy){reference-type="eqref" -reference="discElasticaEnergy"} as $$\begin{aligned} - \mathcal{E}_{\text{el}}(u) &= \frac{1}{2} \langle \star (\mathbbm{1}_{\text{int}} \odot \star d^\star u), d^\star u \rangle - \langle f\mathbbm{1}, \sin u \rangle\\ - &= \frac{1}{2} \langle \delta^\star \star (\mathbbm{1}_{\text{int}} \odot \star d^\star u), u \rangle - \langle f\mathbbm{1}, \sin u \rangle\\ - &= \frac{1}{2} \langle \delta^\star\star k, u \rangle - \langle f\mathbbm{1}, \sin u \rangle, -\end{aligned}$$ - -where $k := \mathbbm{1}_{\text{int}} \odot \star d^\star u$ is the -primal $0$-cochain that encodes the (discrete) curvatures on the nodes. -Computing the first variation of the discrete functional we get -$$\delta^\star \star k - f\cos(u) = 0,$$ which is equivalent, using the -definition of the codifferential, as -$$-\star d k - f\cos(u) = 0. \label{discElastica}$$ - -### Identification of the bending stiffness - -In a realistic experimental scenario, the load magnitude is prescribed, -while the bending stiffness is an unknown material-dependent parameter -that must be calibrated to reproduce the measurements. In the -variational formulation case, to derive also the bending stiffness we -have to solve the constrained optimization $$\begin{aligned} - \min_{f > 0} \quad & ||u_f - \bar{u}||^2 \qquad - \textrm{s.t.}\ u_f \in \mathop{\mathrm{arg\,min}}_{u \text{ : } u(0) = 0} \mathcal{E}_{\text{el}}(u,f), \label{bilevel} -\end{aligned}$$ where we indicated with $\Bar{u}$ the true solution. -Indicating with $P := \text{diag}(0,1,1,\dots,1)$, -eq. [\[bilevel\]](#bilevel){reference-type="eqref" reference="bilevel"} -can be recast as $$\begin{aligned} - \min_{f > 0} \quad & ||u_f - \bar{u}||^2 \qquad - \textrm{s.t.}\ u_f \in \mathop{\mathrm{arg\,min}}_{u \text{ : } u(0) = 0} \mathcal{E}(u,f), \label{bilevel_eq} -\end{aligned}$$ where $\mathcal{E}(u,f) := ||P r(u,f)||^2$. The boundary -conditions in eq. [\[bilevel_eq\]](#bilevel_eq){reference-type="eqref" -reference="bilevel_eq"} are enforced by substitution, so that the -minimization involves the array of the internal unknowns $\Tilde{u}$. -Using the constrained optimization solver SLSQP requires the problem to -be written in the form $$\begin{aligned} - \min_{f > 0} \quad & ||u_f - \bar{u}||^2 \qquad - \textrm{s.t.}\ \Tilde{r}(\Tilde{u}_f,f) = 0, \qquad u_f(0)=0. -\end{aligned}$$ where $P r(u,f) = \{0, \Tilde{r}(\Tilde{u},f)\}$. Notice -that the Hessian (w.r.t $\Tilde{u}$) of $\mathcal{E}$ is different to -$\nabla_{\Tilde{u}} \Tilde{r}(\Tilde{u},f)$ and this leads to -convergence issues, since SLSQP uses the Hessian to compute the descent -direction. - -## Linear elasticity - -### Deformation gradient - -From now on, we consider a $2$-simplicial complex $K$. Let -$\{\hat{\boldsymbol{e}}_i\}_i$ be the Cartesian coordinate framework, -$\{{\boldsymbol{e}}_i\}_i$ be the reference local basis of a given $2$-simplex -and $\{{\boldsymbol{e}'}_i\}_i$ be the local basis of the deformed $2$-simplex. -The contravariant bases are indicated with upper indexing. Denoting with -$\boldsymbol{F}$ the deformation gradient of a given $2$-simplex we have -$$\boldsymbol{F} = {\boldsymbol{e}'}_i \otimes {\boldsymbol{e}}^i.$$ - -Indeed, for any $k$ we have -$$\boldsymbol{F} \boldsymbol{e}_k = ({\boldsymbol{e}'}_i \otimes {\boldsymbol{e}}^i) \boldsymbol{e}_k = {\boldsymbol{e}'}_i ({\boldsymbol{e}}^i \cdot {\boldsymbol{e}}_k) = {\boldsymbol{e}'}_k. \label{eq:defgrad}$$ - -Now recall that -$${\boldsymbol{e}'}_i = ({\boldsymbol{e}'}_i)_j \hat{\boldsymbol{e}}_j, \quad {\boldsymbol{e}}_k = ({\boldsymbol{e}'}_k)_l \hat{\boldsymbol{e}}_l, \quad \boldsymbol{e}^i = \boldsymbol{g}^{ik}_R \boldsymbol{e}_k,$$ -where $\boldsymbol{g}^{ik}_R := \boldsymbol{e}^i \cdot \boldsymbol{e}^k$. Putting everything -together in [\[eq:defgrad\]](#eq:defgrad){reference-type="eqref" -reference="eq:defgrad"} we get -$$\boldsymbol{F} = ({\boldsymbol{e}'}_i)_j \hat{\boldsymbol{e}}_j \otimes \boldsymbol{g}^{ik}_R ({\boldsymbol{e}'}_k)_l \hat{\boldsymbol{e}}_l = ({\boldsymbol{e}'}_i)_j \boldsymbol{g}^{ik}_R ({\boldsymbol{e}'}_k)_l \hat{\boldsymbol{e}}_j \otimes \hat{\boldsymbol{e}}_l.$$ - -In particular, in matrix notation we have -$$\sf{F} = (\sf{A}')^T \sf{g}_R\sf{A},$$ - -where $\sf{A}$ (resp. $\sf{A}'$) is the matrix where the $i$-th rows is -the $i$-th basis vector ${\boldsymbol{e}}_i$ (resp. ${\boldsymbol{e}'}_i$). - -## Burgers' equation - -In the continuous setting, the general form of the one-dimensional -Burgers' equation, also called *viscous Burgers' equation*, reads -$$u_t = - uu_x + \nu u_{xx}, \label{eq: viscidburgers}$$ - -where $u(x,t)$ is the speed of fluid in $(x,t)$ and $\nu$ is the -viscosity of the fluid. The *inviscid Burgers' equation* is obtained -from the previous equation when $\nu = 0$ and it is a prototype for -conservation equations that can develop discontinuities (the so-called -*shocks*) $$u_t = -(u^2/2)_x.$$ - -In the discrete setting, a $1$-simplicial models the space, while the -time interval is uniformly discretized with step-size $h_t$. The unknown -$U^n$ is the average value of the velocity field at the time $t = nh_t$ -in a given dual edge and it is represented as a dual $0$ cochain. The -flux $F$ is a primal $0$-cochain such that -$$F^n_{i - 1/2} := f(U^n_{i-1}, U^n_i),$$ - -where $f$ is some numerical flux function (as in the Finite Volume -Method schemes). Forward Euler method is chosen to treat the term $u_t$. -The discrete version of the Burgers' equation reads in general -$$U^{n+1}_i = U^n_i - h_t (\star dF^n)_i.$$ - -The choice of the numerical flux function leads to different numerical -scheme. For the viscid Burgers' equation, we use the *parabolic scheme*, -i.e. $$F^n := \star \flat_{\text{par}}(-u^2/2) + \nu \star d u,$$ - -where $\flat_{\text{par}} = \mathcal{R}^{\star 0}(I_{\text{par}})$ and -$I_{\text{par}}(u)$ is the interpolation of $u$ through the $0$-Whitney -forms (hat functions). Explicitly, -$$f(U^n_{i-1}, U^n_i) = -\frac{(U^n_{i-1})^2 + (U^n_{i})^2}{4} + \nu \frac{U^n_{i} - U^n_{i-1}}{|\star \sigma_{0,i}|}.$$ - -The parabolic scheme in DEC formulation is equivalent to the Finite -Difference Method where the nodes are the dual $0$-simplices of the -complex. Instead, for the unviscid Burgers' equation we use the *upwind -scheme* (more stable than the parabolic scheme), i.e. -$$F^n := - (\star\flat_{\text{up}}(u))^2/2,$$ - -where $\flat_{\text{up}} = \mathcal{R}^{\star 0}(I_{\text{up}})$ and -$I_{\text{up}}(u)$ is the constant interpolation of $u$. Explicitly, -$$f(U^n_{i-1}, U^n_i) = -(U^n_{i-1})^2/2.$$ - -Finally, notice that the dimensionless Burgers' equation is obtained -defining the (dimensionless) variables -$$\hat{x} := \frac{x}{L}, \quad \hat{t} := \frac{t}{T}, \quad \hat{u} := \frac{u}{U},$$ - -where $L$ is a characteristic length, $U$ is a characteristic velocity -and $T := L/U$. It reads -$$\hat{u}_{\hat{t}} = - \hat{u}\hat{u}_{\hat{x}} + \hat{\nu} \hat{u}_{\hat{x}\hat{x}},$$ - -where $\hat{\nu} := \nu/{LU}$. - -[^1]: Although it may seem a formal definition, it is not. For a formal - statement, see Section 4.6 of [@epstein2010geometrical] - -[^2]: Note the relation with Generalized Stokes Theorem! - -[^3]: To motivate this choice, see for example Section 4.8.4 of - [@crane2018discrete]. diff --git a/docs/theory/Figures/1_simpl_comp.png b/docs/theory/Figures/1_simpl_comp.png new file mode 100644 index 0000000..408ec0d Binary files /dev/null and b/docs/theory/Figures/1_simpl_comp.png differ diff --git a/docs/Figures/DIffusionDual.png b/docs/theory/Figures/DIffusionDual.png old mode 100755 new mode 100644 similarity index 100% rename from docs/Figures/DIffusionDual.png rename to docs/theory/Figures/DIffusionDual.png diff --git a/docs/theory/Figures/Orient.png b/docs/theory/Figures/Orient.png new file mode 100644 index 0000000..e36db11 Binary files /dev/null and b/docs/theory/Figures/Orient.png differ diff --git a/docs/Figures/Oriented.png b/docs/theory/Figures/Oriented.png old mode 100755 new mode 100644 similarity index 100% rename from docs/Figures/Oriented.png rename to docs/theory/Figures/Oriented.png diff --git a/docs/Figures/Cell complex vs not cell complex.png b/docs/theory/Figures/cell complex_vs_not_cell_complex.png old mode 100755 new mode 100644 similarity index 100% rename from docs/Figures/Cell complex vs not cell complex.png rename to docs/theory/Figures/cell complex_vs_not_cell_complex.png diff --git a/docs/theory/Figures/hodge_star.png b/docs/theory/Figures/hodge_star.png new file mode 100644 index 0000000..7339cb4 Binary files /dev/null and b/docs/theory/Figures/hodge_star.png differ diff --git a/docs/theory/bibliography.bib b/docs/theory/bibliography.bib new file mode 100644 index 0000000..ad34646 --- /dev/null +++ b/docs/theory/bibliography.bib @@ -0,0 +1,1211 @@ +@book{abraham2012manifolds, + title={{M}anifolds, {T}ensor {A}nalysis, and {A}pplications}, + author={Abraham, R. and Marsden, J. E. and Ratiu, T.}, + volume={75}, + year={2012}, + publisher={Springer Science \& Business Media} +} + +@article{griebel2017upwind, + title={{U}pwind {S}chemes for {S}calar {A}dvection-{D}ominated {P}roblems in the {D}iscrete {E}xterior {C}alculus}, + author={Griebel, M. and Rieger, C. and Schier, A.}, + journal={Transport Processes at Fluidic Interfaces}, + pages={145--175}, + year={2017}, + publisher={Springer} +} + + +@book{flanders1963differential, + title={{D}ifferential {F}orms with {A}pplications to the {P}hysical {S}ciences}, + author={Flanders, H.}, + volume={11}, + year={1963}, + publisher={Dover Publications} +} + +@article{crane2018discrete, + title={{D}iscrete {D}ifferential {G}eometry: {A}n {A}pplied {I}ntroduction}, + author={Crane, K.}, + journal={Notices of the AMS, Communication}, + pages={1153--1159}, + year={2018} +} + +@book{epstein2010geometrical, + title={{T}he {G}eometrical {L}anguage of {C}ontinuum {M}echanics}, + author={Epstein, M.}, + year={2010}, + publisher={Cambridge University Press} +} + +@book{grady2010discrete, + title={Discrete Calculus: Applied analysis on graphs for computational science}, + author={Grady, L. J. and Polimeni, J. R.}, + volume={3}, + year={2010}, + publisher={Springer} +} + +@book{hirani2003discrete, + title={Discrete Exterior Calculus}, + author={Hirani, A. N.}, + year={2003}, + publisher={California Institute of Technology} +} + +@article{grinspun2006discrete, + title={{D}iscrete {D}ifferential {G}eometry: {A}n {A}pplied {I}ntroduction}, + author={Grinspun, Eitan and Desbrun, Mathieu and Polthier, Konrad and Schr{\"o}der, Peter and Stern, Ari}, + journal={ACM Siggraph Course}, + volume={7}, + number={1}, + year={2006}, + publisher={Citeseer} +} + +@book{tonti2013mathematical, + title={The Mathematical Structure of Classical and Relativistic Physics}, + author={Tonti, Enzo}, + volume={10}, + year={2013}, + publisher={Springer} +} + +@article{schulz2020convergence, + title={{C}onvergence of {D}iscrete {E}xterior {C}alculus {A}pproximations for {P}oisson {P}roblems}, + author={Schulz, Erick and Tsogtgerel, Gantumur}, + journal={Discrete \& Computational Geometry}, + volume={63}, + pages={346--376}, + year={2020}, + publisher={Springer} +} + +@book{munkres2018elements, + title={Elements of Algebraic Topology}, + author={Munkres, James R}, + year={2018}, + publisher={CRC press} +} + +@article{milicchio2008codimension, + title={A codimension-zero approach to discretizing and solving field problems}, + author={Milicchio, Franco and DiCarlo, Antonio and Paoluzzi, Alberto and Shapiro, Vadim}, + journal={Advanced Engineering Informatics}, + volume={22}, + number={2}, + pages={172--185}, + year={2008}, + publisher={Elsevier} +} + +@article{desbrun2005discrete, + title={{D}iscrete {E}xterior {C}alculus}, + author={Desbrun, Mathieu and Hirani, Anil N and Leok, Melvin and Marsden, Jerrold E}, + journal={arXiv preprint math/0508341}, + year={2005} +} + +@article{de2016subdivision, + title={{S}ubdivision {E}xterior {C}alculus for {G}eometry {P}rocessing}, + author={De Goes, Fernando and Desbrun, Mathieu and Meyer, Mark and DeRose, Tony}, + journal={ACM Transactions on Graphics (TOG)}, + volume={35}, + number={4}, + pages={1--11}, + year={2016}, + publisher={ACM New York, NY, USA} +} + +@article{boom2022geometric, + title={A geometric formulation of linear elasticity based on discrete exterior calculus}, + author={Boom, Pieter D and Kosmas, Odysseas and Margetts, Lee and Jivkov, Andrey P}, + journal={International Journal of Solids and Structures}, + volume={236}, + pages={111345}, + year={2022}, + publisher={Elsevier} +} + +@book{frankel2011geometry, + title={The Geometry of Physics: An Introduction}, + author={Frankel, Theodore}, + year={2011}, + publisher={Cambridge University Press} +} + +@book{audoly2000elasticity, + title={Elasticity and Geometry}, + author={Audoly, Basile and Pomeau, Yves}, + pages={600}, + year={2018}, + publisher={Oxford University Press} +} + +@article{berwick2021discrete, + title={{D}iscrete {V}ector {B}undles with {C}onnection and the {B}ianchi {I}dentity}, + author={Berwick-Evans, Daniel and Hirani, Anil N and Schubel, Mark D}, + journal={arXiv preprint arXiv:2104.10277}, + year={2021} +} + +@book{darling1994differential, + title={Differential Forms and Connections}, + author={Darling, Richard WR}, + year={1994}, + publisher={Cambridge University Press} +} + +@article{koza1994genetic, + title={Genetic programming as a means for programming computers by natural selection}, + author={Koza, John R}, + journal={Statistics and computing}, + volume={4}, + pages={87--112}, + year={1994}, + publisher={Springer} +} + +@book{kronberger2024symbolic, + title={Symbolic Regression}, + author={Kronberger, Gabriel and Burlacu, Bogdan and Kommenda, Michael and Winkler, Stephan M and Affenzeller, Michael}, + year={2024}, + publisher={CRC Press} +} + +@book{o2009riccardo, + title={A Field Guide to Genetic Programming}, + author={Poli, R. and Langdon, W. B. and McPhee, N. F.}, + year={2009}, + publisher={Lulu Enterprises UK} +} + +@article{montana1995strongly, + title={{S}trongly {T}yped {G}enetic {P}rogramming}, + author={Montana, David J}, + journal={Evolutionary computation}, + volume={3}, + number={2}, + pages={199--230}, + year={1995}, + publisher={MIT Press One Rogers Street, Cambridge, MA 02142-1209, USA journals-info~…} +} + +@book{koza1992programming, + title={On the Programming of Computers by Means of Natural Selection}, + author={Koza, J. R.}, + year={1992}, + publisher={MIT press} +} + +@article{Manti_2024, + doi = {10.1088/2632-2153/ad1af2}, + url = {https://dx.doi.org/10.1088/2632-2153/ad1af2}, + year = {2024}, + publisher = {IOP Publishing}, + volume = {5}, + number = {1}, + pages = {015005}, + author = {Manti, S. and Lucantonio, A.}, + title = {Discovering interpretable physical models using symbolic regression and discrete exterior calculus}, + journal = {Machine Learning: Science and Technology} +} + +@article{DEAP_JMLR2012, + author = " F\'elix-Antoine Fortin and Fran\c{c}ois-Michel {De Rainville} and Marc-Andr\'e Gardner and Marc Parizeau and Christian Gagn\'e ", + title = { {DEAP}: {E}volutionary {A}lgorithms {M}ade {E}asy }, + pages = { 2171--2175 }, + volume = { 13 }, + month = { jul }, + year = { 2012 }, + journal = { Journal of Machine Learning Research } +} + +@inproceedings{moritz2018ray, + title={Ray: A distributed framework for emerging {AI} applications}, + author={Moritz, P. and Nishihara, R. and Wang, S. and Tumanov, A. and Liaw, R. and Liang, E. and Elibol, M. and Yang, Z. and Paul, W. and Jordan, M. I. and Stoica, I.}, + booktitle={13th USENIX symposium on operating systems design and implementation (OSDI 18)}, + pages={561--577}, + year={2018} +} + +@article{scikit-learn, + title={Scikit-learn: {M}achine {L}earning in {P}ython}, + author={Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V. + and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P. + and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and + Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.}, + journal={Journal of Machine Learning Research}, + volume={12}, + pages={2825--2830}, + year={2011} +} + +@inproceedings{akiba2019optuna, + title={{O}ptuna: {A} {N}ext-{G}eneration {H}yperparameter {O}ptimization {F}ramework}, + author={Akiba, Takuya and Sano, Shotaro and Yanase, Toshihiko and Ohta, Takeru and Koyama, Masanori}, + booktitle={The 25th ACM SIGKDD International Conference on Knowledge Discovery \& Data Mining}, + pages={2623--2631}, + year={2019} +} + +@article{la2021contemporary, + title={{C}ontemporary {S}ymbolic {R}egression {M}ethods and their {R}elative {P}erformance}, + author={La Cava, William and Burlacu, Bogdan and Virgolin, Marco and Kommenda, Michael and Orzechowski, Patryk and de Fran{\c{c}}a, Fabr{\'\i}cio Olivetti and Jin, Ying and Moore, Jason H}, + journal={Advances in Neural Information Processing Systems}, + volume={2021}, + number={DB1}, + pages={1}, + year={2021} +} + +@inproceedings{orzechowski2018we, + title={Where are we now? A large benchmark study of recent symbolic regression methods}, + author={Orzechowski, Patryk and La Cava, William and Moore, Jason H}, + booktitle={Proceedings of the Genetic and Evolutionary Computation Conference}, + pages={1183--1190}, + year={2018} +} + +@article{Biscani2020, + doi = {10.21105/joss.02338}, + url = {https://doi.org/10.21105/joss.02338}, + year = {2020}, + publisher = {The Open Journal}, + volume = {5}, + number = {53}, + pages = {2338}, + author = {Francesco Biscani and Dario Izzo}, + title = {A parallel global multiobjective framework for optimization: pagmo}, + journal = {Journal of Open Source Software} +} + +@misc{jax2018github, + author = {James Bradbury and Roy Frostig and Peter Hawkins and Matthew James Johnson and Chris Leary and Dougal Maclaurin and George Necula and Adam Paszke and Jake Vander{P}las and Skye Wanderman-{M}ilne and Qiao Zhang}, + title = {{JAX}: composable transformations of {P}ython+{N}um{P}y programs}, + url = {http://github.com/jax-ml/jax}, + version = {0.3.13}, + year = {2018}, +} + +@article{geuzaine2009gmsh, + title={Gmsh: A 3-{D} finite element mesh generator with built-in pre-and post-processing facilities}, + author={Geuzaine, C. and Remacle, J. F.}, + journal={International journal for numerical methods in engineering}, + volume={79}, + number={11}, + pages={1309--1331}, + year={2009}, + publisher={Wiley Online Library} +} + +@book{evans2010partial, + title={Partial Differential Equations}, + author={Evans, L. C.}, + volume={19}, + year={2010}, + publisher={American Mathematical Society} +} + +@inproceedings{miller2015cartesian, + title={{C}artesian {G}enetic {P}rogramming}, + author={Miller, J. and Turner, A.}, + booktitle={Proceedings of the Companion Publication of the 2015 Annual Conference on Genetic and Evolutionary Computation}, + pages={179--198}, + year={2015} +} + +@article{mckay2010grammar, + title={Grammar-based {G}enetic {P}rogramming: a survey}, + author={McKay, R. I. et al.}, + journal={Genetic Programming and Evolvable Machines}, + volume={11}, + pages={365--396}, + year={2010}, + publisher={Springer} +} + +@inproceedings{sahoo2018learning, + title={{L}earning {E}quations for {E}xtrapolation and {C}ontrol}, + author={Sahoo, S. and Lampert, C. and Martius, G.}, + booktitle={International Conference on Machine Learning}, + pages={4442--4450}, + year={2018}, + organization={Pmlr} +} + +@article{udrescu2020ai, + title={{AI} {F}eynman: {a} {P}hysics-{I}nspired {M}ethod for {S}ymbolic {R}egression}, + author={Udrescu, S. and Tegmark, M.}, + journal={Science Advances}, + volume={6}, + number={16}, + pages={eaay2631}, + year={2020}, + publisher={American Association for the Advancement of Science} +} + +@article{petersen2019deep, + title={Deep symbolic regression: Recovering mathematical expressions from data via risk-seeking policy gradients}, + author={Petersen, B. K. and Landajuela, M. and Mundhenk, T. N. and Santiago, C. P. and Kim, S. K. and Kim, J. T.}, + journal={arXiv preprint arXiv:1912.04871}, + year={2019} +} + +@article{landajuela2022unified, + title={{A} {U}nified {F}ramework for {D}eep {S}ymbolic {R}egression}, + author={Landajuela, M. and Lee, C. and Yang, J. and Glatt, R. and Santiago, C. P. and Aravena, I. and Mundhenk, T. and Mulcahy, G. and Petersen, B. K.}, + journal={Advances in Neural Information Processing Systems}, + volume={35}, + pages={33985--33998}, + year={2022} +} + +@article{kamienny2022end, + title={End-to-end {S}ymbolic {R}egression with {T}ransformers}, + author={Kamienny, P. and d'Ascoli, S. and Lample, G. and Charton, F.}, + journal={Advances in Neural Information Processing Systems}, + volume={35}, + pages={10269--10281}, + year={2022} +} + +@inproceedings{d2022deep, + title={{D}eep {S}ymbolic {R}egression for {R}ecurrence {S}equences}, + author={d’Ascoli, S. and Kamienny, P. and Lample, G. and Charton, F.}, + booktitle={International Conference on Machine Learning}, + pages={4520--4536}, + year={2022}, + organization={PMLR} +} + +@article{de2024srbench++, + title={{SRB}ench++: {P}rincipled {B}enchmarking of {S}ymbolic {R}egression with {D}omain-{E}xpert {I}nterpretation}, + author={de Franca, F. O. and Virgolin, M. and Kommenda, M. and Majumder, M. S. and Cranmer, M. and Espada, G. and Ingelse, L. and Fonseca, A. and Landajuela, M. and Petersen, B. and others}, + journal={IEEE Transactions on Evolutionary Computation}, + year={2024}, + publisher={IEEE} +} + +@article{mou2021data, + title={Data-driven variational multiscale reduced order models}, + author={Mou, C. and Koc, B. and San, O. and Rebholz, L. G. and Iliescu, T.}, + journal={Computer Methods in Applied Mechanics and Engineering}, + volume={373}, + pages={113470}, + year={2021}, + publisher={Elsevier} +} + +@article{xie2018data, + title={{D}ata-{D}riven {F}iltered {R}educed {O}rder {M}odeling of {F}luid {F}lows}, + author={Xie, X. and Mohebujjaman, M. and Rebholz, L. G. and Iliescu, T.}, + journal={SIAM Journal on Scientific Computing}, + volume={40}, + number={3}, + pages={B834--B857}, + year={2018}, + publisher={SIAM} +} + +@article{manti2025symbolic, + title={{S}ymbolic {R}egression of {D}ata-{D}riven {R}educed {O}rder {M}odel {C}losures for {U}nder-{R}esolved, {C}onvection-{D}ominated {F}lows}, + author={Manti, S. and Tsai, P. and Lucantonio, A. and Iliescu, T.}, + journal={arXiv preprint arXiv:2502.04703}, + year={2025} +} + +@article{ahmed2021closures, + title={On closures for reduced order models — A spectrum of first-principle to machine-learned avenues}, + author={Ahmed, S. E. and Pawar, S. and San, O. and Rasheed, A. and Iliescu, T. and Noack, B. R.}, + journal={Physics of Fluids}, + volume={33}, + number={9}, + year={2021}, + publisher={AIP Publishing} +} + +@article{sanderse2024scientific, + title={Scientific machine learning for closure models in multiscale problems: {a} review}, + author={Sanderse, B. and Stinis, P. and Maulik, R. and Ahmed, S. E.}, + journal={arXiv preprint arXiv:2403.02913}, + year={2024} +} + +@article{hughes1998variational, + title={The variational multiscale method — a paradigm for computational mechanics}, + author={Hughes, T. J. R. and Feij{\'o}o, G. R. and Mazzei, L. and Quincy, J.-B.}, + journal={Computer methods in applied mechanics and engineering}, + volume={166}, + number={1-2}, + pages={3--24}, + year={1998}, + publisher={Elsevier} +} + +@article{ahmed2017review, + title={A {R}eview of {V}ariational {M}ultiscale {M}ethods for the {S}imulation of {T}urbulent {I}ncompressible {F}lows}, + author={Ahmed, N. and Chacon Rebollo, T. and John, V. and Rubino, S.}, + journal={Archives of Computational Methods in Engineering}, + volume={24}, + pages={115--164}, + year={2017}, + publisher={Springer} +} + +@article{codina2018variational, + title={{V}ariational {M}ultiscale {M}ethods in {C}omputational {F}luid {D}ynamics}, + author={Codina, R. and Badia, S. and Baiges, J. and Principe, J.}, + journal={Encyclopedia of computational mechanics}, + pages={1--28}, + year={2018}, + publisher={Wiley Online Library} +} + +@article{fick2018stabilized, + title={{A stabilized POD model for turbulent flows over a range of Reynolds numbers: Optimal parameter sampling and constrained projection}}, + author={Fick, L. and Maday, Y. and Patera, A. T. and Taddei, T.}, + journal={J. Comp. Phys.}, + fjournal={Journal of Computational Physics}, + volume={371}, + pages={214--243}, + year={2018}, + publisher={Elsevier} +} + +@article{avila2020data, + title={Data-driven analysis and forecasting of highway traffic dynamics}, + author={Avila, A. M. and Mezi{\'c}, I.}, + journal={Nature communications}, + volume={11}, + number={1}, + pages={2090}, + year={2020}, + publisher={Nature Publishing Group UK London} +} + + +@book{treiber2013traffic, + title={Traffic Flow Dynamics}, + author={Treiber, Martin and Kesting, Arne}, + volume={1}, + year={2013}, + publisher={Springer} +} + +@article{lighthill1955kinematic, + title={On kinematic waves II. A theory of traffic flow on long crowded roads}, + author={Lighthill, Michael James and Whitham, Gerald Beresford}, + journal={Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences}, + volume={229}, + number={1178}, + pages={317--345}, + year={1955}, + publisher={The Royal Society London} +} + +@article{richards1956shock, + title={Shock {W}aves on the {H}ighway}, + author={Richards, Paul I}, + journal={Operations Research}, + volume={4}, + number={1}, + pages={42--51}, + year={1956}, + publisher={INFORMS} +} + +@inproceedings{greenshields1935study, + title={A study of traffic capacity}, + author={Greenshields, Bruce D and Bibbins, J Rowland and Channing, WS and Miller, Harvey H}, + booktitle={Highway Research Board proceedings}, + volume={14}, + pages={448--477}, + year={1935}, + organization={Washington, DC} +} + +@article{greenberg1959analysis, + title={An {A}nalysis of {T}raffic {F}low}, + author={Greenberg, Harold}, + journal={Operations Research}, + volume={7}, + number={1}, + pages={79--85}, + year={1959}, + publisher={INFORMS} +} + +@misc{underwood1961speed, + title={{S}peed, {V}olume, and {D}ensity {R}elationship: {Q}uality and {T}heory of {T}raffic {F}low.}, + author={Underwood, R}, + year={1961}, + publisher={Yale Bureau of Highway Traffic, New Haven, CT} +} + +@article{daganzo1994cell, + title={The cell transmission model: A dynamic representation of highway traffic consistent with the hydrodynamic theory}, + author={Daganzo, Carlos F}, + journal={Transportation Research Part B: Methodological}, + volume={28}, + number={4}, + pages={269--287}, + year={1994}, + publisher={Elsevier} +} + +@article{fan2017collapsed, + title={A {C}ollapsed {G}eneralized {A}w-{R}ascle-{Z}hang {M}odel and {I}ts {M}odel {A}ccuracy}, + author={Fan, S. and Sun, Y. and Piccoli, B. and Seibold, B. and Work, D. B.}, + journal={arXiv preprint arXiv:1702.03624}, + year={2017} +} + +@book{fan2013data, + title={Data-Fitted Generic Second Order Macroscopic Traffic Flow Models}, + author={Fan, S.}, + year={2013}, + publisher={Temple University} +} + +@article{kachroo2023nonlocal, + title={Nonlocal {C}alculus-{B}ased {M}acroscopic {T}raffic {M}odel: {D}evelopment, {A}nalysis, and {V}alidation}, + author={Kachroo, P. and Agarwal, S. and Biswas, A. and Huang, A. J.}, + journal={IEEE Open Journal of Intelligent Transportation Systems}, + volume={4}, + pages={900--908}, + year={2023}, + publisher={IEEE} +} + +@article{weidmann1992transporttechnik, + title={{T}ransporttechnik der {F}ussg{\"a}nger}, + journal={Strasse und Verkehr}, + author = {Weidmann, U.}, + volume={78}, + number={3}, + pages={161--169}, + year={1992} +} + +@book{leveque2002finite, + title={{F}inite {V}olume {M}ethods for {H}yperbolic {P}roblems}, + author={LeVeque, R. J.}, + volume={31}, + year={2002}, + publisher={Cambridge University Press} +} + +@misc{ngsim_i80_2008, + author = {U.S. Department of Transportation, Federal Highway Administration}, + title = {Next {G}eneration {S}imulation ({NGSIM}) {V}ehicle {T}rajectories and {S}upporting {D}ata: {I}nterstate 80 {F}reeway {D}ataset}, + year = {2008}, + url = {https://ops.fhwa.dot.gov/trafficanalysistools/ngsim.htm}, +} + +@article{edie1961car, + title={{C}ar-following and {S}teady-{S}tate {T}heory for {N}oncongested {T}raffic}, + author={Edie, L. C.}, + journal={Operations Research}, + volume={9}, + number={1}, + pages={66--76}, + year={1961}, + publisher={INFORMS} +} + +@article{sun2020class, + title={On a class of new nonlocal traffic flow models with look-ahead rules}, + author={Sun, Y. and Tan, C.}, + journal={Physica D: Nonlinear Phenomena}, + volume={413}, + pages={132663}, + year={2020}, + publisher={Elsevier} +} + +@article{schmidt2009distilling, + title={Distilling {F}ree-{F}orm {N}atural {L}aws from {E}xperimental {D}ata}, + author={Schmidt, M. and Lipson, H.}, + journal={Science}, + volume={324}, + number={5923}, + pages={81--85}, + year={2009}, + publisher={American Association for the Advancement of Science} +} + +@article{bongard2007automated, + title={Automated reverse engineering of nonlinear dynamical systems}, + author={Bongard, J. and Lipson, H.}, + journal={Proceedings of the National Academy of Sciences}, + volume={104}, + number={24}, + pages={9943--9948}, + year={2007}, + publisher={National Academy of Sciences} +} + +@article{kovachki2023neural, + title={{N}eural {O}perator: {L}earning {M}aps {B}etween {F}unction {S}paces With {A}pplications to {PDEs}}, + author={Kovachki, N. and Li, Z. and Liu, B. and Azizzadenesheli, K. and Bhattacharya, K. and Stuart, A. and Anandkumar, A.}, + journal={Journal of Machine Learning Research}, + volume={24}, + number={89}, + pages={1--97}, + year={2023} +} + +@article{lu2021learning, + title={Learning nonlinear operators via {DeepONet} based on the universal approximation theorem of operators}, + author={Lu, L. and Jin, P. and Pang, G. and Zhang, Z. and Karniadakis, G.E.}, + journal={Nature Machine Intelligence}, + volume={3}, + number={3}, + pages={218--229}, + year={2021}, + publisher={Nature Publishing Group UK London} +} + +@article{wang2021learning, + title={Learning the solution operator of parametric partial differential equations with physics-informed {DeepONets}}, + author={Wang, S. and Wang, H. and Perdikaris, P.}, + journal={Science Advances}, + volume={7}, + number={40}, + pages={eabi8605}, + year={2021}, + publisher={American Association for the Advancement of Science} +} + +@article{willard2020integrating, + title={{I}ntegrating {P}hysics-{B}ased {M}odeling with {M}achine {L}earning: A {S}urvey}, + author={Willard, J. and Jia, X. and Xu, S. and Steinbach, M. and Kumar, V.}, + journal={arXiv preprint arXiv:2003.04919}, + volume={1}, + number={1}, + pages={1--34}, + year={2020} +} + +@book{kundu2016fluid, + title={Fluid Mechanics}, + author={Kundu, P. K. and Cohen, I. M. and Dowling, D. R. and Capecelatro, J.}, + year={2016}, + publisher={Elsevier} +} + +@book{pope2001turbulent, + title={Turbulent Flows}, + author={Pope, Stephen B}, + publisher={Cambridge University Press}, + year={2001} +} + +@article{duraisamy2019turbulence, + title={{T}urbulence {M}odeling in the {A}ge of {D}ata}, + author={Duraisamy, K. and Iaccarino, G. and Xiao, H.}, + journal={Annual Review of Fluid Mechanics}, + volume={51}, + number={1}, + pages={357--377}, + year={2019}, + publisher={Annual Reviews} +} + +@article{li2024physics, + title={{P}hysics-{I}nformed {N}eural {O}perator for {L}earning {P}artial {D}ifferential {E}quations}, + author={Li, Z. and Zheng, H. and Kovachki, N. and Jin, D. and Chen, H. and Liu, B. and Azizzadenesheli, K. and Anandkumar, A.}, + journal={ACM/IMS Journal of Data Science}, + volume={1}, + number={3}, + pages={1--27}, + year={2024}, + publisher={ACM New York, NY} +} + +@article{brunton2016discovering, + title={Discovering governing equations from data by sparse identification of nonlinear dynamical systems}, + author={Brunton, S. L. and Proctor, J. L. and Kutz, J. N.}, + journal={Proceedings of the National Academy of Sciences}, + volume={113}, + number={15}, + pages={3932--3937}, + year={2016}, + publisher={National Academy of Sciences} +} + +@article{rudy2017data, + title={Data-driven discovery of partial differential equations}, + author={Rudy, S. H. and Brunton, S. L. and Proctor, J. L. and Kutz, J. N.}, + journal={Science Advances}, + volume={3}, + number={4}, + pages={e1602614}, + year={2017}, + publisher={American Association for the Advancement of Science} +} + +@article{desilva2020, +doi = {10.21105/joss.02104}, +url = {https://doi.org/10.21105/joss.02104}, +year = {2020}, +publisher = {The Open Journal}, +volume = {5}, +number = {49}, +pages = {2104}, +author = {B. M. de Silva and K. Champion and M. Quade and J.-C. Loiseau and J. Kutz and S. Brunton}, +title = {{PySINDy}: A {P}ython package for the sparse identification of nonlinear dynamical systems from data}, +journal = {Journal of Open Source Software} +} + +@article{Kaptanoglu2022, +doi = {10.21105/joss.03994}, +url = {https://doi.org/10.21105/joss.03994}, +year = {2022}, +publisher = {The Open Journal}, +volume = {7}, +number = {69}, +pages = {3994}, +author = {A. A. Kaptanoglu and B. M. de Silva and U. F. and K. Kaheman and A. J. Goldschmidt and J. Callaham and C. B. Delahunt and Z. G. Nicolaou and K. Champion and J.-C. Loiseau and J. N. Kutz and S. L. Brunton}, +title = {{PySINDy}: A comprehensive {P}ython package for robust sparse system identification}, +journal = {Journal of Open Source Software} +} + +@book{bachman2006geometric, + title={A Geometric Approach to Differential Forms}, + author={Bachman, David}, + year={2006}, + publisher={Springer} +} + +@article{peherstorfer2016data, + title={Data-driven operator inference for nonintrusive projection-based model reduction}, + author={Peherstorfer, B. and Willcox, K.}, + journal={Computer Methods in Applied Mechanics and Engineering}, + volume={306}, + pages={196--215}, + year={2016}, + publisher={Elsevier} +} + +@article{messenger2021weak, + title={Weak {SINDy} for partial differential equations}, + author={Messenger, D. A and Bortz, D. M.}, + journal={Journal of Computational Physics}, + volume={443}, + pages={110525}, + year={2021}, + publisher={Elsevier} +} + +@article{fries2022lasdi, + title={La{SDI}: {P}arametric {L}atent {S}pace {D}ynamics {I}dentification}, + author={Fries, W. D. and He, X. and Choi, Y.}, + journal={Computer Methods in Applied Mechanics and Engineering}, + volume={399}, + pages={115436}, + year={2022}, + publisher={Elsevier} +} + +@article{zhang2024physics, + title={Physics-informed deep learning for traffic state estimation based on the traffic flow model and computational graph method}, + author={Zhang, Jinlei and Mao, Shuai and Yang, Lixing and Ma, Wei and Li, Shukai and Gao, Ziyou}, + journal={Information Fusion}, + volume={101}, + pages={101971}, + year={2024}, + publisher={Elsevier} +} + +@article{huang2022physics, + title={Physics-{I}nformed {D}eep {L}earning for {T}raffic {S}tate {E}stimation: Illustrations {W}ith {LWR} and {CTM} Models}, + author={Huang, Archie J and Agarwal, Shaurya}, + journal={IEEE Open Journal of Intelligent Transportation Systems}, + volume={3}, + pages={503--518}, + year={2022}, + publisher={IEEE} +} + +@article{huang2024incorporating, + title={Incorporating {N}onlocal {T}raffic {F}low {M}odel in {P}hysics-{I}nformed {N}eural {N}etworks}, + author={Huang, Archie J and Biswas, Animesh and Agarwal, Shaurya}, + journal={IEEE Transactions on Intelligent Transportation Systems}, + year={2024}, + publisher={IEEE} +} + +@article{papageorgiou2003review, + title={Review of {R}oad {T}raffic {C}ontrol {S}trategies}, + author={Papageorgiou, M. and Diakaki, C. and Dinopoulou, V. and Kotsialos, A. and Wang, Y.}, + journal={Proceedings of the IEEE}, + volume={91}, + number={12}, + pages={2043--2067}, + year={2003}, + publisher={Ieee} +} + +@article{yurtsever2020survey, + title={A {S}urvey of {A}utonomous {D}riving: Common {P}ractices and {E}merging {T}echnologies}, + author={Yurtsever, E. and Lambert, J. and Carballo, A. and Takeda, K.}, + journal={IEEE access}, + volume={8}, + pages={58443--58469}, + year={2020}, + publisher={IEEE} +} + +@article{mohammadian2021performance, + title={Performance of continuum models for realworld traffic flows: Comprehensive benchmarking}, + author={Mohammadian, S. and Zheng, Z. and Haque, M. M. and Bhaskar, A.}, + journal={Transportation Research Part B: Methodological}, + volume={147}, + pages={132--167}, + year={2021}, + publisher={Elsevier Ltd.} +} + +@inproceedings{krajewski2018highd, + title={The high{D} {D}ataset: A {D}rone {D}ataset of {N}aturalistic {V}ehicle {T}rajectories on {G}erman {H}ighways for {V}alidation of {H}ighly {A}utomated {D}riving {S}ystems}, + author={Krajewski, R. and Bock, J. and Kloeker, L. and Eckstein, L.}, + booktitle={2018 21st International Conference on Intelligent Transportation Systems (ITSC)}, + pages={2118--2125}, + year={2018}, + organization={IEEE} +} + +@inproceedings{moers2022exid, + title={The exi{D} {D}ataset: {A} {R}eal-{W}orld {T}rajectory {D}ataset of {H}ighly {I}nteractive {H}ighway {S}cenarios in {G}ermany}, + author={Moers, T. and Vater, L. and Krajewski, R. and Bock, J. and Zlocki, A. and Eckstein, L.}, + booktitle={2022 IEEE Intelligent Vehicles Symposium (IV)}, + pages={958--964}, + year={2022}, + organization={IEEE} +} + +@inproceedings{alexiadis2006video, + title={Video-{B}ased {V}ehicle {T}rajectory {D}ata {C}ollection}, + author={Kovvali, V. and Alexiadis, V. and Zhang, L.}, + booktitle={Transportation Research Board 86th Annual Meeting}, + year={2006}, + organization={Citeseer} +} + +@article{thodi2024fourier, + title={Fourier neural operator for learning solutions to macroscopic traffic flow models: Application to the forward and inverse problems}, + author={Thodi, B. T. and Ambadipudi, S. V. R. and Jabari, S. E.}, + journal={Transportation Research Part C: Emerging Technologies}, + volume={160}, + pages={104500}, + year={2024}, + publisher={Elsevier} +} + +@inproceedings{li2018diffusion, + title={{D}iffusion {C}onvolutional {R}ecurrent {N}eural {N}etwork: {D}ata-{D}riven {T}raffic {F}orecasting}, + author={Li, Y. and Yu, R. and Shahabi, C. and Liu, Y.}, + booktitle={International Conference on Learning Representations}, + year={2018} +} + +@article{punzo2021calibration, + title={About calibration of car-following dynamics of automated and human-driven vehicles: Methodology, guidelines and codes}, + author={Punzo, V. and Zheng, Z. and Montanino, M.}, + journal={Transportation Research Part C: Emerging Technologies}, + volume={128}, + pages={103165}, + year={2021}, + publisher={Elsevier} +} + + +@article{saifuzzaman2014incorporating, + title={Incorporating human-factors in car-following models: A review of recent developments and research needs}, + author={Saifuzzaman, M. and Zheng, Z.}, + journal={Transportation Research Part C: Emerging Technologies}, + volume={48}, + pages={379--403}, + year={2014}, + publisher={Elsevier} +} + +@article{treiber2012validation, + title={Validation of traffic flow models with respect to the spatiotemporal evolution of congested traffic patterns}, + author={Treiber, M. and Kesting, A.}, + journal={Transportation Research Part C: Emerging Technologies}, + volume={21}, + number={1}, + pages={31--41}, + year={2012}, + publisher={Elsevier} +} + +@article{mohammadian2023continuum, + title={Continuum modeling of freeway traffic flows: State-of-the-art, challenges and future directions in the era of connected and automated vehicles}, + author={Mohammadian, S. and Zheng, Z. and Haque, M. M. and Bhaskar, A.}, + journal={Communications in Transportation Research}, + volume={3}, + pages={100107}, + year={2023}, + publisher={Elsevier} +} + +@article{ngoduy2011multiclass, + title={Multiclass first-order traffic model using stochastic fundamental diagrams}, + author={Ngoduy, D.}, + journal={Transportmetrica}, + volume={7}, + number={2}, + pages={111--125}, + year={2011}, + publisher={Taylor \& Francis} +} + +@article{qian2017modeling, + author={Qian, Z. and Li, J. and Li, X. and Zhang, H. M. and Wang, H.}, + title={Modeling heterogeneous traffic flow: {A} pragmatic approach}, + journal={Transportation Research Part B: Methodological}, + volume={99}, + number={3}, + pages={183--204}, + year={2017} +} + +@article{chiarello2020overview, + title={An overview of non-local traffic flow models}, + author={Chiarello, F. A.}, + journal={Mathematical Descriptions of Traffic Flow: Micro, Macro and Kinetic Models}, + pages={79--91}, + year={2020}, + publisher={Springer} +} + +@article{cassidy1998bivariate, + title={Bivariate relations in nearly stationary highway traffic}, + author={Cassidy, M. J.}, + journal={Transportation Research Part B: Methodological}, + volume={32}, + number={1}, + pages={49--59}, + year={1998}, + publisher={Elsevier} +} + +@article{treiber1999derivation, + title={Derivation, properties, and simulation of a gas-kinetic-based, nonlocal traffic model}, + author={Treiber, M. and Hennecke, A. and Helbing, D.}, + journal={Physical Review E}, + volume={59}, + number={1}, + pages={239}, + year={1999}, + publisher={APS} +} + + +@article{colombo20022, + title={A $2\times2$ hyperbolic traffic flow model}, + author={Colombo, R. M.}, + journal={Mathematical and Computer Modelling}, + volume={35}, + number={5-6}, + pages={683--688}, + year={2002}, + publisher={Elsevier} +} + + + +@article{zhang2002non, + title={A non-equilibrium traffic model devoid of gas-like behavior}, + Author={Zhang, H. M.}, + journal={Transportation Research Part B: Methodological}, + volume={36}, + number={3}, + pages={275--290}, + year={2002}, + publisher={Elsevier} +} + + +@article{aw2000resurrection, + title={Resurrection of" second order" models of traffic flow}, + author={Aw, A. and Rascle, M.}, + journal={SIAM Journal on Applied Mathematics}, + volume={60}, + number={3}, + pages={916--938}, + year={2000}, + publisher={SIAM} +} + + +@article{CHU2025114241, + title = {Central-upwind scheme for the phase-transition traffic flow model}, + journal = {Journal of Computational Physics}, + volume = {539}, + pages = {114241}, + year = {2025}, + author = {Chu, S. and Kurganov, A. and Mohammadian, S. and Zheng, Z.}, + doi = {https://doi.org/10.1016/j.jcp.2025.114241}, + url = {https://www.sciencedirect.com/science/article/pii/S0021999125005248} +} + +@article{MOHAMMADIAN2023103731, + title = {{NET-RAT}: {N}on-equilibrium traffic model based on risk allostasis theory}, + journal = {Transportation Research Part A: Policy and Practice}, + volume = {174}, + pages = {103731}, + year = {2023}, + author = {Mohammadian, S. and Zheng, Z. and Haque, M. and Bhaskar, A.}, + doi = {https://doi.org/10.1016/j.tra.2023.103731}, + url = {https://www.sciencedirect.com/science/article/pii/S0965856423001519} +} + +@article{MOHAMMADIAN2025212, + title = {Numerical study of the non-conservative {NET-RAT} traffic flow model by path-conservative central-upwind schemes}, + journal = {Computers \& Mathematics with Applications}, + volume = {179}, + pages = {212-228}, + year = {2025}, + author = {Mohammadian, S. and Zheng, Z. and Chu, S. and Kurganov, A.}, + doi = {https://doi.org/10.1016/j.camwa.2024.12.014}, + url = {https://www.sciencedirect.com/science/article/pii/S0898122124005613} +} + +@article{MOHAMMADIAN2021105161, + title = {On the performance of {HLL}, {HLLC}, and {R}usanov solvers for hyperbolic traffic models}, + journal = {Computers \& Fluids}, + volume = {231}, + pages = {105161}, + year = {2021}, + author = {Mohammadian, S. and Moghaddam, A. M. and Sahaf, A.}, + doi = {https://doi.org/10.1016/j.compfluid.2021.105161}, + url = {https://www.sciencedirect.com/science/article/pii/S0045793021002929} +} + + +@article{jin2016equivalence, + title={On the equivalence between continuum and car-following models of traffic flow}, + author={Jin, W.-L.}, + journal={Transportation Research Part B: Methodological}, + volume={93}, + pages={543--559}, + year={2016}, + publisher={Elsevier} +} + +@article {Lebacque07, + Author = {Lebacque, J.-P. and Mammar, S. and Haj-Salem, H.}, + Journal = {Transportation and Traffic Theory}, + Number = {1}, + Pages = {755--776}, + Title = {Generic second order traffic flow modelling}, + Volume = {2007}, + Year = {2007}} + +@article {Qian17, + Author = {Qian, Z. and Li, J. and Li, X. and Zhang, H. M. and Wang, H.}, + Journal = {Transportation Research Part B: Methodological}, + Number = {3}, + Pages = {183-204}, + Title = {Modeling heterogeneous traffic flow: {A} pragmatic approach}, + Volume = {99}, + Year = {2017}} + +@book{Goodfellow-et-al-2016, + title={Deep Learning}, + author={Goodfellow, I. and Bengio, Y. and Courville, A.}, + publisher={MIT Press}, + note={\url{http://www.deeplearningbook.org}}, + year={2016} +} + +@article{jordan2015machine, + title={Machine learning: Trends, perspectives, and prospects}, + author={Jordan, M. I. and Mitchell, T. M.}, + journal={Science}, + volume={349}, + number={6245}, + pages={255--260}, + year={2015}, + publisher={American Association for the Advancement of Science} +} + +@article{raissi2019physics, + title={Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations}, + author={Raissi, M. and Perdikaris, P. and Karniadakis, G. E.}, + journal={Journal of Computational physics}, + volume={378}, + pages={686--707}, + year={2019}, + publisher={Elsevier} +} + +@article{karniadakis2021physics, + title={Physics-informed machine learning}, + author={Karniadakis, G. E. and Kevrekidis, I. G. and Lu, L. and Perdikaris, P. and Wang, S. and Yang, L.}, + journal={Nature Reviews Physics}, + volume={3}, + number={6}, + pages={422--440}, + year={2021}, + publisher={Nature Publishing Group UK London} +} + +@incollection{stern2015geometric, + title={Geometric {C}omputational {E}lectrodynamics with {V}ariational {I}ntegrators and {D}iscrete {D}ifferential {F}orms}, + author={Stern, A. and Tong, Y. and Desbrun, M. and Marsden, J. E.}, + booktitle={Geometry, Mechanics, and Dynamics: The Legacy of Jerry Marsden}, + pages={437--475}, + year={2015}, + publisher={Springer} +} + +@article{mohamed2016discrete, + title={Discrete exterior calculus discretization of incompressible Navier-Stokes equations over surface simplicial meshes}, + author={Mohamed, M. S. and Hirani, A. N. and Samtaney, R.}, + journal={Journal of Computational Physics}, + volume={312}, + pages={175--191}, + year={2016}, + publisher={Elsevier} +} + +@article{chen2021physics, + title={Physics-informed machine learning for reduced-order modeling of nonlinear problems}, + author={Chen, W. and Wang, Q. and Hesthaven, J. S. and Zhang, C.}, + journal={Journal of Computational Physics}, + volume={446}, + pages={110666}, + year={2021}, + publisher={Elsevier} +} + +@inproceedings{white2015programming, + title={{T}he {P}rogramming {G}ame: {E}valuating {MCTS} as an {A}lternative to {GP} for {S}ymbolic {R}egression}, + author={White, D. R. and Yoo, S. and Singer, J.}, + booktitle={Proceedings of the Companion Publication of the 2015 Annual Conference on Genetic and Evolutionary Computation}, + pages={1521--1522}, + year={2015} +} + +@inproceedings{sunsymbolic2023, + title={{S}ymbolic {P}hysics {L}earner: {D}iscovering {G}overning {E}quations via {M}onte {C}arlo {T}ree {S}earch}, + author={Sun, F. and Liu, Y. and Wang, J.-X. and Sun, H.}, + booktitle={The Eleventh International Conference on Learning Representations}, + year={2023} +} + +@inproceedings{kamienny2023deep, + title={{D}eep {G}enerative {S}ymbolic {R}egression with {M}onte-{C}arlo-{T}ree-{S}earch}, + author={Kamienny, P.-A. and Lample, G. and Lamprier, S. and Virgolin, M.}, + booktitle={International Conference on Machine Learning}, + pages={15655--15668}, + year={2023}, + organization={PMLR} +} \ No newline at end of file diff --git a/docs/theory/main.tex b/docs/theory/main.tex new file mode 100644 index 0000000..89bdaa7 --- /dev/null +++ b/docs/theory/main.tex @@ -0,0 +1,949 @@ +\documentclass{article} +\usepackage{graphicx} % Required for inserting images +% Used added packages +\usepackage[shortlabels]{enumitem} +\usepackage{blindtext} +\usepackage[export]{adjustbox} +\usepackage{wrapfig, siunitx, caption, subcaption, multirow, nicefrac} +\usepackage{color,soul} + +\usepackage[english]{babel} + +\usepackage{hyperref} +\usepackage{arsclassica} % Modifies the Classic Thesis package + +\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs + +\usepackage[utf8]{inputenc} % Required for including letters with accents + +\usepackage{graphicx} % Required for including images +\graphicspath{{Figures/}} % Set the default folder for images + +\usepackage{enumitem} % Required for manipulating the whitespace between and within lists + +\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template + +% \usepackage{subfig} % Required for creating figures with multiple parts (subfigures) + +\usepackage{amsmath,amssymb,amsthm} % For including math equations, theorems, symbols, etc + +\usepackage{varioref} % More descriptive referencing + +\usepackage{listings} + +\usepackage{epstopdf} +\usepackage[numbers]{natbib} +\usepackage{float} +\usepackage{emptypage} + + +\usepackage{booktabs} +\usepackage[ruled,vlined,linesnumbered]{algorithm2e} +% Custom right-aligned quote environment +\newcommand{\rightquote}[2]{ + \begin{flushright} + \parbox{0.6\textwidth}{\raggedleft + #1\vspace{0.1ex}\\ + \rule{0.55\textwidth}{0.4pt}\\ + \textit{#2} + } + \end{flushright} +} + +\usepackage{chngcntr} + +%\usepackage{subcaption} +\usepackage{nomencl} +\makenomenclature + +\definecolor{AUpantone}{rgb}{0.0, 0.2392156, 0.5111111} +\definecolor{AUpantoneDark}{rgb}{0.0, 0.1450980392156863, 0.27450980392156865} +\definecolor{AUpantoneCyan}{rgb}{0.21568627, 0.6274509, 0.79607843} +\definecolor{AUpantoneTurkis}{rgb}{0.0, 0.6705882353, 0.6431372549} + + +\newenvironment{dedication} + {\clearpage % we want a new page + \thispagestyle{empty}% no header and footer + \vspace*{\stretch{1}}% some space at the top + \itshape % the text is in italics + \raggedleft % flush to the right margin + } + {\par % end the paragraph + \vspace{\stretch{3}} % space at the bottom is three times that at the top + \clearpage % finish off the page + } + + +\titleformat{\chapter}[display]% + {\relax}{\vspace*{-3\baselineskip}\makebox[\linewidth][r]{\color{AUpantoneDark}\chapterNumber\thechapter}}{0pt}% + {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}\titlerule]% + + % {\raggedright\spacedallcaps}[\normalsize\vspace*{.8\baselineskip}]% + +%--------------------------------------------------------------------------------------- +% CODE +%--------------------------------------------------------------------------------------- +\lstdefinestyle{mystyle}{ + basicstyle=\footnotesize, + breakatwhitespace=true, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2 +} +\lstset{style=mystyle} + +%---------------------------------------------------------------------------------------- +% THEOREM STYLES +%--------------------------------------------------------------------------------------- + +\theoremstyle{definition} % Define theorem styles here based on the definition style (used for definitions and examples) +\newtheorem{Def}{Definition} + +\theoremstyle{plain} % Define theorem styles here based on the plain style (used for theorems, lemmas, propositions) +\newtheorem{Th}{Theorem} +\newtheorem{Cor}[Th]{Corollary} +\newtheorem{Lemma}[Th]{Lemma} +\newtheorem{Ex}[Th]{Example} +\newtheorem{Oss}[Th]{Remark} + +\theoremstyle{remark} % Define theorem styles here based on the remark style (used for remarks and notes) + +%---------------------------------------------------------------------------------------- +% HYPERLINKS +%--------------------------------------------------------------------------------------- + +\hypersetup{ +%draft, % Uncomment to remove all links (useful for printing in black and white) +colorlinks=true, breaklinks=true, bookmarksnumbered, +urlcolor=AUpantone, linkcolor=AUpantone, citecolor=AUpantone, % Link colors +pdftitle={simone_manti_phd_thesis}, % PDF title +pdfauthor={\textcopyright}, % PDF Author +pdfsubject={A Discrete Geometric Approach to Data-Driven +Model Discovery}, % PDF Subject +pdfkeywords={}, % PDF Keywords +pdfcreator={pdfLaTeX}, % PDF Creator +pdfproducer={LaTeX with hyperref and ClassicThesis} % PDF producer +} +% Other functions +\newcommand{\vect}[1]{\mathbf{#1}}%In order to show vectors in bold + +\usepackage{appendix} +\usepackage{titlesec} + + + +% C++ typeset in appendix +\usepackage{listings} +\usepackage{xcolor} % for setting colors +\usepackage{minted} + +% Use a dark VS Code-style theme +\usemintedstyle{monokai} + + +% Optional: set dark background for code blocks +\definecolor{bg}{rgb}{0.17,0.17,0.17} % VS Code dark background +\definecolor{lightgray}{rgb}{0.95,0.95,0.95} + + +% set the default code style +\lstset{ + % frame=tb, % draw a frame at the top and bottom of the code block + tabsize=4, % tab space width + showstringspaces=false, % don't mark spaces in strings + numbers=left, % display line numbers on the left + commentstyle=\color{green}, % comment color + keywordstyle=\color{blue}, % keyword color + stringstyle=\color{red} % string color +} + +\usepackage[ +top = 2.00cm, +bottom = 2.00cm, +left = 2.00cm, +right = 2.00cm]{geometry} + +\usepackage{bbm} +\usepackage{amscd} +\usepackage{pdfpages} +\usepackage{longtable} +\usepackage{tabularx} +\usepackage{tikz} +\usetikzlibrary{positioning} + + +\newcommand{\defeq}{\vcentcolon=} +\newcommand{\im}{\operatorname{im}} +\newcommand{\Hom}{{\rm{Hom}}} +\newcommand{\diam}{{\rm{diam}}} +\newcommand{\dom}{\text{dom}} +\newcommand{\ovl}{\overline} +\newcommand{\rr}{\mathbb{R}} +\newcommand{\EE}{\mathcal{E}} +\newcommand{\VV}{\mathcal{V}} +\newcommand{\mystar}{{\fontfamily{lmr}\selectfont$\star$}} +\newcommand{\llangle}{\langle \langle} +\newcommand{\rrangle}{\rangle \rangle} + +%bold commands +\newcommand{\xx}{\mathbf{x}} +\newcommand{\Xx}{\mathbf{X}} +\newcommand{\Tt}{\mathbf{T}} +\newcommand{\yy}{\mathbf{y}} +\newcommand{\ee}{\mathbf{e}} +\newcommand{\cc}{\mathbf{c}} +\newcommand{\uu}{\mathbf{u}} +\newcommand{\vv}{\mathbf{v}} +\newcommand{\ww}{\mathbf{w}} +\newcommand{\om}{\boldsymbol{\omega}} +\newcommand{\al}{\boldsymbol{\alpha}} +\newcommand{\be}{\boldsymbol{\beta}} +\newcommand{\ta}{\boldsymbol{\tau}} + + +%calcommand + +\newcommand{\mc}{\mathcal} + + +% Command to create a title page for each eer +\newcommand{\papertitlepage}[5]{% + \cleardoublepage + \thispagestyle{empty} + % Save the current geometry + \newgeometry{ + top=2.5cm, + bottom=2.5cm, + left=3cm, + right=3cm + } + + % Title page content here + \begin{center} + \Large\textbf{Paper #1}\\[1cm] + \LARGE\textbf{#2}\\[1cm] + \large{#3}\\[1cm] + \normalsize{#4}\\[0.5cm] + \small{#5} + \end{center} + + % Restore the original geometry + \restoregeometry +} + +\DeclareMathOperator*{\argmax}{arg\,max} +\DeclareMathOperator*{\argmin}{arg\,min} + +\title{Discrete Exterior Calculus} +\author{Simone Manti} +\date{January 2026} + +\begin{document} + +\maketitle + +Exterior Calculus (EC) \cite{abraham2012manifolds}, also known as the calculus of differential forms, is a powerful mathematical framework for formulating and analyzing problems involving geometry and topology. Developed to generalize classical vector calculus, EC provides a coordinate-free approach particularly suited for manifold settings. + +Central in EC is the concept of \textit{differential form}. Basically, a differential $k$-form is an object that can be integrated over $k$-dimensional manifolds. The primary operations in EC include: +\begin{itemize} +\item The \textbf{exterior derivative} $\mathrm{d}$: a generalization of gradient, curl, and divergence. +\item The \textbf{wedge product} $\wedge$: an associative, bilinear, and antisymmetric product of forms. +\item The \textbf{Hodge star} $\star$: maps $k$-forms to $(n-k)$-forms on an $n$-dimensional oriented Riemannian manifold. +\end{itemize} +EC provides a general and unified approach, which is particularly useful in fields such as differential geometry, topology, and theoretical physics. Table~\ref{tab: vc_vs_ec} shows a comparison between vector and exterior calculus. + +While EC provides a powerful and elegant continuous framework, a discrete counterpart is needed for practical applications (\textsl{e.g.}, in computational physics). +Discrete Exterior Calculus (DEC) \cite{hirani2003discrete, desbrun2005discrete} is exactly the discrete version of EC. It operates on simplicial complexes (which play the role of the manifolds for EC) and maintains the geometric and topological structure of the continuous counterpart. +Most importantly, DEC is inherently a discrete framework that bypasses the need for a differential formulation of physical theories. As a result, local conservation laws are naturally and strongly enforced, without requiring the discretization of differential operators \cite{tonti2013mathematical}. +In \cite{griebel2017upwind} the authors show that DEC can be specialized into other well-known numerical methods, such as Finite Volume Method and Finite Differences. Table~\ref{tab: fem_vs_dec} shows a comparison with DEC and the Finite Element Method (FEM), another popular choice for the discretization of Partial Differential Equations (PDE). + +\begin{table}[ht!] +\centering +\begin{tabularx}{\textwidth}{@{}lXX@{}} +\toprule +\textbf{Feature} & \textbf{Vector Calculus} & \textbf{Exterior Calculus} \\ +\midrule + +Differentiation & $\nabla$, curl, div & Exterior derivative $\mathrm{d}$ \\ +Integration domain & $ \Omega \subset \mathbb{R}^n$ & $n$-manifolds\\ +Variables & Vector fields & Differential forms \\ +Product & Dot/cross products & Wedge product $\wedge$ \\ +Stokes' theorem & Several variants & $\int_{\partial \Omega} \omega = \int_{\Omega} \mathrm{d}\omega$ \\ +Operator identity & $\nabla \cdot (\nabla \times \mathbf{F}) = 0$ & $\mathrm{d}^2 = 0$ \\ +%Coordinate dependence & Yes & No (coordinate-free) \\ +Hodge star & Not used explicitly & Maps between dual degrees \\ +Duality & Vector/tensor duality & $\star$ duality of forms \\ + +\bottomrule +\end{tabularx} +\caption{Overview of the key differences between vector and exterior calculus.} +\label{tab: vc_vs_ec} +\end{table} + +This chapter is organized as follows. Section~\ref{sec: dec} presents the core concepts of DEC. Section~\ref{sec: dec_examples} collects some examples of application of DEC for different scenarios. Finally, Section~\ref{sec: dctkit} gives a gentle and concise introduction to the discrete calculus library \texttt{dctkit}, which provides a \texttt{python} implementation of the concepts described in this chapter. + +Let us fix some notations used in the following sections: +\begin{itemize} + \item $\mathcal{E}^n$ is an $n$-dimensional euclidean space. + \item $\mathcal{V}$ is the $n$-dimensional translation space of $\mathcal{E}^n$ with base $\{\ee_1, \dots, \ee_n\}$. + \item $\llangle \cdot , \cdot \rrangle: \VV \times \VV \rightarrow \rr$ is an inner product, \textit{i.e.} a symmetric bilinear positive definite function. +\end{itemize} + +\section{DEC Fundamentals} +\label{sec: dec} +\begin{table}[t!] +\centering +\begin{tabularx}{\textwidth}{@{}lXX@{}} +\toprule +\textbf{Feature} & \textbf{FEM} & \textbf{DEC} \\ +\midrule +Mathematical foundation & Variational principles & Exterior calculus \\ +Variables & Scalar/vector fields in $H^1$ & Cochains \\ +Mesh structure & Triangular/quadrilateral & Simplicial complex\\ +Differentiation & Weak derivatives & Coboundary \\ +Metric dependency & In shape functions and integrals & In the Hodge star \\ +Topological invariants & Not explicitly preserved & Naturally preserved \\ +Local conservation laws & Enforced in weak form & Strongly enforced \\ +\bottomrule +\end{tabularx} +\caption{Overview of the key differences between the Finite Element Method (FEM) and Discrete Exterior Calculus (DEC).} +\label{tab: fem_vs_dec} +\end{table} +In this section we provide a gentle introduction about the fundamentals of Discrete Exterior Calculus (DEC). For further details on DEC, the reader is referred to \cite{hirani2003discrete, grinspun2006discrete, desbrun2005discrete, crane2018discrete, grady2010discrete}. + +\subsection{Discrete Domains} +\begin{Def} + A \textbf{$p$-cell} $\sigma^p$ is defined as a set of points which is homeomorphic to a closed unit $p$-ball $B_p := \{x \in \rr^p | ||x|| \leq 1\}$. The boundary of the $p$-cell $\partial \sigma^p$ is the portion of the cell which is mapped through the homeomorphism to $\partial B_p$. + When a $p$-cell consists of exactly $p+1$ vertices it is called \textbf{$p$-simplex}. +\end{Def} + +We can think of a cell complex as the discrete counterpart of a manifold, in the sense that, within discrete calculus, it plays a role analogous to that of a manifold in classical exterior calculus. +In fact, the following definition corresponds exactly to the concept of a discrete manifold in \cite{grinspun2006discrete} (see p.~43, Section~3.1.5). +In \cite{hirani2003discrete}, such structures are referred to as \textsl{manifold-like cell complexes}. + +\begin{Def} + A collection of cells defines a \textbf{cell complex} if it satisfies the following rules: + \begin{itemize} + \setlength\itemsep{0.01em} + \item The boundary of each $p$-cell (for $p > 0$) comprises the union of lower-order $p$-cells. + \item The intersection of any two cells is either empty or a boundary element of both cells. + \end{itemize} +\end{Def} + +A \textbf{simplicial complex} is a cell complex in which every $p$-cell is a $p$-simplex. In Figure~\ref{fig: sim_comp_example} we report an example of a 2-simplicial complex alongside an example of a non-simplicial complex. Notice that the latter is not a simplicial complex because the intersection of two $1$-cells is not a boundary element of both cells. + +\begin{figure}[t!] +\includegraphics[scale=1.5]{Figures/cell complex_vs_not_cell_complex.png} +\centering +\caption{An example of a $2$-simplicial complex (left) and a not simplicial complex (right).} +\label{fig: sim_comp_example} +\end{figure} + +We now introduce some operative definitions that we are going to use in the following sections. + +\begin{Def} + A \textbf{well-centered simplicial complex} is a simplicial cell-complex where the circumcenter of any $p$-simplex of the complex lies in its interior. +\end{Def} + +We will require that each $p$-cell is oriented and the orientation is specified by the order of nodes used to represent the $p$-cell. See p. 42-44 of \cite{grady2010discrete} for more details in this regard. + +\begin{Def} + We also introduce the following notation for $p$-simplices: $\sigma^q \prec \sigma^p$ if and only if $\sigma^q$ is a proper face of $\sigma^p$. +\end{Def} + +\begin{Def} + The \textbf{incidence matrix} $\mathsf{A}_p$ is the matrix which encodes which $p$-cells are incident to which $(p-1)$-cells in the $n$-complex and it is defined as + \begin{equation} + \mathsf{A}_p(i,j) = \begin{cases} + 0 \quad \text{if } \sigma^{p-1}_i \text{ is not on the boundary of } \sigma_j^p,\\ + +1 \quad \text{if } \sigma^{p-1}_i \text{ is coherent with the induced orientation of } \sigma^p_j,\\ + -1 \quad \text{if } \sigma^{p-1}_i \text{ is not coherent with the induced orientation of } \sigma^p_j.\\ + \end{cases} + \end{equation} +\end{Def} + +\begin{figure}[t!] + \includegraphics[width=8cm,height=5cm]{Figures/Oriented.png} + \centering + \caption{The $2$-simplicial complex of Example~\ref{ex: inc_matrix}.} + \label{fig: incidence_matrix} +\end{figure} + +\begin{Ex} + \label{ex: inc_matrix} + Let us see an explicit example to understand better the previous definition of incidence matrix. Consider the simplicial complex in Figure~\ref{fig: incidence_matrix}. + In this case, the incidence matrix $\mathsf{A}_1$ is + \begin{equation*} + \mathsf{A}_1 = \begin{bmatrix} + -1 & 0 & 1 & 0 & 1\\ + 1 & -1 & 0 & 0 & 0\\ + 0 & 1 & -1 & -1 & 0\\ + 0 & 0 & 0 & 1 & -1\\ + \end{bmatrix} + \end{equation*} +\end{Ex} + +\begin{Def} + Let $K$ be a cell complex. A \textbf{$p$-chain} is an $n_p$-tuple of scalars which assigns a coefficient to each $p$-cell, where $n_p$ is the number of distinct $p$-cells in the complex. Each $p$-cell is referred to a \textbf{basic chain}. The $p$-chains group is denoted by $\mathcal{C}_p(K, \rr)$. +\end{Def} + +A $p$-chain $c_p$ can be expressed with respect to basic chains: +\begin{equation} + c_p = \sum_j c_p(\sigma^p_j) \sigma^p_j, +\end{equation} +where $c_p(\sigma^p_j) \in \rr$ and $\sigma^p_j$ is a basic chain for any $j$. Thus, any $p$-chain may be represent by a $n_p \times 1$ (row) vector $\mathsf{c}_p$. By applying the incidence matrix $\mathsf{A}_p$ to $\mathsf{c}_p$ we obtain a $(p-1)$-chain, \textit{i.e.}, in components +\begin{equation} + \mathsf{c}_{p-1} = \mathsf{A}_p \mathsf{c}_p, +\end{equation} +where $\mathsf{c}_{p-1}$ is the array of the coefficients of the \textbf{boundary} of the $p$-chain $c_p$. Hence, $\mathsf{A}_p$ may be viewed as the matrix representation of the \textbf{discrete boundary operator}. We will indicate the boundary operator with the symbol $\partial$. +Hence, the incidence matrix provides both a representation of the topology of the manifold and a representation of the boundary operator. + +Geometrically, $p$-chains are the discrete representation of $p$-vectors: their coefficients (weights) can be used to encode length, areas, etc. +For instance, the $1$-chains represent lengths, while the $2$-chains represent areas and so on. + +\subsection{Discrete Forms and Coboundary} + +\begin{Def} + A $p$-\textbf{cochain}, or discrete form, is a linear functional that maps chains to scalars. As for the chains, we can represent cochains in terms of \textbf{basic cochains} + \begin{equation} + c^p = \sum_i c^p(\sigma_p^i) \sigma_p^i, \label{eq: cochain_def} + \end{equation} + where $a_i \in \rr$ and $\sigma_p^i$ is a basic $p$-cochain. The space of $p$-cochains on a simplicial complex $K$ is denoted by $\mathcal{C}^p(K, \rr)$. +\end{Def} +Cochains, or \textsl{discrete forms}, serve as the discrete analogue of differential forms, and in physical theories they represent discrete fields defined on the elements of a cell complex. Indeed, we know \cite{grady2010discrete} that differential $p$-forms are built taking the dual of the vector space of $p$-vectors and similarly the space of scalar-valued $p$-cochains is the dual of the space of scalar-valued $p$-chains. +We can represent a $p$-cochain as a $1 \times n_p$ (column) vector. + +\begin{Def} + We can define a discrete analogue of \textbf{integration} as the pairing of a $p$-chain with a $p$-cochain, precisely + \begin{equation} + \llangle c^p, c_p \rrangle := \sum_{i=1}^{n_p} c_p(\sigma^p_i)c^p(\sigma_p^i). + \end{equation} +\end{Def} + +\begin{Def} + We define the matrix form of \textbf{coboundary operator} $\mathsf{D}_p$ as the adjoint of the boundary operator through the pairing defined previously, i.e. by definition + \begin{equation} + \llangle \mathsf{D}_p\mathsf{c}^{p-1}, \mathsf{c}_p \rrangle = \llangle \mathsf{c}^{p-1}, \mathsf{A}_p\mathsf{c}_p \rrangle. + \end{equation} + Hence, $\mathsf{D}_p = \mathsf{A}^T_p$. + + Without using components, the coboundary is defined so as to satisfy the (discrete) \textbf{Stokes Theorem}, \textsl{i.e.}, + \begin{equation} + \llangle d c^{p-1}, c_p \rrangle = \llangle c^{p-1}, \partial c_p \rrangle. \label{eq: discrete_Stokes} + \end{equation} + + The \textbf{coboundary operator} (not in components) will be denoted with $d$. +\end{Def} + +The coboundary operator can be seen as the discrete counterpart of the exterior derivative, since if we apply the coboundary operator to a $p$-cochain we obtain a $(p+1)$-cochain. + +\subsection{Primal and Dual Complexes} +\label{sec: primal_dual_complexes} +To illustrate the necessity of a dual complex in the DEC framework, we consider an example adapted from \cite{tonti2013mathematical}. In the differential formulation of physical laws, operators such as the Laplacian act on functions to express relationships between physical quantities. For instance, the Poisson’s equation +\begin{equation} + \Delta u(\mathbf{x}) + f(\mathbf{x}) = 0 +\end{equation} +relates the source $f$ at $\mathbf{x}$ to the Laplacian of $u$ at the same point. While this might appear to be a purely pointwise relation, it is not truly local: computing the Laplacian at $\mathbf{x}$ involves evaluating derivatives, which depend on a neighborhood of $\mathbf{x}$. In other words, a differential operator inherently requires information from an extended region around each point, whose precise size is not specified. These observations naturally motivate the introduction of an auxiliary structure surrounding the original complex. Collectively, the auxiliary regions associated with each cell form a new complex, known as the \textbf{dual complex}, which provides a discrete representation of these neighborhood interactions in the framework of DEC. + +Given a cell complex of dimension $n$, we can define its \textsl{dual} by associating a $p$-cell with an $(n-p)$-cell, following a specific rule. In the case of simplicial complex, the following rules are of relevant importance, since they are the most used in applications. +\begin{itemize} + \item \textbf{Circumcentric (Voronoi) dual}. Voronoi cells are polygons whose sides are the axes of the edges of a primal simplicial complex. + \item \textbf{Barycentric dual}. Barycentric cells are polygons obtained by connecting the barycentre of every triangle with the midpoint of the edges of the triangles. +\end{itemize} + +For more details on this construction, see section 4.2 of \cite{tonti2013mathematical}. From now on, the circumcentric rule is used to construct the dual complex. + +The dual of a cell complex $K$ is indicated as $\star K$ and a generic dual $p$-cell of $\star K$ is indicated as $\star \sigma_{(n-p)}$. + +\subsubsection{Orientations} + +Once a primal complex is defined, we have to orient it in order to compute properly the boundary matrices. To do so, we choose one of the two possible orientations, clockwise or counterclockwise, for all the $n$-cells and this choice induces an orientation for all the $p$-cells with $0 < p \leq n-1$, see, \textsl{e.g.}, Definition 2.3.5. of \cite{hirani2003discrete}. +Following \cite{hirani2003discrete}, we do not assign any orientation to points ($0$-cells), even though in \cite{tonti2013mathematical} points are oriented as sinks or sources. + +Following this receipt, we can give an orientation to every $p$-cell of the primal complex. This induces an orientation to all the dual $p$-cells, since the primal $p$-cells and dual $(n-p)$-cells have a clear association with each other. +Precisely, following the algorithm described in Remark 2.5.1 of \cite{hirani2003discrete} we are able to orient all the dual $p$-cells. +%Geometrically, for $n=2$ we orient the dual $(n-p)$-cell rotating of $\pi/2$ counterclockwise the orientation of the corresponding primal $p$-cell \cite{crane2018discrete}. + +We follow the previous rule to orient primal and dual complex. +Note that this choice is crucial: if we change the orientation rule, we will also have to modify the definition of the DEC operators (coboundary, Hodge star, etc). For example, in \cite{grady2010discrete} the induced orientation of the dual complex is different and consequently the definitions of some operators are slightly different. + +\subsubsection{Dual boundary and coboundary} + +We wish to define the dual boundary $\partial^{\star}$ in order to also have a dual coboundary $d^\star$ obtained by the relation +\begin{equation} + \llangle d^\star \alpha, \star \beta \rrangle = \llangle \alpha, \partial^\star \!\beta \rrangle. +\end{equation} +We have to take care about the sign of the dual boundary, as stated in \cite{schulz2020convergence}. The following definition \cite{schulz2020convergence} is consistent with our orientation rule. + +\begin{Def} + The \textbf{dual boundary operator} $\partial_p^*: \mathcal{C}_p(\star K, \rr) \rightarrow \mathcal{C}_{p-1}(\star K, \rr)$ is the linear operator such that + \begin{equation} + \partial_p^\star \star\!\tau = (-1)^{p+1} \sum_{\eta \succ \tau} \star \eta, + \end{equation} + where $\star \tau$ is an arbitrary dual $p$-simplex and $\eta$ is a dual $(p+1)$-simplex oriented in order to induce a consistent orientation on $\tau$. +\end{Def} + +As we stated previously, the definition of the dual coboundary operator is straightforward now. The following result \cite{munkres2018elements, milicchio2008codimension}, called \textsl{Poincar\`e duality}, gives us an explicit relation between primal coboundary and dual boundary. + + \begin{Th} + There exists a family of isomorphisms $\phi_p: \mathcal{C}^{p}(K, \rr) \rightarrow \mathcal{C}_{n-p}(\star K, \rr)$ such that the following diagram commutes for any $k$. + $$\begin{CD} + \mathcal{C}^{p-1}(K, \rr) @>\phi_{p-1}>> \mathcal{C}_{n-p+1}(\star K, \rr)\\ + @VVd_{p-1}V @VV\partial_{n-p+1}^\star V\\ + \mathcal{C}^{p}(K, \rr) @>\phi_p>> \mathcal{C}_{n-p}(\star K, \rr)\\ + \end{CD}$$ +\end{Th} + +The proof of the previous Theorem (see proof of Theorem 65.1 of \cite{munkres2018elements}) is constructive and we can see that the definition of $\phi_p$ is dependent on the orientation. + +The following result is a practical consequence of the previous statements \cite{schulz2020convergence, desbrun2005discrete}. + +\begin{Th} + Given a primal $n$-complex, the matrix representation of the boundary operator on primal $p$-cells $\mathsf{A}_p$ is the transpose of the (matrix representation of the) boundary operator on dual $(n - p - 1)$-cells ${\mathsf{A}^*_{n-p-1}}$, \textit{i.e.} + \begin{equation} + \mathsf{A}_p = (-1)^{p+1}( {\mathsf{A}^{\star}_{n-p-1}})^T, + \end{equation} + or equivalently + \begin{equation} + \mathsf{A}^\star_{n-p-1} = (-1)^{p+1} \mathsf{A}^T_p + \end{equation} +\end{Th} + +All these relations can be summarized by the following diagram, in which $\star$ is the \textbf{discrete Hodge star} (introduced formally in the next section) which allows us to pass from a primal $p$-cell to its correspondent dual $(n-p)$-cell. + +$$\begin{CD} +\mathcal{C}^p(K, \rr) @>d_p>> \mathcal{C}^{p+1}(K, \rr)\\ +@VV\star_pV @VV\star_{p+1}V\\ +\mathcal{C}^{n-p}(\star K, \rr) @ 0: + # extract only the left value + rows.append(dual_edge[0]) + cols.append(i) + data.append(1.) # Convert to NumPy arrays rows = np.array(rows, dtype=int) cols = np.array(cols, dtype=int) data = np.array(data, dtype=dctkit.float_dtype) - # in the case of non-well centered mesh an entry of the flat weights matrix - # can be NaN. In this case, the corresponding dual edge is the null vector, - # hence we shouldn't take in account dot product with it. We then replace - # any NaN with 0. - data = np.nan_to_num(data) # Build sparse COO matrix of raw lengths self.flat_dual_upw_weights = (rows, cols, data) @@ -440,6 +424,8 @@ def get_flat_DPP_weights(self): self.flat_DPP_weights = self.flat_DPD_weights def get_flat_PDP_weights(self): + """Construct the primal-dual-primal (PDP) weighting matrix for the + discrete flat operator.""" num_edges = self.S[1].shape[0] # Preallocate lists for COO format diff --git a/tests/test_flat.py b/tests/test_flat.py index 944fab2..b87a55a 100644 --- a/tests/test_flat.py +++ b/tests/test_flat.py @@ -1,42 +1,105 @@ import numpy as np import dctkit as dt from dctkit.mesh import util -import dctkit.dec.flat as V +from dctkit.dec.flat import flat_DPD, flat_DPP, flat_PDP, flat_dual_upw from dctkit.dec import cochain as C -def test_flat(setup_test): +def test_flat_2D(setup_test): mesh, _ = util.generate_hexagon_mesh(1., 1.) - S = util.build_complex_from_mesh(mesh) + S = util.build_complex_from_mesh(mesh, space_dim=2) S.get_hodge_star() S.get_flat_DPP_weights() S.get_flat_DPD_weights() + S.get_flat_PDP_weights() + S.get_flat_dual_upw_weights() - # test flat operators - v_coeffs = np.ones((S.S[2].shape[0], S.space_dim), dtype=dt.float_dtype) - T_coeffs = np.ones((S.S[2].shape[0], S.space_dim, - S.space_dim), dtype=dt.float_dtype) - v = C.CochainD0V(S, v_coeffs) - T = C.CochainD0T(S, T_coeffs) + # vector-valued cochains test + vP0_coeffs = np.ones((S.num_nodes, S.space_dim), dtype=dt.float_dtype) + vD0_coeffs = np.ones((S.S[2].shape[0], S.space_dim), dtype=dt.float_dtype) + vP0 = C.CochainP0V(S, vP0_coeffs) + vD0 = C.CochainD0V(S, vD0_coeffs) - dedges = S.dual_edges_vectors[:, :v.coeffs.shape[1]] - pedges = S.primal_edges_vectors[:, :v.coeffs.shape[1]] - dual_edges_coch = C.CochainD1V(complex=S, coeffs=dedges) - primal_edges_coch = C.CochainP1V(complex=S, coeffs=pedges) - - c_v_DPD = V.flat(v, S.flat_DPD_weights, dual_edges_coch) - c_T_DPD = V.flat(T, S.flat_DPD_weights, dual_edges_coch) - c_v_DPP = V.flat(v, S.flat_DPP_weights, primal_edges_coch) - c_T_DPP = V.flat(T, S.flat_DPP_weights, primal_edges_coch) + c_v_DPD = flat_DPD(vD0) + c_v_DPP = flat_DPP(vD0) + c_v_PDP = flat_PDP(vP0) + c_v_dual_upw = flat_dual_upw(vD0) c_v_DPD_true_coeffs = S.dual_edges_vectors.sum(axis=1)[:, None] - c_T_DPD_true_coeffs = np.ones((12, 3), dtype=dt.float_dtype) - c_T_DPD_true_coeffs = c_v_DPD_true_coeffs*c_T_DPD_true_coeffs c_v_DPP_true_coeffs = S.primal_edges_vectors.sum(axis=1)[:, None] - c_T_DPP_true_coeffs = np.ones((12, 3), dtype=dt.float_dtype) - c_T_DPP_true_coeffs = c_v_DPP_true_coeffs*c_T_DPP_true_coeffs + c_v_PDP_true_coeffs = np.array([[0.3660254], + [-1.3660254], + [-1.], + [-1.], + [-1.3660254], + [-1.3660254], + [-0.3660254], + [-0.3660254], + [1.], + [1.], + [1.3660254], + [0.3660254]]) + c_v_dual_upw_true_coeffs = np.array([[0.], + [0.], + [-0.57735027], + [0.], + [0.21132487], + [0.], + [0.78867513], + [0.], + [0.57735027], + [0.], + [-0.21132487], + [-0.78867513]]) assert np.allclose(c_v_DPD.coeffs, c_v_DPD_true_coeffs) - assert np.allclose(c_T_DPD.coeffs, c_T_DPD_true_coeffs) assert np.allclose(c_v_DPP.coeffs, c_v_DPP_true_coeffs) + assert np.allclose(c_v_PDP.coeffs, c_v_PDP_true_coeffs) + assert np.allclose(c_v_dual_upw.coeffs, c_v_dual_upw_true_coeffs) + + # tensor-valued cochains test + TP0_coeffs = np.ones((S.num_nodes, S.space_dim, + S.space_dim), dtype=dt.float_dtype) + TD0_coeffs = np.ones((S.S[2].shape[0], S.space_dim, + S.space_dim), dtype=dt.float_dtype) + TP0 = C.CochainP0V(S, TP0_coeffs) + TD0 = C.CochainD0T(S, TD0_coeffs) + + c_T_DPD = flat_DPD(TD0) + c_T_DPP = flat_DPP(TD0) + c_T_PDP = flat_PDP(TP0) + c_T_dual_upw = flat_dual_upw(TD0) + + c_T_DPD_true_coeffs = np.ones((12, 2), dtype=dt.float_dtype) + c_T_DPD_true_coeffs = c_v_DPD_true_coeffs*c_T_DPD_true_coeffs + c_T_DPP_true_coeffs = np.ones((12, 2), dtype=dt.float_dtype) + c_T_DPP_true_coeffs = c_v_DPP_true_coeffs*c_T_DPP_true_coeffs + c_T_PDP_true_coeffs = np.array([[0.3660254, 0.3660254], + [-1.3660254, -1.3660254], + [-1., -1.], + [-1., -1.], + [-1.3660254, -1.3660254], + [-1.3660254, -1.3660254], + [-0.3660254, -0.3660254], + [-0.3660254, -0.3660254], + [1., 1.], + [1., 1.], + [1.3660254, 1.3660254], + [0.3660254, 0.3660254]]) + c_T_dual_upw_true_coeffs = np.array([[0., 0.], + [0., 0.], + [-0.57735027, -0.57735027], + [0., 0.], + [0.21132487, 0.21132487], + [0., 0.], + [0.78867513, 0.78867513], + [0., 0.], + [0.57735027, 0.57735027], + [0., 0.], + [-0.21132487, -0.21132487], + [-0.78867513, -0.78867513]]) + + assert np.allclose(c_T_DPD.coeffs, c_T_DPD_true_coeffs) assert np.allclose(c_T_DPP.coeffs, c_T_DPP_true_coeffs) + assert np.allclose(c_T_PDP.coeffs, c_T_PDP_true_coeffs) + assert np.allclose(c_T_dual_upw.coeffs, c_T_dual_upw_true_coeffs)