Skip to content

Commit

Permalink
Merge branch 'master' of github.com:libigl/libigl into alecjacobson
Browse files Browse the repository at this point in the history
  • Loading branch information
alecjacobson committed Oct 27, 2016
2 parents 852961c + 4e7ec01 commit a834eee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions include/igl/boundary_loop.cpp
Expand Up @@ -114,6 +114,13 @@ IGL_INLINE void igl::boundary_loop(
}
}

//Check for meshes without boundary
if (idxMax == -1)
{
L.clear();
return;
}

L.resize(Lall[idxMax].size());
for (size_t i = 0; i < Lall[idxMax].size(); ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion include/igl/slim.cpp
Expand Up @@ -361,7 +361,7 @@ void WeightedGlobalLocal::solve_weighted_arap(const Eigen::MatrixXd& V, const Ei
} else { // seems like CG performs much worse for 2D and way better for 3D
Eigen::VectorXd guess(uv.rows()*dim);
for (int i = 0; i < dim; i++) for (int j = 0; j < dim; j++) guess(uv.rows()*i + j) = uv(i,j); // flatten vector
ConjugateGradient<SparseMatrix<double>, Eigen::Upper> solver;
ConjugateGradient<SparseMatrix<double>, Eigen::Lower|Upper> solver;
solver.setTolerance(1e-8);
Uc = solver.compute(L).solveWithGuess(rhs,guess);
}
Expand Down

0 comments on commit a834eee

Please sign in to comment.