conjugate_frame_fields.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2014 Olga Diamanti <olga.diam@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_CONJUGATE_FRAME_FIELDS_H
  9. #define IGL_CONJUGATE_FRAME_FIELDS_H
  10. #include "igl_inline.h"
  11. #include "ConjugateFFSolverData.h"
  12. #include <Eigen/Core>
  13. #include <vector>
  14. namespace igl {
  15. //todo
  16. // TODO: isConstrained should become a list of indices for consistency with
  17. // n_polyvector
  18. template <typename DerivedV, typename DerivedF, typename DerivedO>
  19. IGL_INLINE void conjugate_frame_fields(const Eigen::PlainObjectBase<DerivedV> &V,
  20. const Eigen::PlainObjectBase<DerivedF> &F,
  21. const Eigen::VectorXi &isConstrained,
  22. const Eigen::PlainObjectBase<DerivedO> &initialSolution,
  23. Eigen::PlainObjectBase<DerivedO> &output,
  24. int _maxIter = 50,
  25. const typename DerivedV::Scalar _lambdaOrtho = .1,
  26. const typename DerivedV::Scalar _lambdaInit = 100,
  27. const typename DerivedV::Scalar _lambdaMultFactor = 1.01,
  28. bool _doHardConstraints = true);
  29. template <typename DerivedV, typename DerivedF, typename DerivedO>
  30. IGL_INLINE typename DerivedV::Scalar conjugate_frame_fields(const ConjugateFFSolverData<DerivedV, DerivedF> &csdata,
  31. const Eigen::VectorXi &isConstrained,
  32. const Eigen::PlainObjectBase<DerivedO> &initialSolution,
  33. Eigen::PlainObjectBase<DerivedO> &output,
  34. int _maxIter = 50,
  35. const typename DerivedV::Scalar _lambdaOrtho = .1,
  36. const typename DerivedV::Scalar _lambdaInit = 100,
  37. const typename DerivedV::Scalar _lambdaMultFactor = 1.01,
  38. bool _doHardConstraints = true);
  39. };
  40. #ifndef IGL_STATIC_LIBRARY
  41. #include "conjugate_frame_fields.cpp"
  42. #endif
  43. #endif