harmonic.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
  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_HARMONIC_H
  9. #define IGL_HARMONIC_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. namespace igl
  13. {
  14. // Compute k-harmonic weight functions "coordinates".
  15. //
  16. //
  17. // Inputs:
  18. // V #V by dim vertex positions
  19. // F #F by simplex-size list of element indices
  20. // b #b boundary indices into V
  21. // bc #b by #W list of boundary values
  22. // k power of harmonic operation (1: harmonic, 2: biharmonic, etc)
  23. // Outputs:
  24. // W #V by #W list of weights
  25. //
  26. template <
  27. typename DerivedV,
  28. typename DerivedF,
  29. typename Derivedb,
  30. typename Derivedbc,
  31. typename DerivedW>
  32. IGL_INLINE bool harmonic(
  33. const Eigen::PlainObjectBase<DerivedV> & V,
  34. const Eigen::PlainObjectBase<DerivedF> & F,
  35. const Eigen::PlainObjectBase<Derivedb> & b,
  36. const Eigen::PlainObjectBase<Derivedbc> & bc,
  37. const int k,
  38. Eigen::PlainObjectBase<DerivedW> & W);
  39. };
  40. #ifndef IGL_STATIC_LIBRARY
  41. #include "harmonic.cpp"
  42. #endif
  43. #endif