Lagrange
Loading...
Searching...
No Matches
DifferentialOperators< Scalar, Index > Class Template Reference

Polygonal mesh discrete differential operators. More...

#include <lagrange/polyddg/DifferentialOperators.h>

Public Types

using Vector = Eigen::Matrix<Scalar, 1, 3>
 

Public Member Functions

 DifferentialOperators (SurfaceMesh< Scalar, Index > &mesh)
 Precomputes necessary attributes for the differential operators.
 
Eigen::SparseMatrix< Scalargradient () const
 Compute the discrete polygonal gradient operator.
 
Eigen::SparseMatrix< Scalard0 () const
 Compute the discrete d0 operator.
 
Eigen::SparseMatrix< Scalard1 () const
 Compute the discrete d1 operator.
 
Eigen::SparseMatrix< Scalarstar0 () const
 Compute the discrete Hodge star operator for 0-forms (diagonal mass matrix, size V x V).
 
Eigen::SparseMatrix< Scalarstar1 () const
 Compute the discrete Hodge star operator for 1-forms (diagonal mass matrix, size E x E).
 
Eigen::SparseMatrix< Scalarstar2 () const
 Compute the discrete Hodge star operator for 2-forms (diagonal mass matrix, size F x F).
 
Eigen::SparseMatrix< Scalarflat () const
 Compute the discrete flat operator.
 
Eigen::SparseMatrix< Scalarsharp () const
 Compute the discrete sharp operator.
 
Eigen::SparseMatrix< Scalarprojection () const
 Compute the projection operator.
 
Eigen::SparseMatrix< Scalarinner_product_0_form () const
 Compute the discrete inner product operator for 0-forms.
 
Eigen::SparseMatrix< Scalarinner_product_1_form (Scalar lambda=1) const
 Compute the discrete inner product operator for 1-forms.
 
Eigen::SparseMatrix< Scalarinner_product_2_form () const
 Compute the discrete inner product operator for 2-forms.
 
Eigen::SparseMatrix< Scalardivergence (Scalar lambda=1) const
 Compute the discrete divergence operator.
 
Eigen::SparseMatrix< Scalarcurl () const
 Compute the discrete curl operator.
 
Eigen::SparseMatrix< Scalarlaplacian (Scalar lambda=1) const
 Compute the discrete Laplacian operator.
 
Eigen::SparseMatrix< Scalarvertex_tangent_coordinates () const
 Compute the coordinate transformation that maps a per-vertex tangent vector field expressed in the global 3D coordinate to the local tangent basis at each vertex.
 
Eigen::SparseMatrix< Scalarfacet_tangent_coordinates () const
 Compute the coordinate transformation that maps a per-facet tangent vector field expressed in the global 3D coordinate to the local tangent basis at each facet.
 
Eigen::SparseMatrix< Scalarlevi_civita () const
 Compute the discrete Levi-Civita connection.
 
Eigen::SparseMatrix< Scalarlevi_civita_nrosy (Index n) const
 n-rosy variant of levi_civita().
 
Eigen::SparseMatrix< Scalarcovariant_derivative () const
 Compute the discrete covariant derivative operator.
 
Eigen::SparseMatrix< Scalarcovariant_derivative_nrosy (Index n) const
 n-rosy variant of covariant_derivative().
 
Eigen::SparseMatrix< Scalarshape_operator () const
 Compute the global discrete shape operator (Eq.
 
Eigen::SparseMatrix< Scalaradjoint_gradient () const
 Compute the global discrete adjoint gradient operator (Eq.
 
Eigen::SparseMatrix< Scalaradjoint_shape_operator () const
 Compute the global discrete adjoint shape operator (Eq.
 
Eigen::SparseMatrix< Scalarconnection_laplacian (Scalar lambda=1) const
 Compute the connection Laplacian operator.
 
Eigen::SparseMatrix< Scalarconnection_laplacian_nrosy (Index n, Scalar lambda=1) const
 n-rosy variant of connection_laplacian().
 
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > gradient (Index fid) const
 Compute the per-corner gradient vectors for a single facet (Eq.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > d0 (Index fid) const
 Compute the d0 operator for a single facet.
 
Eigen::Matrix< Scalar, 1, Eigen::Dynamic > d1 (Index fid) const
 Compute the d1 operator for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, 3 > flat (Index fid) const
 Compute the flat operator for a single facet.
 
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > sharp (Index fid) const
 Compute the sharp operator for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > projection (Index fid) const
 Compute the projection operator for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > inner_product_0_form (Index fid) const
 Compute the inner product operator for 0-forms for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > inner_product_1_form (Index fid, Scalar lambda=1) const
 Compute the inner product operator for 1-forms for a single facet.
 
Eigen::Matrix< Scalar, 1, 1 > inner_product_2_form (Index fid) const
 Compute the inner product operator for 2-forms for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > laplacian (Index fid, Scalar lambda=1) const
 Compute the Laplacian operator for a single facet.
 
Eigen::Matrix< Scalar, 2, 2 > levi_civita (Index fid, Index lv) const
 Compute the discrete Levi-Civita connection that parallel transport a tangent vector from a vertex to an incident facet.
 
Eigen::Matrix< Scalar, 2, 2 > levi_civita_nrosy (Index fid, Index lv, Index n) const
 n-rosy variant of levi_civita(fid, lv).
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > levi_civita (Index fid) const
 Compute the discrete Levi-Civita connection for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > levi_civita_nrosy (Index fid, Index n) const
 n-rosy variant of levi_civita(fid).
 
Eigen::Matrix< Scalar, 4, Eigen::Dynamic > covariant_derivative (Index fid) const
 Compute the discrete covariant derivative operator for a single facet.
 
Eigen::Matrix< Scalar, 4, Eigen::Dynamic > covariant_derivative_nrosy (Index fid, Index n) const
 n-rosy variant of covariant_derivative(fid).
 
Eigen::Matrix< Scalar, 2, 2 > shape_operator (Index fid) const
 Compute the discrete shape operator for a single facet (Eq.
 
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > adjoint_gradient (Index vid) const
 Compute the adjoint gradient operator for a single vertex (Eq.
 
Eigen::Matrix< Scalar, 2, 2 > adjoint_shape_operator (Index vid) const
 Compute the adjoint shape operator for a single vertex (Eq.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > covariant_projection (Index fid) const
 Compute the discrete covariant projection operator for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > covariant_projection_nrosy (Index fid, Index n) const
 n-rosy variant of covariant_projection(fid).
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > connection_laplacian (Index fid, Scalar lambda=1) const
 Compute the discrete connection Laplacian operator for a single facet.
 
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > connection_laplacian_nrosy (Index fid, Index n, Scalar lambda=1) const
 n-rosy variant of connection_laplacian(fid).
 
Eigen::Matrix< Scalar, 3, 2 > facet_basis (Index fid) const
 Compute the local tangent basis for a single facet.
 
Eigen::Matrix< Scalar, 3, 2 > vertex_basis (Index vid) const
 Compute the local tangent basis for a single vertex.
 
AttributeId get_vector_area_attribute_id () const
 Get the attribute ID for the per-facet vector area.
 
AttributeId get_centroid_attribute_id () const
 Get the attribute ID for the per-facet centroid.
 
AttributeId get_vertex_normal_attribute_id () const
 Get the attribute ID for the per-vertex normal.
 

Detailed Description

template<typename Scalar, typename Index>
class lagrange::polyddg::DifferentialOperators< Scalar, Index >

Polygonal mesh discrete differential operators.

This class implements various discrete differential operators on polygonal meshes based on the following paper:

De Goes, Fernando, Andrew Butts, and Mathieu Desbrun. "Discrete differential operators on polygonal meshes." ACM Transactions on Graphics (TOG) 39.4 (2020): 110-1.

Template Parameters
ScalarScalar type.
IndexIndex type.

Constructor & Destructor Documentation

◆ DifferentialOperators()

template<typename Scalar, typename Index>
DifferentialOperators ( SurfaceMesh< Scalar, Index > & mesh)

Precomputes necessary attributes for the differential operators.

Parameters
[in]meshInput surface mesh (must be 3D).

Member Function Documentation

◆ gradient() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > gradient ( ) const

Compute the discrete polygonal gradient operator.

The discrete gradient operator is of size F * 3 by V. It maps a discrete scalar function defined on the vertices to its gradient vector field defined on the facets.

Returns
A sparse matrix representing the gradient operator.

◆ d0() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > d0 ( ) const

Compute the discrete d0 operator.

The d0 operator computes the exterior derivative of a 0-form and outputs a 1-form. The discrete d0 operator is a matrix of size E by V.

Returns
A sparse matrix representing the discrete d0 operator.

◆ d1() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > d1 ( ) const

Compute the discrete d1 operator.

The d1 operator computes the exterior derivative of a 1-form and outputs a 2-form. The discrete d1 operator is a matrix of size F by E.

Returns
A sparse matrix representing the discrete d1 operator.

◆ star0()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > star0 ( ) const

Compute the discrete Hodge star operator for 0-forms (diagonal mass matrix, size V x V).

Returns
A diagonal sparse matrix of size V x V.

◆ star1()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > star1 ( ) const

Compute the discrete Hodge star operator for 1-forms (diagonal mass matrix, size E x E).

Returns
A diagonal sparse matrix of size E x E.

◆ star2()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > star2 ( ) const

Compute the discrete Hodge star operator for 2-forms (diagonal mass matrix, size F x F).

Returns
A diagonal sparse matrix of size F x F.

◆ flat() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > flat ( ) const

Compute the discrete flat operator.

The flat operator maps a vector field to a 1-form. The discrete flat operator is a matrix of size E by F*3. It maps a vector field defined on the facets to a 1-form defined on the edges. Note that for non-boundary edges, the contribution from its incident facets are averaged.

Returns
A sparse matrix representing the discrete flat operator.

◆ sharp() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > sharp ( ) const

Compute the discrete sharp operator.

The sharp operator maps a 1-form to a vector field. The discrete sharp operator is a matrix of size F*3 by E.

Returns
A sparse matrix representing the discrete sharp operator.

◆ projection() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > projection ( ) const

Compute the projection operator.

The projection operator measures the information loss when extracting the part of the 1-form associated with a vector field. It is a matrix of size E by E.

Returns
A sparse matrix representing the projection operator.

◆ inner_product_0_form() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > inner_product_0_form ( ) const

Compute the discrete inner product operator for 0-forms.

The inner product operator computes the inner product of two 0-forms. The discrete inner product operator for 0-form is a matrix of size V by V.

Returns
A sparse matrix representing the discrete inner product operator.

◆ inner_product_1_form() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > inner_product_1_form ( Scalar lambda = 1) const

Compute the discrete inner product operator for 1-forms.

The inner product operator computes the inner product of two 1-forms. The discrete inner product operator for 1-form is a matrix of size E by E.

Parameters
[in]lambdaWeight of projection term (default: 1).
Returns
A sparse matrix representing the discrete inner product operator.

◆ inner_product_2_form() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > inner_product_2_form ( ) const

Compute the discrete inner product operator for 2-forms.

The inner product operator computes the inner product of two 2-forms. The discrete inner product operator for 2-form is a matrix of size F by F.

Returns
A sparse matrix representing the discrete inner product operator.

◆ divergence()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > divergence ( Scalar lambda = 1) const

Compute the discrete divergence operator.

The divergence operator computes the divergence of a 1-form (i.e. vector field). The discrete divergence operator is a matrix of size V by E.

Parameters
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A sparse matrix representing the discrete divergence operator.

◆ curl()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > curl ( ) const

Compute the discrete curl operator.

The curl operator computes the curl of a 1-form (i.e. vector field). The discrete curl operator is a matrix of size F by E.

Returns
A sparse matrix representing the discrete curl operator.

◆ laplacian() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > laplacian ( Scalar lambda = 1) const

Compute the discrete Laplacian operator.

The Laplacian operator computes the Laplacian of a 0-form (i.e. scalar field). The discrete Laplacian operator is a matrix of size V by V.

Parameters
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A sparse matrix representing the discrete Laplacian operator.

◆ vertex_tangent_coordinates()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > vertex_tangent_coordinates ( ) const

Compute the coordinate transformation that maps a per-vertex tangent vector field expressed in the global 3D coordinate to the local tangent basis at each vertex.

The transformation matrix is of size V * 2 by V * 3.

Returns
A matrix representing the coordinate transformation.

◆ facet_tangent_coordinates()

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > facet_tangent_coordinates ( ) const

Compute the coordinate transformation that maps a per-facet tangent vector field expressed in the global 3D coordinate to the local tangent basis at each facet.

The transformation matrix is of size F * 2 by F * 3.

Returns
A matrix representing the coordinate transformation.

◆ levi_civita() [1/3]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > levi_civita ( ) const

Compute the discrete Levi-Civita connection.

The discrete Levi-Civita connection parallel transports tangent vectors defined on vertices to tangent vectors defined on corners. It is represented as a matrix of size C * 2 by V *

  1. All tangent vectors are expressed in its local tangent basis.
Returns
A sparse matrix representing the discrete Levi-Civita connection.

◆ levi_civita_nrosy() [1/3]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > levi_civita_nrosy ( Index n) const

n-rosy variant of levi_civita().

Parameters
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A sparse matrix of size (C * 2) x (V * 2).

◆ covariant_derivative() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > covariant_derivative ( ) const

Compute the discrete covariant derivative operator.

The covariant derivative operator measures the change of a tangent vector field with respect to another tangent vector field using the Levi-Civita connection. In the discrete setting, both vector fields are defined on the vertices. The output covariant derivative is a flattened 2x2 matrix defined on each facet.

Returns
A sparse matrix representing the discrete covariant derivative operator.

◆ covariant_derivative_nrosy() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > covariant_derivative_nrosy ( Index n) const

n-rosy variant of covariant_derivative().

Parameters
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A sparse matrix of size (F * 4) x (V * 2).

◆ shape_operator() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > shape_operator ( ) const

Compute the global discrete shape operator (Eq.

(23), de Goes et al. 2020).

Applies the per-facet shape operator to the precomputed per-vertex normals and assembles the result into a sparse linear map. It maps a per-vertex 3-D normal field (V * 3 values, three interleaved components per vertex) to per-facet 2x2 symmetrized shape operators (F * 4 values, row-major per facet: [S(0,0), S(0,1), S(1,0), S(1,1)]).

Returns
A sparse matrix of size (F * 4) x (V * 3).

◆ adjoint_gradient() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > adjoint_gradient ( ) const

Compute the global discrete adjoint gradient operator (Eq.

(24), de Goes et al. 2020).

The adjoint gradient is the vertex-centered dual of the per-facet gradient. It maps a per-facet scalar field (F values) to a per-vertex 3-D tangent vector field. The returned sparse matrix has shape (V * 3) x F, with three interleaved components per vertex row.

Returns
A sparse matrix of size (V * 3) x F.

◆ adjoint_shape_operator() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > adjoint_shape_operator ( ) const

Compute the global discrete adjoint shape operator (Eq.

(26), de Goes et al. 2020).

The adjoint shape operator is the vertex-centered dual of the per-facet shape operator. It maps a per-facet 3-D normal field (F * 3 values, three interleaved components per facet) to per-vertex 2x2 symmetrized shape operators (V * 4 values, row-major per vertex: [S(0,0), S(0,1), S(1,0), S(1,1)]).

Returns
A sparse matrix of size (V * 4) x (F * 3).

◆ connection_laplacian() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > connection_laplacian ( Scalar lambda = 1) const

Compute the connection Laplacian operator.

The connection Laplacian operator computes the Laplacian of a tangent vector field defined on the vertices using Levi-Civita connection for parallel transport. It is represented as a matrix of size V * 2 by V * 2.

Parameters
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A sparse matrix representing the discrete connection Laplacian operator.

◆ connection_laplacian_nrosy() [1/2]

template<typename Scalar, typename Index>
Eigen::SparseMatrix< Scalar > connection_laplacian_nrosy ( Index n,
Scalar lambda = 1 ) const

n-rosy variant of connection_laplacian().

Parameters
[in]nSymmetry order of the rosy field (applies the connection n times).
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A sparse matrix of size (V * 2) x (V * 2).

◆ gradient() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > gradient ( Index fid) const

Compute the per-corner gradient vectors for a single facet (Eq.

(8), de Goes et al. 2020).

Returns a 3 x nf matrix whose column l is (a_f x e_f^l) / (2 * |a_f|^2), where a_f is the facet vector area and e_f^l = x_{l-1} - x_{l+1} spans the opposite edge.

Parameters
[in]fidFacet index.
Returns
A 3 x nf matrix of per-corner gradient vectors.

◆ d0() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > d0 ( Index fid) const

Compute the d0 operator for a single facet.

The discrete d0 operator for a single facet is a nf by nf matrix, where nf is the number of vertices in the facet. It computes the exterior derivative of a 0-form (vertex values) to a 1-form (edge values) restricted to the edges of the facet.

Parameters
[in]fidFacet index.
Returns
A matrix representing the d0 operator for the given facet.

◆ d1() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 1, Eigen::Dynamic > d1 ( Index fid) const

Compute the d1 operator for a single facet.

The discrete d1 operator for a single facet is a row vector of size 1 by n, where n is the number of edges in the facet. It computes the exterior derivative of a 1-form (edge values) to a 2-form (facet value).

Parameters
[in]fidFacet index.
Returns
A row vector representing the d1 operator for the given facet.

◆ flat() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, 3 > flat ( Index fid) const

Compute the flat operator for a single facet.

Maps a vector field defined on the facet to a 1-form on its edges. The matrix has size nf x 3, where nf is the number of vertices of the facet.

Parameters
[in]fidFacet index.
Returns
An nf x 3 matrix representing the flat operator for the given facet.

◆ sharp() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > sharp ( Index fid) const

Compute the sharp operator for a single facet.

Maps a 1-form on the edges of the facet to a vector field on the facet. The matrix has size 3 x nf, where nf is the number of vertices of the facet.

Parameters
[in]fidFacet index.
Returns
A 3 x nf matrix representing the sharp operator for the given facet.

◆ projection() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > projection ( Index fid) const

Compute the projection operator for a single facet.

Measures the information loss when extracting the part of a 1-form associated with a vector field. The matrix has size nf x nf, where nf is the number of vertices.

Parameters
[in]fidFacet index.
Returns
An nf x nf matrix representing the projection operator for the given facet.

◆ inner_product_0_form() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > inner_product_0_form ( Index fid) const

Compute the inner product operator for 0-forms for a single facet.

The discrete inner product operator for 0-forms for a single facet is a nf by nf matrix, where nf is the number of vertices of the facet. It computes the inner product of two 0-forms restricted to the vertices of the facet.

Parameters
[in]fidFacet index.
Returns
A matrix representing the inner product operator for 0-forms for the given facet.

◆ inner_product_1_form() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > inner_product_1_form ( Index fid,
Scalar lambda = 1 ) const

Compute the inner product operator for 1-forms for a single facet.

The discrete inner product operator for 1-forms for a single facet is a nf by nf matrix, where nf is the number of vertices of the facet. It computes the inner product of two 1-forms restricted to the edges of the facet.

Parameters
[in]fidFacet index.
[in]lambdaWeight of projection term (default: 1).
Returns
A matrix representing the inner product operator for 1-forms for the given facet.

◆ inner_product_2_form() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 1, 1 > inner_product_2_form ( Index fid) const

Compute the inner product operator for 2-forms for a single facet.

The discrete inner product operator for 2-forms for a single facet is a matrix (1 by 1). It computes the inner product of two 2-forms restricted to the facet.

Parameters
[in]fidFacet index.
Returns
A matrix representing the inner product operator for 2-forms for the given facet.

◆ laplacian() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > laplacian ( Index fid,
Scalar lambda = 1 ) const

Compute the Laplacian operator for a single facet.

The discrete Laplacian operator for a single facet is a nf by nf matrix, where nf is the number of vertices of the facet. It computes the Laplacian of a 0-form (scalar field) restricted to the facet.

Parameters
[in]fidFacet index.
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A matrix representing the Laplacian operator for the given facet.

◆ levi_civita() [2/3]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 2, 2 > levi_civita ( Index fid,
Index lv ) const

Compute the discrete Levi-Civita connection that parallel transport a tangent vector from a vertex to an incident facet.

Parameters
[in]fidFacet index.
[in]lvLocal vertex index in the facet.
Returns
A 2 by 2 matrix representing the Levi-Civita connection.

◆ levi_civita_nrosy() [2/3]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 2, 2 > levi_civita_nrosy ( Index fid,
Index lv,
Index n ) const

n-rosy variant of levi_civita(fid, lv).

Parameters
[in]fidFacet index.
[in]lvLocal vertex index in the facet.
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A 2x2 matrix representing the Levi-Civita connection.

◆ levi_civita() [3/3]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > levi_civita ( Index fid) const

Compute the discrete Levi-Civita connection for a single facet.

The per-facet Levi-Civita connection is a 2*nf by 2*nf block diagonal matrix that parallel transports tangent vectors from the vertex tangent space to the tangent space of the facet. Here nf is the number of vertices in the facet.

Parameters
[in]fidFacet index.
Returns
A matrix representing the Levi-Civita connection.

◆ levi_civita_nrosy() [3/3]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > levi_civita_nrosy ( Index fid,
Index n ) const

n-rosy variant of levi_civita(fid).

Parameters
[in]fidFacet index.
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A (2*nf) x (2*nf) block-diagonal matrix representing the Levi-Civita connection.

◆ covariant_derivative() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 4, Eigen::Dynamic > covariant_derivative ( Index fid) const

Compute the discrete covariant derivative operator for a single facet.

The discrete covariant derivative operator is a 4 by 2 * nf matrix that maps a tangent vector defined on a vertex to a flattened 2 by 2 covariant derivative matrix defined on the facet. Here nf is the number of vertices in the facet.

Parameters
[in]fidFacet index.
Returns
A matrix representing the discrete covariant derivative operator.

◆ covariant_derivative_nrosy() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 4, Eigen::Dynamic > covariant_derivative_nrosy ( Index fid,
Index n ) const

n-rosy variant of covariant_derivative(fid).

Parameters
[in]fidFacet index.
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A 4 x (2*nf) matrix representing the covariant derivative operator.

◆ shape_operator() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 2, 2 > shape_operator ( Index fid) const

Compute the discrete shape operator for a single facet (Eq.

(23), de Goes et al. 2020).

Applies the per-facet gradient to the precomputed per-vertex normals and symmetrizes the result in the facet tangent plane. The returned 2x2 matrix is symmetric; its trace divided by two gives the mean curvature at the facet, and its determinant gives the Gaussian curvature.

Parameters
[in]fidFacet index.
Returns
A 2x2 symmetric matrix representing the shape operator for the given facet.

◆ adjoint_gradient() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > adjoint_gradient ( Index vid) const

Compute the adjoint gradient operator for a single vertex (Eq.

(24), de Goes et al. 2020).

Returns a 3 x k dense matrix whose columns are the area-weighted, parallel-transported per-corner gradient vectors for vertex vid, where k is the number of incident faces. Columns are in the order of the incident-face traversal via get_first_corner_around_vertex(), consistent with adjoint_shape_operator().

Note
There is a sign correction for Eq. (24) in the implementation.
Parameters
[in]vidVertex index.
Returns
A 3 x k dense matrix (k = number of incident faces).

◆ adjoint_shape_operator() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 2, 2 > adjoint_shape_operator ( Index vid) const

Compute the adjoint shape operator for a single vertex (Eq.

(26), de Goes et al. 2020).

The adjoint shape operator is the vertex-centered dual of the per-facet shape operator. It applies the adjoint gradient to the unit normals of the incident faces and symmetrizes the result in the vertex tangent plane. The returned 2x2 matrix is symmetric; its trace divided by two gives the mean curvature at the vertex, and its determinant gives the Gaussian curvature.

Parameters
[in]vidVertex index.
Returns
A 2x2 symmetric matrix representing the adjoint shape operator at the vertex.

◆ covariant_projection()

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > covariant_projection ( Index fid) const

Compute the discrete covariant projection operator for a single facet.

Measures the information loss when extracting the part of a tangent vector field associated with a covariant derivative. The matrix has size (2*nf) x (2*nf), where nf is the number of vertices in the facet.

Parameters
[in]fidFacet index.
Returns
A (2*nf) x (2*nf) matrix representing the covariant projection operator.

◆ covariant_projection_nrosy()

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > covariant_projection_nrosy ( Index fid,
Index n ) const

n-rosy variant of covariant_projection(fid).

Parameters
[in]fidFacet index.
[in]nSymmetry order of the rosy field (applies the connection n times).
Returns
A (2*nf) x (2*nf) matrix representing the covariant projection operator.

◆ connection_laplacian() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > connection_laplacian ( Index fid,
Scalar lambda = 1 ) const

Compute the discrete connection Laplacian operator for a single facet.

The discrete connection Laplacian operator for a single facet is a 2*nf by 2*nf matrix, where nf is the number vertices in facet. It computes the Laplacian of a tangent vector field defined on the vertices of the facet using Levi-Civita connection for parallel transport.

Parameters
[in]fidFacet index.
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A matrix representing the discrete connection Laplacian operator.

◆ connection_laplacian_nrosy() [2/2]

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > connection_laplacian_nrosy ( Index fid,
Index n,
Scalar lambda = 1 ) const

n-rosy variant of connection_laplacian(fid).

Parameters
[in]fidFacet index.
[in]nSymmetry order of the rosy field (applies the connection n times).
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Returns
A (2*nf) x (2*nf) matrix representing the connection Laplacian operator.

◆ facet_basis()

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 3, 2 > facet_basis ( Index fid) const

Compute the local tangent basis for a single facet.

Parameters
[in]fidFacet index.
Returns
A 3 by 2 matrix representing the tangent basis for the given facet.

◆ vertex_basis()

template<typename Scalar, typename Index>
Eigen::Matrix< Scalar, 3, 2 > vertex_basis ( Index vid) const

Compute the local tangent basis for a single vertex.

Parameters
[in]vidVertex index.
Returns
A 3 by 2 matrix representing the tangent basis for the given vertex.

◆ get_vector_area_attribute_id()

template<typename Scalar, typename Index>
AttributeId get_vector_area_attribute_id ( ) const
inline

Get the attribute ID for the per-facet vector area.

Returns
Attribute ID of vector area attribute.

◆ get_centroid_attribute_id()

template<typename Scalar, typename Index>
AttributeId get_centroid_attribute_id ( ) const
inline

Get the attribute ID for the per-facet centroid.

Returns
Attribute ID of centroid attribute.

◆ get_vertex_normal_attribute_id()

template<typename Scalar, typename Index>
AttributeId get_vertex_normal_attribute_id ( ) const
inline

Get the attribute ID for the per-vertex normal.

Returns
Attribute ID of vertex normal attribute.

The documentation for this class was generated from the following files: