for (int it = 0; it < option.nums_iteration; it++) {
auto K_copy = SMatrixd(K); // a deep copy
const int K_row_offset = K_cols; // Shape Matrix is K_cols x K_cols
line_optimizer.make_block_diag(K_copy, option.lambda_l, K_row_offset, 0);
auto K_weighted = SMatrixd(K_copy * Q);
SMatrixd A = eigen_row_concat(B_coeffs, K_weighted);
this->solve_mesh(A, b_term);
// opt_mesh.show_mesh(src, "mesh - it = " + std::to_string(it));
// fix V, update theta
line_optimizer.update_line_theta(opt_mesh);
std::cout << "iteration " << it << " - ok" << std::endl;
}
}
You use the Q matrix so that the whole mesh V_q can be multiplied by K*Q . But the optimization problem is to find the V_q which can minimize the energy E. Did you forget to compute the derivative of V_q? You need to compute the derivative and set it to 0 and then you can find the V_q to minimize the energy E. Er... Maybe I miss some codes or you made a mistake?
Look forward to your reply!!!Thx!