bbw.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_MOSEK_BBW_H
  9. #define IGL_MOSEK_BBW_H
  10. #include "../igl_inline.h"
  11. #include "mosek_quadprog.h"
  12. #include "../bbw.h"
  13. #include <Eigen/Dense>
  14. namespace igl
  15. {
  16. namespace mosek
  17. {
  18. // Compute Bounded Biharmonic Weights on a given domain (V,Ele) with a given
  19. // set of boundary conditions
  20. //
  21. // Templates
  22. // DerivedV derived type of eigen matrix for V (e.g. MatrixXd)
  23. // DerivedF derived type of eigen matrix for F (e.g. MatrixXi)
  24. // Derivedb derived type of eigen matrix for b (e.g. VectorXi)
  25. // Derivedbc derived type of eigen matrix for bc (e.g. MatrixXd)
  26. // DerivedW derived type of eigen matrix for W (e.g. MatrixXd)
  27. // Inputs:
  28. // V #V by dim vertex positions
  29. // Ele #Elements by simplex-size list of element indices
  30. // b #b boundary indices into V
  31. // bc #b by #W list of boundary values
  32. // data object containing options, intial guess --> solution and results
  33. // mosek_data object containing mosek options
  34. // Outputs:
  35. // W #V by #W list of *unnormalized* weights to normalize use
  36. // igl::normalize_row_sums(W,W);
  37. // Returns true on success, false on failure
  38. template <
  39. typename DerivedV,
  40. typename DerivedEle,
  41. typename Derivedb,
  42. typename Derivedbc,
  43. typename DerivedW>
  44. IGL_INLINE bool bbw(
  45. const Eigen::PlainObjectBase<DerivedV> & V,
  46. const Eigen::PlainObjectBase<DerivedEle> & Ele,
  47. const Eigen::PlainObjectBase<Derivedb> & b,
  48. const Eigen::PlainObjectBase<Derivedbc> & bc,
  49. igl::BBWData & data,
  50. igl::mosek::MosekData & mosek_data,
  51. Eigen::PlainObjectBase<DerivedW> & W);
  52. }
  53. }
  54. #ifndef IGL_STATIC_LIBRARY
  55. # include "bbw.cpp"
  56. #endif
  57. #endif