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-form.
 
Eigen::SparseMatrix< Scalarstar1 () const
 Compute the discrete Hodge star operator for 1-form.
 
Eigen::SparseMatrix< Scalarstar2 () const
 Compute the discrete Hodge star operator for 2-form.
 
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
 Compute the discrete Levi-Civita connection for n-rosy fields.
 
Eigen::SparseMatrix< Scalarcovariant_derivative () const
 Compute the discrete covariant derivative operator.
 
Eigen::SparseMatrix< Scalarcovariant_derivative_nrosy (Index n) const
 Compute the discrete covariant derivative operator for n-rosy fields.
 
Eigen::SparseMatrix< Scalarconnection_laplacian (Scalar lambda=1) const
 Compute the connection Laplacian operator.
 
Eigen::SparseMatrix< Scalarconnection_laplacian_nrosy (Index n, Scalar lambda=1) const
 Compute the connection Laplacian operator for n-rosy fields.
 
Eigen::Matrix< Scalar, 3, Eigen::Dynamic > gradient (Index fid) const
 Compute the gradient for a single facet.
 
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
 Compute the discrete Levi-Civita connection that parallel transport a tangent vector from a vertex to an incident facet for n-rosy fields.
 
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
 Compute the discrete Levi-Civita connection for a single facet for n-rosy fields.
 
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
 Compute the discrete covariant derivative operator for a single facet for n-rosy fields.
 
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
 Compute the discrete covariant projection operator for a single facet for n-rosy fields.
 
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
 Compute the discrete connection Laplacian operator for a single facet for n-rosy fields.
 
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-form.

The Hodge star operator maps a k-form to a dual (n-k)-form, where n is the dimension of the manifold. The discrete Hodge star operator for 0-form is a matrix of size V by V.

Returns
A sparse matrix representing the discrete Hodge star operator for 0-forms.

◆ star1()

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

Compute the discrete Hodge star operator for 1-form.

The Hodge star operator maps a k-form to a dual (n-k)-form, where n is the dimension of the manifold. The discrete Hodge star operator for 1-form is a matrix of size E by E.

Returns
A sparse matrix representing the discrete Hodge star operator for 1-forms.

◆ star2()

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

Compute the discrete Hodge star operator for 2-form.

The Hodge star operator maps a k-form to a dual (n-k)-form, where n is the dimension of the manifold. The discrete Hodge star operator for 2-form is a matrix of size F by F.

Returns
A sparse matrix representing the discrete Hodge star operator for 2-forms.

◆ 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

Compute the discrete Levi-Civita connection for n-rosy fields.

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.
Parameters
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A sparse matrix representing the discrete Levi-Civita connection.

◆ covariant_derivative() [1/2]

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

Compute the discrete covariant derivative operator.

The covariance 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 discrete covariance derivative operator is represented as a matrix of size F * 4 by V * 2. The output covariant derivative is a flattened 2 by 2 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

Compute the discrete covariant derivative operator for n-rosy fields.

The covariance 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 discrete covariance derivative operator is represented as a matrix of size F * 4 by V * 2. The output covariant derivative is a flattened 2 by 2 matrix defined on each facet.

Parameters
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A sparse matrix representing the discrete covariant derivative operator.

◆ 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

Compute the connection Laplacian operator for n-rosy fields.

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]nNumber of times to apply the connection.
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A sparse matrix representing the discrete connection Laplacian operator.

◆ gradient() [2/2]

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

Compute the gradient for a single facet.

The gradient for a single facet is a 3 by nf vector, where nf is the number vertices in the facet. It represents the gradient of a linear function defined on the facet.

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

◆ 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.

The discrete flat operator for a single fact is a nf by 3 matrix, where nf is the number of vertices of the facet. It maps a vector field defined on the facet to a 1-form defined on the edges of the facet.

Parameters
[in]fidFacet index.
Returns
A 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.

The discrete sharp operator for a single fact is a 3 by nf matrix, where nf is the number of vertices of the facet. It maps a 1-form defined on the edges of the facet to a vector field defined on the facet.

Parameters
[in]fidFacet index.
Returns
A 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.

The discrete projection operator for a single fact is a nf by nf matrix, where nf is the number of vertices of the facet. It measures the information loss when extracting the part of the 1-form associated with a vector field.

Parameters
[in]fidFacet index.
Returns
A 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

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

Parameters
[in]fidFacet index.
[in]lvLocal vertex index in the facet.
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A 2 by 2 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

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

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.
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A 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

Compute the discrete covariant derivative operator for a single facet for n-rosy fields.

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.
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A matrix representing the discrete covariant derivative operator.

◆ 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.

The discrete covariant projection operator for a single fact is a 2*nf by 2*nf matrix, where nf is the number vertices in facet. It measures the information loss when extracting the part of a tangent vector field associated with a covariant derivative.

Parameters
[in]fidFacet index.
Returns
A matrix representing the discrete 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

Compute the discrete covariant projection operator for a single facet for n-rosy fields.

The discrete covariant projection operator for a single fact is a 2*nf by 2*nf matrix, where nf is the number vertices in facet. It measures the information loss when extracting the part of a tangent vector field associated with a covariant derivative.

Parameters
[in]fidFacet index.
[in]nNumber of times to apply the connection.
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A matrix representing the discrete 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

Compute the discrete connection Laplacian operator for a single facet for n-rosy fields.

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]nNumber of times to apply the connection.
[in]lambdaWeight of projection term for the 1-form inner product (default: 1).
Note
The parameter n is designed to work with n-rosy field, where a representative tangent vector is the n-time rotation of any of the n vectors in a n-rosy field.
Returns
A matrix representing the discrete 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: