diff --git a/src/polysolve/linear/Solver.cpp b/src/polysolve/linear/Solver.cpp index b66949c..25595be 100644 --- a/src/polysolve/linear/Solver.cpp +++ b/src/polysolve/linear/Solver.cpp @@ -528,11 +528,15 @@ namespace polysolve::linear #ifdef POLYSOLVE_WITH_PARDISO return "Pardiso"; #else +#ifdef POLYSOLVE_WITH_ACCELERATE + return "Eigen::AccelerateLDLT"; +#else #ifdef POLYSOLVE_WITH_HYPRE return "Hypre"; #else return "Eigen::BiCGSTAB"; #endif +#endif #endif } diff --git a/src/polysolve/nonlinear/line_search/LineSearch.cpp b/src/polysolve/nonlinear/line_search/LineSearch.cpp index 92bbded..1102d3c 100644 --- a/src/polysolve/nonlinear/line_search/LineSearch.cpp +++ b/src/polysolve/nonlinear/line_search/LineSearch.cpp @@ -190,11 +190,7 @@ namespace polysolve::nonlinear::line_search // Find step that does not result in nan or infinite energy while (step_size > current_min_step_size() && cur_iter < current_max_step_size_iter()) { - // Compute the new energy value without contacts - const double energy = objFunc(new_x); - const bool is_step_valid = objFunc.is_step_valid(x, new_x); - - if (!std::isfinite(energy) || !is_step_valid) + if (!objFunc.is_step_valid(x, new_x) || !std::isfinite(objFunc(new_x))) { step_size *= rate; new_x = x + step_size * delta_x;