11 Eigen::VectorXd tmp_grad;
12 for (
int i = 0; i <
forms_.size(); i++)
15 term = composite_grad(i) *
forms_[i]->compute_reduced_adjoint_rhs(
x, state);
17 term += composite_grad(i) *
forms_[i]->compute_reduced_adjoint_rhs(
x, state);
27 gradv.setZero(
x.size());
28 Eigen::VectorXd tmp_grad;
29 for (
int i = 0; i <
forms_.size(); i++)
31 forms_[i]->compute_partial_gradient(
x, tmp_grad);
32 gradv += composite_grad(i) * tmp_grad;
39 Eigen::VectorXd values;
40 values.setZero(
forms_.size());
42 for (
int i = 0; i <
forms_.size(); i++)
43 values(i) =
forms_[i]->value(
x);
55 for (
const auto &f :
forms_)
61 for (
const auto &f :
forms_)
63 if (f->enabled() && !f->is_step_valid(x0, x1))
72 for (
const auto &f :
forms_)
74 step = std::min(step, f->max_step_size(x0, x1));
81 for (
const auto &f :
forms_)
82 f->line_search_begin(x0, x1);
87 for (
const auto &f :
forms_)
93 for (
const auto &f :
forms_)
100 for (
const auto &f :
forms_)
101 f->solution_changed(new_x);
105 for (
const auto &f :
forms_)
107 if (f->enabled() && !f->is_step_collision_free(x0, x1))
main class that contains the polyfem solver and all its state