Skip to content

Commit a6cc016

Browse files
committed
Update documentation for Hessian bindings
1 parent 80c7653 commit a6cc016

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

src/curved_hessian_energy.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace pyigl
1515
const nb::DRef<const Eigen::MatrixXN> &V,
1616
const nb::DRef<const Eigen::MatrixXI> &F)
1717
{
18-
Eigen::SparseMatrixN QH;
19-
igl::curved_hessian_energy(V,F,QH);
20-
return QH;
18+
Eigen::SparseMatrixN Q;
19+
igl::curved_hessian_energy(V,F,Q);
20+
return Q;
2121
}
2222

2323
}
@@ -30,16 +30,17 @@ void bind_curved_hessian_energy(nb::module_ &m)
3030
&pyigl::curved_hessian_energy,
3131
"V"_a,
3232
"F"_a,
33-
R"(Constructs the matrix for the curved Hessian energy for a given
34-
mesh (V,F).
33+
R"(Computes the curved Hessian energy using the Crouzeix-Raviart discretization.
34+
See Oded Stein, Alec Jacobson, Max Wardetzky, Eitan Grinspun, 2020.
35+
"A Smoothness Energy without Boundary Distortion for Curved Surfaces"
3536
3637
@tparam DerivedV derived type of eigen matrix for V (e.g. derived from
3738
MatrixXd)
3839
@tparam DerivedF derived type of eigen matrix for F (e.g. derived from
3940
MatrixXi)
4041
@tparam Scalar scalar type for eigen sparse matrix (e.g. double)
4142
@param[in] V #V by dim list of mesh vertex positions
42-
@param[in] F #F by simplex_size list of mesh elements (triangles or tetrahedra)
43-
@param[out] QH #V by #V curved Hessian energy matrix, each row i corresponding to V(i,:))");
43+
@param[in] F #F by 3 list of mesh elements (must be triangles)
44+
@param[out] Q #V by #V Hessian energy matrix, each row/column i corresponding to V(i,:)");
4445

4546
}

src/hessian.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ void bind_hessian(nb::module_ &m)
3030
&pyigl::hessian,
3131
"V"_a,
3232
"F"_a,
33-
R"(Constructs the Hessian matrix for a given
34-
mesh (V,F).
33+
R"(Constructs the finite element Hessian matrix
34+
as described in https://arxiv.org/abs/1707.04348,
35+
Natural Boundary Conditions for Smoothing in Geometry Processing
36+
(Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson)
37+
The interior vertices are NOT set to zero yet.
3538
3639
@tparam DerivedV derived type of eigen matrix for V (e.g. derived from
3740
MatrixXd)
3841
@tparam DerivedF derived type of eigen matrix for F (e.g. derived from
3942
MatrixXi)
4043
@tparam Scalar scalar type for eigen sparse matrix (e.g. double)
4144
@param[in] V #V by dim list of mesh vertex positions
42-
@param[in] F #F by simplex_size list of mesh elements (triangles or tetrahedra)
43-
@param[out] H #V by #V Hessian matrix, each row i corresponding to V(i,:))");
45+
@param[in] F #F by 3 list of mesh elements (must be triangles)
46+
@param[out] H dim²⋅#V by #V Hessian matrix, each column i corresponding to V(i,:)");
4447

4548
}

src/hessian_energy.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace pyigl
1515
const nb::DRef<const Eigen::MatrixXN> &V,
1616
const nb::DRef<const Eigen::MatrixXI> &F)
1717
{
18-
Eigen::SparseMatrixN QH;
19-
igl::hessian_energy(V,F,QH);
20-
return QH;
18+
Eigen::SparseMatrixN Q;
19+
igl::hessian_energy(V,F,Q);
20+
return Q;
2121
}
2222

2323
}
@@ -30,16 +30,18 @@ void bind_hessian_energy(nb::module_ &m)
3030
&pyigl::hessian_energy,
3131
"V"_a,
3232
"F"_a,
33-
R"(Constructs the matrix for the Hessian energy for a given
34-
mesh (V,F).
33+
R"(Constructs the Hessian energy matrix using mixed FEM
34+
as described in https://arxiv.org/abs/1707.04348
35+
Natural Boundary Conditions for Smoothing in Geometry Processing
36+
(Oded Stein, Eitan Grinspun, Max Wardetzky, Alec Jacobson)
3537
3638
@tparam DerivedV derived type of eigen matrix for V (e.g. derived from
3739
MatrixXd)
3840
@tparam DerivedF derived type of eigen matrix for F (e.g. derived from
3941
MatrixXi)
4042
@tparam Scalar scalar type for eigen sparse matrix (e.g. double)
4143
@param[in] V #V by dim list of mesh vertex positions
42-
@param[in] F #F by simplex_size list of mesh elements (triangles or tetrahedra)
43-
@param[out] QH #V by #V Hessian energy matrix, each row i corresponding to V(i,:))");
44+
@param[in] F #F by 3 list of mesh elements (must be triangles)
45+
@param[out] Q #V by #V Hessian energy matrix, each row/column i corresponding to V(i,:)");
4446

4547
}

0 commit comments

Comments
 (0)