Euclid
Geometry Processing and Shape Analysis in C++
Discrete Exterior Calculus

Discrete exterior calculus. More...

Functions

template<typename Mesh >
int Euclid::halfedge_orientation (const Mesh &mesh, halfedge_t< Mesh > h)
 Give a consistent orientation for halfedges. More...
 
template<typename Mesh , typename T >
void Euclid::d0 (const Mesh &mesh, Eigen::SparseMatrix< T > &op)
 Exterior derivative operator of 0-form. More...
 
template<typename Mesh , typename T >
void Euclid::d1 (const Mesh &mesh, Eigen::SparseMatrix< T > &op)
 Exterior derivative operator of 1-form. More...
 
template<typename Mesh , typename T >
void Euclid::star1 (const Mesh &mesh, Eigen::SparseMatrix< T > &op)
 Hodge star operator of 1-form. More...
 
template<typename Mesh , typename DerivedA , typename DerivedB , typename DerivedC >
void Euclid::wedge1 (const Mesh &mesh, const Eigen::MatrixBase< DerivedA > &w1, const Eigen::MatrixBase< DerivedB > &w2, Eigen::MatrixBase< DerivedC > &result)
 The primal x primal wedge product. More...
 
template<typename Mesh , typename DerivedA , typename DerivedB , typename DerivedC >
void Euclid::star_wedge1 (const Mesh &mesh, const Eigen::MatrixBase< DerivedA > &w1, const Eigen::MatrixBase< DerivedB > &w2, Eigen::MatrixBase< DerivedC > &result)
 The primal x dual wedge product. More...
 

Detailed Description

This package provides common DEC operators.

Reference

[1] Elcott, S., Schroder, P. Building Your Own DEC at Home.

[2] Gu, X., Yau, S.T. Global Conformal Surface Parameterization.

Function Documentation

template<typename Mesh , typename T >
void Euclid::d0 ( const Mesh &  mesh,
Eigen::SparseMatrix< T > &  op 
)

Exterior derivative for 0-form f is \(D0 * f\).

Parameters
meshTarget triangle mesh.
opAn E x V matrix acting as the exterior derivative operator.
template<typename Mesh , typename T >
void Euclid::d1 ( const Mesh &  mesh,
Eigen::SparseMatrix< T > &  op 
)

Exterior derivative for 1-form w is \(D1 * w\).

Parameters
meshTarget triangle mesh.
opAn F x E matrix acting as the exterior derivative operator.
template<typename Mesh >
int Euclid::halfedge_orientation ( const Mesh &  mesh,
halfedge_t< Mesh >  h 
)
Parameters
meshTarget triangle mesh.
hTarget halfedge.
template<typename Mesh , typename T >
void Euclid::star1 ( const Mesh &  mesh,
Eigen::SparseMatrix< T > &  op 
)

Equivalent to the cotangent matrix.

Parameters
meshTarget triangle mesh.
opAn E x E matrix acting as the hodge star operator.
template<typename Mesh , typename DerivedA , typename DerivedB , typename DerivedC >
void Euclid::star_wedge1 ( const Mesh &  mesh,
const Eigen::MatrixBase< DerivedA > &  w1,
const Eigen::MatrixBase< DerivedB > &  w2,
Eigen::MatrixBase< DerivedC > &  result 
)

The wedge product is not linear so it cannot be represented as a matrix. Instead, we take the 1-forms as input and return the result.

Parameters
meshTarget triangle mesh.
w11-form.
w21-form.
resultAn F x 1 matrix storing the result of wedge product.
template<typename Mesh , typename DerivedA , typename DerivedB , typename DerivedC >
void Euclid::wedge1 ( const Mesh &  mesh,
const Eigen::MatrixBase< DerivedA > &  w1,
const Eigen::MatrixBase< DerivedB > &  w2,
Eigen::MatrixBase< DerivedC > &  result 
)

The wedge product is not linear so it cannot be represented as a matrix. Instead, we take the 1-forms as input and return the result.

Parameters
meshTarget triangle mesh.
w11-form.
w21-form.
resultAn F x 1 matrix storing the result of wedge product.