File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ Eigen::VectorXd FrictionPotential::force(
52
52
}
53
53
});
54
54
55
- return storage.combine (std::plus<const Eigen::VectorXd&>());
55
+ return storage.combine ([](const Eigen::VectorXd& a,
56
+ const Eigen::VectorXd& b) { return a + b; });
56
57
}
57
58
58
59
Eigen::SparseMatrix<double > FrictionPotential::force_jacobian (
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ double Potential<TCollisions>::operator()(
31
31
}
32
32
return partial_sum;
33
33
},
34
- std::plus< double >() );
34
+ []( double a, double b) { return a + b; } );
35
35
}
36
36
37
37
template <class TCollisions >
@@ -67,7 +67,9 @@ Eigen::VectorXd Potential<TCollisions>::gradient(
67
67
}
68
68
});
69
69
70
- return grad.combine (std::plus<const Eigen::VectorXd&>());
70
+ return grad.combine ([](const Eigen::VectorXd& a, const Eigen::VectorXd& b) {
71
+ return a + b;
72
+ });
71
73
}
72
74
73
75
template <class TCollisions >
@@ -127,7 +129,9 @@ Eigen::SparseMatrix<double> Potential<TCollisions>::hessian(
127
129
}
128
130
});
129
131
130
- return hess.combine (std::plus<const Eigen::SparseMatrix<double >&>());
132
+ return hess.combine (
133
+ [](const Eigen::SparseMatrix<double >& a,
134
+ const Eigen::SparseMatrix<double >& b) { return a + b; });
131
135
}
132
136
133
137
} // namespace ipc
You can’t perform that action at this time.
0 commit comments