8 macro_strain_constraint_(macro_strain_constraint)
17 const double pen = (
x(indices) -
values).squaredNorm() / 2.0;
19 return larg +
k_al_ * pen;
25 gradv.setZero(
x.size());
32 hessian.resize(
x.size(),
x.size());
34 for (
int i = 0; i < indices.size(); i++)
35 hessian.coeffRef(indices(i), indices(i)) +=
k_al_;
47 return (
x(indices).array() -
values.array()).matrix().squaredNorm();
Eigen::MatrixXd eval(const double t) const
const Eigen::VectorXi & get_fixed_entry() const
Eigen::VectorXd flatten(const Eigen::MatrixXd &X)
Flatten rowwises.
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix