hessian_energy.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2017 Alec Jacobson <alecjacobson@gmail.com> and Oded Stein <oded.stein@columbia.edu>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_HESSIAN_ENERGY_H
  9. #define IGL_HESSIAN_ENERGY_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <Eigen/Sparse>
  13. namespace igl
  14. {
  15. // Constructs the Hessian energy matrix using mixed FEM
  16. // as described in https://arxiv.org/abs/1707.04348
  17. //
  18. // Inputs:
  19. // V #V by dim list of mesh vertex positions
  20. // F #F by 3 list of mesh faces (must be triangles)
  21. // Outputs:
  22. // Q #V by #V Hessian energy matrix, each row/column i corresponding to V(i,:)
  23. //
  24. //
  25. //
  26. template <typename DerivedV, typename DerivedF, typename Scalar>
  27. IGL_INLINE void hessian_energy(
  28. const Eigen::PlainObjectBase<DerivedV> & V,
  29. const Eigen::PlainObjectBase<DerivedF> & F,
  30. Eigen::SparseMatrix<Scalar>& Q);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "hessian_energy.cpp"
  34. #endif
  35. #endif