Browse Source

Update heat_geodesics.cpp

Alec Jacobson 6 years ago
parent
commit
f323a8ecb1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      include/igl/heat_geodesics.cpp

+ 2 - 1
include/igl/heat_geodesics.cpp

@@ -84,7 +84,8 @@ IGL_INLINE bool igl::heat_geodesics_precompute(
         return false;
         return false;
       }
       }
     }
     }
-    const Eigen::SparseMatrix<double> Aeq = M.diagonal().transpose().sparseView();
+    const DerivedV M_diag_tr = M.diagonal().transpose();
+    const Eigen::SparseMatrix<Scalar> Aeq = M_diag_tr.sparseView();
     L *= -0.5;
     L *= -0.5;
     if(!igl::min_quad_with_fixed_precompute(
     if(!igl::min_quad_with_fixed_precompute(
       L,Eigen::VectorXi(),Aeq,true,data.Poisson))
       L,Eigen::VectorXi(),Aeq,true,data.Poisson))