<<

: Discrete Exterior

[Discrete (Thesis). Hirani, 2003] [Discrete Differential Forms for Computational Modeling. Desbrun et al., 2005] [Build Your Own DEC at Home. Elcott et al., 2006] Chains

Recall: A k-chain of a simplicial complex Κ is of the k-simplices in Κ: c = ∑c(σ )⋅σ σ∈Κ k where c is a real-valued . The dual of a k-chain is a k-cochain which is a linear taking a k-chain to a real value. Chains and cochains related through evaluation: –Cochains: What we integrate –Chains: What we integrate over Boundary

Recall: The boundary ∂σ of a k- σ is the signed union of all (k-1)-faces.

∂ ∂ ∂ ∂

+1 -1 The boundary operator extends linearly to act on chains:   ∂c = ∂ ∑c(σ )⋅σ  = ∑c(σ )⋅∂σ  σ∈Κ k  σ∈Κ k Discrete Exterior

Recall: The d:Ωk→ Ωk+1 is the operator on cochains that is the complement of the boundary operator, defined to satisfy Stokes’ Theorem. -1 -2 -1 -3.5 -2 0.5 0.5 2 0 0.5 2 0 0.5 2 1.5 1 1 Since the boundary of the boundary is empty: ∂∂ = 0 dd = 0 The Laplacian

Definition: The Laplacian of a function f is a function defined as the of the of f: ∆f = div(∇f ) = ∇ ⋅∇f The Laplacian

Definition: The Laplacian of a function f is a function defined as the divergence of the gradient of f: ∆f = div(∇f ) = ∇ ⋅∇f Q. What do the gradient and divergence operators act on? The Gradient

Definition: Given a function f:Rn→R, the gradient of f at a point p is defined as:  ∂f ∂f  ∇f ( p) =  ,...,   ∂x1 ∂xn  The Gradient

Definition: Given a function f:Rn→R, the gradient of f at a point p is defined as:  ∂f ∂f  ∇f ( p) =  ,...,   ∂x1 ∂xn  Given a direction vector v, we have: ∂f ∂f f (p + v) ≈ f ( p) + v1 +...+ v1 ∂x1 ∂x1 = f ( p) + v,∇f ( p) The Gradient

Definition: Given a function f:Rn→R, the gradient of f at a point p is defined as:  ∂f ∂f  ∇f ( p) =  ,...,   ∂x1 ∂xn  Given a direction vector v, we have: f (p + v) ≈ f ( p) + v,∇f ( p) The gradient is an operator (not really a vector) telling us how moving in direction v will affect the value of the function. The Gradient

Stokes’ Theorem: n Given an oriented curve c⊂R with endpoints c0 and c1, integrating the gradient of a function over the curve, we get the difference between the values of the function at the endpoints: ∇ = − ∫ f (p) f (c1) f (c0 ) c ∇f

c1 c0 The Gradient

Stokes’ Theorem: n Given an oriented curve c⊂R with endpoints c0 and c1, integrating the gradient of a function over the curve, we get the difference between the values of the function at the endpoints: ∇ = − ∫ f (p) f (c1) f (c0 ) c The gradient satisfies Stokes’ Theorem ∇f and takes something we evaluate at points to something we evaluate c1 c over curves. 0 The Gradient

Stokes’ Theorem: n Given an oriented curve c⊂R with endpoints c0 and c1, integrating the gradient of a function over the curve, we get the difference between the values of the function at the endpoints: ∇ = − ∫ f (p) f (c1) f (c0 ) c The gradient satisfies Stokes’ Theorem ∇f and takesThe something gradient operator we evaluate is the exterior at points toderivative something taking we 0 -evaluateforms to 1-forms: c1 c0 over curves. ∇ = d : Ω0 (R n ) → Ω1(R n ) Divergence

Definition: Given a vector- X:Rn→Rn, representing a flow, the of the through a patch of hyper-surface S is the “amount” of flow that passes through the surface: = FluxS ( f ) ∫∫ X ,n dS S where n is the surface . X

S Divergence

Stokes’ Theorem: Given a volume V⊂Rn with boundary ∂V=S, integrating the divergence of a function over the volume, we get the flux across the boundary: ∫∫∫∇ ⋅ X = ∫∫ X ,n dS V S

X

V

∂V=S Divergence

Stokes’ Theorem: Given a volume V⊂Rn with boundary ∂V=S, integrating the divergence of a function over the volume, we get the flux across the boundary: ∫∫∫∇ ⋅ X = ∫∫ X ,n dS V S The divergence satisfies Stokes’ Theorem X and takes something we evaluate over hyper-surfaces to something we V evaluate over volumes. ∂V=S Divergence

Stokes’ Theorem: Given a volume V⊂Rn with boundary ∂V=S, integrating the divergence of a function over the volume, we get the flux across the boundary: ∫∫∫∇ ⋅ X = ∫∫ X ,n dS V S The divergence satisfies Stokes’ Theorem X and takes something we evaluate over V hyper-Thesurfaces divergence to something operator is we the exterior evaluatederivative over volumes. taking (n-1)-forms to n-forms: ∂V=S ∇⋅ = d : Ωn−1(R n ) → Ωn (R n ) The Laplacian

∆f = div(∇f ) = ∇ ⋅∇f Q. What do the gradient and divergence operators act on? A. The gradient and divergence operators are exterior that act on 0-forms and (n-1) forms respectively: – Gradient ∇:Ω0(Rn)→ Ω1(Rn) – Divergence ∇⋅:Ωn-1(Rn)→ Ωn(Rn) The Laplacian

∆f = div(∇f ) = ∇ ⋅∇f

– Gradient ∇:Ω0(Rn)→ Ω1(Rn) – Divergence ∇⋅:Ωn-1(Rn)→ Ωn(Rn) Problem: The Laplacian is supposed to take functions (0-forms) to functions, but the divergence doesn’t take 1-forms as input and it doesn’t return 0-forms as output!!! Poincaré

Observation: In an n-dimensional inner-product space, specifying a k-dimensional subspace is the same as specifying an (n-k)-dimensional subspace. Poincaré Duality

Observation: In an n-dimensional inner-product space, specifying a k-dimensional subspace is the same as specifying an (n-k)-dimensional subspace. Moreover, if the space is oriented, specifying a k-dimensional oriented subspace is the same as specifying an (n-k)-dimensional oriented subspace. Poincaré Duality

If we are given a k-dimensional subspace spanned by vectors {v1,…,vk}, we can always find vectors {vk+1,…,vn} such that the vectors {v1,…,vn} are a for the whole space and:

vi ,v j = 0 for all 1≤i≤k and all k+1≤j≤n. Poincaré Duality

If we are given a k-dimensional subspace spanned by vectors {v1,…,vk}, we can always find vectors {vk+1,…,vn} such that the vectors {v1,…,vn} are a basis for the whole space and:

vi ,v j = 0 for all 1≤i≤k and all k+1≤j≤n. If the space has an orientation, we can order the

{vk+1,…,vn} so that the vectors {v1,…,vn} have positive orientation. Poincaré Duality

Example: Consider R2, with the standard inner product and orientation x∧y: Poincaré Duality

Example: Consider R2, with the standard inner product and orientation x∧y: – R0→R2: ∅→ x∧y – R1→R1: x→y, y→-x – R2→R0: x∧y→∅ Poincaré Duality

Example: Consider R3, with the standard inner product and orientation x∧y∧z: Poincaré Duality

Example: Consider R3, with the standard inner product and orientation x∧y∧z: – R0→R2: ∅→ x∧y∧z – R1→R2: x→y∧z, y→-x∧z, z→x∧y – R2→R1: x∧y→z, x∧z→-y, y∧z→x – R3→R0: x∧y∧z→∅ The Laplacian

∆f = div(∇f ) = ∇ ⋅∇f

– Gradient ∇:Ω0(Rn)→ Ω1(Rn) – Divergence ∇⋅:Ωn-1(Rn)→ Ωn(Rn) Problem: The Laplacian is supposed to take functions (0-forms) to functions, but the divergence doesn’t take 1-forms as input and it doesn’t return 0-forms as output!!! The Laplacian

∆f = div(∇f ) = ∇ ⋅∇f

– Gradient ∇:Ω0(Rn)→ Ω1(Rn) – Divergence ∇⋅:Ωn-1(Rn)→ Ωn(Rn) Problem: The Laplacian is supposed to take functions (0-forms) to functions, but the divergence doesn’t take 1-forms as input and it doesn’t return 0-forms as output!!! Solution: Use the duality between k-dimensional and (n-k)-dimensional subspaces to turn 1-forms into (n-1)-forms and n-forms into 0-forms. Hodge Star

Locally, a k-form take k-dimensional, oriented, surface elements and return a value. Q: The corresponding dual (n-k)-form should act on the (oriented) , but what value should it return? Hodge Star

Locally, a k-form take k-dimensional, oriented, surface elements and return a value. Q: The corresponding dual (n-k)-form should act on the (oriented) orthogonal complement, but what value should it return? A: Informally, we think of a k-form as assigning a density per k-volume (the “average”). We define the corresponding (n-k)-form with the same density per unit (n-k)-volume. Hodge Star

Definition: The map taking a k-form to the corresponding (n-k)-forms is called the : ∗: Ωk (R n ) → Ωn−k (R n ) Hodge Star

For R2: – *:Ω0(R2)→ Ω2(R2): ∅→ x∧y – *:Ω1(R2)→ Ω1(R2): x→y, y→-x – *:Ω2(R2)→ Ω0(R2): x∧y→∅ For R3: – *:Ω0(R3)→ Ω3(R3): ∅→ x∧y∧z – *:Ω1(R3)→ Ω2(R3): x→y∧z, y→-x∧z, z→x∧y – *:Ω2(R3)→ Ω1(R3): x∧y→z, x∧z→-y, y∧z→x – *:Ω3(R3)→ Ω0(R3): x∧y∧z→∅ Hodge Star

For R2: – *:Ω0(R2)→ Ω2(R2): ∅→ x∧y – *:Ω1(R2)→ Ω1(R2): x→y, y→-x – *:Ω2(R2)→ Ω0(R2): x∧y→∅ For R3: – *:Ω0(R3)→ Ω3(R3): ∅→ x∧y∧z – *:Ω1(R3)→ Ω2(R3): x→y∧z, y→-x∧z, z→x∧y – *:Ω2(R3)→ Ω1(R3): x∧y→z, x∧z→-y, y∧z→x Note that3 the3 Hodge0 Star3 operator from k-forms to (n-k)-forms and– the*: Ωoperator(R )→ fromΩ ( (Rn-):k) -xforms∧y∧z to→∅ k-forms are almost inverses: k (n−k ) ∗k ∗n−k = (−1) Dual Complexes

In order to be able to define a discrete Laplacian, we need to have a discrete version of the Hodge Star. Dual Complexes

In order to be able to define a discrete Laplacian, we need to have a discrete version of the Hodge Star. In the same way as we defined dual/orthogonal subspaces in the continuous case, we would like to define dual/orthogonal in the discrete case. Dual Complexes

Definition: Given a discrete , we define the Voronoi dual complex *K to be the (non-simplicial) dual complex obtained by associating simplices with their Voronoi duals.

*K K Dual Complexes

Definition: Given a discrete manifold, we define the Voronoi dual complex *K to be the (non-simplicial) dual complex obtained by associating simplices with their Voronoi duals.

*K K Dual Complexes

Definition: Given a discrete manifold, we define the Voronoi dual complex *K to be the (non-simplicial) dual complex obtained by associating simplices with their Voronoi duals.

*K K Dual Complexes

Definition: Given a discrete manifold, we define the Voronoi dual complex *K to be the (non-simplicial) dual complex obtained by associating simplices with their Voronoi duals.

*K K Dual Complexes

Definition: Given a discrete manifold, we define the Voronoi dual complex *K to be the (non-simplicial) dual complex obtained by associating simplices with their Voronoi duals. Dual Complexes

Using the dual complex, we can associate each (primal) k-simplex with a (dual) (n-k)-cell. Dual Complexes

Using the dual complex, we can associate each (primal) k-simplex with a (dual) (n-k)-cell. Furthermore, because we are using the Voronoi dual, the dual (n-k)-cells are orthogonal to the primal k-simplices. Dual Complexes

Definition: We denote by * the map that takes primal simplices to the corresponding (n-k)-cells: ∗: Κ (k ) → *Κ (n−k ) Dual Complexes

Definition: Using the association between primal simplices and dual cells, we define the discrete Hodge Star operator that takes k-cochains on the primal complex to (n-k)-cochains on the dual complex: ∗: Ωk (Κ) → Ωn−k (*Κ) Dual Complexes

Definition: If ω is a k-cochain with value ω(σ) on σ, we treat ω as having a density of ω(σ)/|σ| per unit k- volume on σ (the “average” value of ω on σ). Dual Complexes

Definition: If ω is a k-cochain with value ω(σ) on σ, we treat ω as having a density of ω(σ)/|σ| per unit k- volume on σ (the “average” value of ω on σ). Thus, we define *ω so it has the same density ω(σ)/|σ| per unit (n-k)-volume on *σ. Dual Complexes

Definition: If ω is a k-cochain with value ω(σ) on σ, we treat ω as having a density of ω(σ)/|σ| per unit k- volume on σ (the “average” value of ω on σ). Thus, we define *ω so it has the same density ω(σ)/|σ| per unit (n-k)-volume on *σ. Or in other words: ∗σ ∗ω(∗σ ) = ω(σ ) σ Putting it All Together

In 3D: – We have both primal and dual complexes. – We have a boundary operator, and hence exterior derivative on both. – We have k-cochains over both complexes. – We have the Hodge Star operator to transition between the two. Putting it All Together

Using this structure, we define the Laplacian: 1. Compute the gradient using the ext. derivative: primal 0-cochain → primal 1-cochain Putting it All Together

Using this structure, we define the Laplacian: 1. Compute the gradient using the ext. derivative: primal 0-cochain → primal 1-cochain 2. Apply the Hodge star operator: primal 1-cochain → dual (n-1)-cochain Putting it All Together

Using this structure, we define the Laplacian: 1. Compute the gradient using the ext. derivative: primal 0-cochain → primal 1-cochain 2. Apply the Hodge star operator: primal 1-cochain → dual (n-1)-cochain 3. Compute the divergence using the ext. derivative: dual (n-1)-cochain → dual n-cochain Putting it All Together

Using this structure, we define the Laplacian: 1. Compute the gradient using the ext. derivative: primal 0-cochain → primal 1-cochain 2. Apply the Hodge star operator: primal 1-cochain → dual (n-1)-cochain 3. Compute the divergence using the ext. derivative: dual (n-1)-cochain → dual n-cochain 4. Apply the Hodge star operator: dual n-cochain → primal 0-cochain

∆ := (−1)n(k −1)+1 *d *d Putting it All Together

In Practice: To with DEC in practice, we only need to define two types of matrices: Putting it All Together

In Practice: To work with DEC in practice, we only need to define two types of matrices: 1. The boundary operators ∂: Specify the faces and orientations of each simplex/cell in the primal/dual complex. v 3  1 0 0   e3 e t2 2 0 1 0 −1 0 0 0 1 0 0 v4   e6 0 0 1  1 −1 0 0 0 −1 0 v2   t   1 ∂ 2 = 0 0 1 ∂1 = 0 1 −1 0 0 0 −1 e     e4 5 e1 − 1 0 0  0 0 1 1 0 0 0 t0     1 −1 0  0 0 0 1 −1 1 1 e   0 v1 v0 0 1 −1 Putting it All Together

In Practice: To work with DEC in practice, we only need to define two types of matrices: 1. The boundary operators ∂: Specify the faces and orientations of each simplex/cell in the primal/dual complex. v 3  1 0 0   e3 e t2 2 0 1 0 −1 0 0 0 1 0 0 v4   e6 0 0 1  1 −1 0 0 0 −1 0 v2   t   1 ∂ 2 = 0 0 1 ∂1 = 0 1 −1 0 0 0 −1 e     e4 5 e1 − 1 0 0  0 0 1 1 0 0 0 t0     1 −1 0  0 0 0 1 −1 1 1 e   0 v1 Thev0 exterior derivative0 is 1just−1 the . Putting it All Together

In Practice: To work with DEC in practice, we only need to define two types of matrices: 2. The discrete Hodge Star operators: Specify the ratio of between volumes of dual (n- k)-simplices and volumes of primal k-simplices. v3 e 3 *v3 e2 t2 *e3 v4 *e2 e6 v2 *e*t2 *v4 6 t e 1 *t1 *e 5 e *e5 1 e4 1 *e4 t *t0 *v1 0 *e v1 *v0 0 e0 v0 Putting it All Together

In Practice: To work with DEC in practice, we only need to define two types of matrices: 2. The discrete Hodge Star operators: Specify the ratio of between volumes of dual (n- k)-simplices and volumes of primal k-simplices. v3 e 3 *v3 e2 t2 *e3 v4 *e2 e6 v2 *e*t2 *v4 6 t This is just a diagonale 1 matrix whose *entriest1 *e are the 5 e *e5 1 e4 1 *e4 t *t0 *v1 ratios of the volumes0 of the dual (n*e-k)-cells and the v1 *v0 0 e0 volumes ofv0 the corresponding primal k-simplices. Putting it All Together

Example (2D Laplacian): Starting with a 0-cochain (function) ω, we evaluate the cochain to get a value ωi at each vertex.

v ω3 3 ω2 v2

ω0

ω4 v 0 v v4 1 ω1

ω5 v5 Putting it All Together

Example (2D Laplacian): Applying the exterior derivative, we get a 1- cochain that evaluates to:

λi = ωi −ω0 on primal edges from v0 to vi.

v ω3 3 ω2 v2 λ3 λ2 ω0

ω4 v0 λ4 λ v v4 1 1 ω1

λ5

ω5 v5 Putting it All Together

Example (2D Laplacian): Applying the Hodge Star, we get a 1-cochain that evaluates to µi on corresponding dual edges: * µi = λi (li li ) where li is the length of the primal edge from v0 * v to vi, and li is the length of its dual. 3 v2 λ3 µ3 λ2 µ2 µ4 v0 λ4 v λ1 v1 4 µ1 µ5

λ5

v5 Putting it All Together

Example (2D Laplacian): Applying the exterior derivative again, we get a 2-cochain that evaluates to L on the 2-cell dual to v0: L = ∑ µi i v 3 v2

µ3 µ2 µ4 L v 0 v v4 µ1 1 µ5

v5 Putting it All Together

Example (2D Laplacian): Finally, applying the Hodge Star again, we get a

0-chain whose value at vertex v0 is the Laplacian:

(∆ω)(v0 ) = L A where A is the area of the 2-cell dual to v0. v 3 v2

∆ω L v 0 v v4 1

v5 Putting it All Together

Example (2D Laplacian):

* µi = λi (li li )

If we denote by αi and βi the two angles adjacent to the primal edge from v0 to vi…

v 3 v2 α3 β β2 3 α2

α4 v 0 β1 v v1 4 β4 α1

α5 β5 v5 Putting it All Together

Example (2D Laplacian):

* µi = λi (li li )

If we denote by αi and βi the two angles adjacent to the primal edge from v0 to vi, the angles between the edges from v0 to the

v3 v dual vertices and the dual edges 2 α3 β β3 2 β3 α3 α2 α themselves become α and β . 4 β i i β3 1 α2 α4 v 0 β1 v β α v1 4 4 5 β5 α1 β4 α1

α5 β5 v5 Putting it All Together

Example (2D Laplacian):

* µi = λi (li li )

Thus, for the edge from v0 to vi, we have: * li = 2sin βi−1 = 2sinαi+1 li = cos βi−1 + cosαi+1

v 3 v2 α3 β β3 2 β3 α3 α2 α 4 β β3 1 α2 α4 v 0 β1 v β α v1 4 4 5 β5 α1 β4 α1

α5 β5 v5 Putting it All Together

Example (2D Laplacian):

* µi = λi (li li )

Thus, for the edge from v0 to vi, we have: * li = 2sin βi−1 = 2sinαi+1 li = cos βi−1 + cosαi+1 and the ratio of dual to primal edge-lengths is: *   v li 1 cos βi−1 cosαi+1 1 3 v2 =  +  = ( β + α ) α3 cot i−1 cot i+1 β β2   3 β α α2 li 2  sin βi−1 sinαi+1  2 3 3 α 4 β β3 1 α2 α4 v 0 β1 v β α v1 4 4 5 β5 α1 β4 α1

α5 β5 v5 Thanks Barry.