30 for (
int i = 1; i <
weights.size() - 1; i++)
46 for (
const int step :
steps_)
48 assert(step > 0 && step <
weights.size());
67 const double tmp =
obj_->value_unweighted_step(i,
x);
75 Eigen::MatrixXd terms;
83 terms.col(i) =
weights[i] *
obj_->compute_adjoint_rhs_step(i,
x, varform, diff_cache);
84 if (
obj_->depends_on_step_prev() && i > 0)
85 terms.col(i - 1) =
weights[i] *
obj_->compute_adjoint_rhs_step_prev(i,
x, varform, diff_cache);
92 gradv.setZero(
x.size());
100 obj_->compute_partial_gradient_step(i,
x, tmp);
114 return obj_->is_step_valid(x0, x1);
119 return obj_->max_step_size(x0, x1);
124 obj_->line_search_begin(x0, x1);
129 obj_->line_search_end();
134 obj_->post_step(data);
146 obj_->solution_changed_step(i, new_x);
151 return obj_->is_step_collision_free(x0, x1);
160 vals(j++) =
obj_->value_unweighted_step(i,
x);
168 Eigen::MatrixXd terms;
174 vals(j) =
obj_->value_unweighted_step(i,
x);
175 terms.col(j++) =
obj_->compute_adjoint_rhs_step(i,
x, varform, diff_cache);
184 out.col(i) = terms.col(j) * (g(j) *
weight());
193 Eigen::MatrixXd terms;
194 terms.setZero(
x.size(),
steps_.size());
200 vals(j) =
obj_->value_unweighted_step(i,
x);
201 obj_->compute_partial_gradient_step(i,
x, tmp);
202 terms.col(j++) = tmp;
210 return 1. /
y.array().inverse().sum();
215 return y.array().pow(-2.0) * pow(
eval(
y), 2);
ElementAssemblyValues vals
Storage for additional data required by differntial code.