improves performance of 3D slim by ~2x

This commit is contained in:
Daniele Panozzo
2016-10-25 21:40:20 -04:00
parent 9b91f679f6
commit 4e7ec01ed2
+1 -1
View File
@@ -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);
}