PolyFEM
Loading...
Searching...
No Matches
GenericLagrangianForm.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace polyfem::solver
6{
9 {
10 public:
15 GenericLagrangianForm(const std::vector<int> &constraint_nodes,
16 const StiffnessMatrix &A,
17 const Eigen::VectorXd &b);
18
19 std::string name() const override { return "generic-lagrangian"; }
20
24 double value_unweighted(const Eigen::VectorXd &x) const override;
25
29 void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
30
34 void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override;
35
36 public:
37 void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override;
38 double compute_error(const Eigen::VectorXd &x) const override;
39
40 private:
42 const Eigen::VectorXd b;
43 };
44} // namespace polyfem::solver
int x
const std::vector< int > & constraint_nodes() const
Form of the lagrangian in augmented lagrangian.
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
double compute_error(const Eigen::VectorXd &x) const override
void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition Types.hpp:22