Bladeren bron

fixed bug in boundary_conditions

Former-commit-id: 5296772e650df890aafefa6453598a032fb317a9
Alec Jacobson (jalec 12 jaren geleden
bovenliggende
commit
6095905162
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      include/igl/boundary_conditions.cpp
  2. 1 1
      include/igl/mosek/bbw.cpp

+ 2 - 2
include/igl/boundary_conditions.cpp

@@ -45,8 +45,8 @@ IGL_INLINE bool igl::boundary_conditions(
       // EIGEN GOTCHA:
       // EIGEN GOTCHA:
       // double sqrd = (V.row(i)-pos).array().pow(2).sum();
       // double sqrd = (V.row(i)-pos).array().pow(2).sum();
       // Must first store in temporary
       // Must first store in temporary
-      VectorXd vi = V.row(i)
-      double sqrd = (V.row(i)-pos).array().pow(2).sum();
+      VectorXd vi = V.row(i);
+      double sqrd = (vi-pos).array().pow(2).sum();
       if(sqrd <= FLOAT_EPS)
       if(sqrd <= FLOAT_EPS)
       {
       {
         cout<<"sum((["<<
         cout<<"sum((["<<

+ 1 - 1
include/igl/mosek/bbw.cpp

@@ -88,7 +88,7 @@ IGL_INLINE bool igl::bbw(
     for(int i = 0;i<m;i++)
     for(int i = 0;i<m;i++)
     {
     {
       verbose("\n^%s: Computing weight for handle %d out of %d.\n\n",
       verbose("\n^%s: Computing weight for handle %d out of %d.\n\n",
-        __FUNCTION__,i,m);
+        __FUNCTION__,i+1,m);
       // impose boundary conditions
       // impose boundary conditions
       VectorXd bci = bc.col(i);
       VectorXd bci = bc.col(i);
       slice_into(bci,b,ux);
       slice_into(bci,b,ux);