Loading [MathJax]/extensions/tex2jax.js
PolyFEM
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatrixLagrangianForm.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace polyfem::solver
6{
9 {
10 public:
17 const Eigen::MatrixXd &b,
18 const StiffnessMatrix &A_proj = {},
19 const Eigen::MatrixXd &b_pro = {});
20
21 std::string name() const override { return "generic-lagrangian"; }
22
26 double value_unweighted(const Eigen::VectorXd &x) const override;
27
31 void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
32
36 void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override;
37
38 public:
39 void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override;
40 double compute_error(const Eigen::VectorXd &x) const override;
41
42 private:
44 Eigen::VectorXd Atb;
45 };
46} // namespace polyfem::solver
int x
Form of the lagrangian in augmented lagrangian.
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
double compute_error(const Eigen::VectorXd &x) const override
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition Types.hpp:22