PolyFEM
Loading...
Searching...
No Matches
AugmentedLagrangianForm.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace polyfem::solver
6{
9 {
10
11 public:
14
15 virtual void update_lagrangian(const Eigen::VectorXd &x, const double k_al) = 0;
16
17 virtual double compute_error(const Eigen::VectorXd &x) const = 0;
18 virtual Eigen::VectorXd target(const Eigen::VectorXd &x) const { return Eigen::VectorXd{}; };
19
20 inline void set_initial_weight(const double k_al) { k_al_ = k_al; }
21
22 inline const std::vector<int> &constraint_nodes() const { return constraint_nodes_; }
23
24 protected:
25 Eigen::VectorXd lagr_mults_;
26 double k_al_;
27 const std::vector<int> constraint_nodes_;
28 };
29} // namespace polyfem::solver
int x
const std::vector< int > & constraint_nodes() const
virtual double compute_error(const Eigen::VectorXd &x) const =0
virtual void update_lagrangian(const Eigen::VectorXd &x, const double k_al)=0
const std::vector< int > constraint_nodes_
constraint nodes
Eigen::VectorXd lagr_mults_
vector of lagrange multipliers
virtual Eigen::VectorXd target(const Eigen::VectorXd &x) const
AugmentedLagrangianForm(const std::vector< int > &constraint_nodes)