PolyFEM
Loading...
Searching...
No Matches
AugmentedLagrangianForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
polyfem/solver/forms/Form.hpp
>
4
5
namespace
polyfem::solver
6
{
8
class
AugmentedLagrangianForm
:
public
Form
9
{
10
11
public
:
12
AugmentedLagrangianForm
(
const
std::vector<int> &
constraint_nodes
) :
constraint_nodes_
(
constraint_nodes
) {}
13
virtual
~AugmentedLagrangianForm
() {}
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
Form.hpp
x
int x
Definition
SplineBasis3d.cpp:55
polyfem::solver::AugmentedLagrangianForm
Form of the augmented lagrangian.
Definition
AugmentedLagrangianForm.hpp:9
polyfem::solver::AugmentedLagrangianForm::constraint_nodes
const std::vector< int > & constraint_nodes() const
Definition
AugmentedLagrangianForm.hpp:22
polyfem::solver::AugmentedLagrangianForm::k_al_
double k_al_
penalty parameter
Definition
AugmentedLagrangianForm.hpp:26
polyfem::solver::AugmentedLagrangianForm::compute_error
virtual double compute_error(const Eigen::VectorXd &x) const =0
polyfem::solver::AugmentedLagrangianForm::update_lagrangian
virtual void update_lagrangian(const Eigen::VectorXd &x, const double k_al)=0
polyfem::solver::AugmentedLagrangianForm::constraint_nodes_
const std::vector< int > constraint_nodes_
constraint nodes
Definition
AugmentedLagrangianForm.hpp:27
polyfem::solver::AugmentedLagrangianForm::lagr_mults_
Eigen::VectorXd lagr_mults_
vector of lagrange multipliers
Definition
AugmentedLagrangianForm.hpp:25
polyfem::solver::AugmentedLagrangianForm::target
virtual Eigen::VectorXd target(const Eigen::VectorXd &x) const
Definition
AugmentedLagrangianForm.hpp:18
polyfem::solver::AugmentedLagrangianForm::set_initial_weight
void set_initial_weight(const double k_al)
Definition
AugmentedLagrangianForm.hpp:20
polyfem::solver::AugmentedLagrangianForm::~AugmentedLagrangianForm
virtual ~AugmentedLagrangianForm()
Definition
AugmentedLagrangianForm.hpp:13
polyfem::solver::AugmentedLagrangianForm::AugmentedLagrangianForm
AugmentedLagrangianForm(const std::vector< int > &constraint_nodes)
Definition
AugmentedLagrangianForm.hpp:12
polyfem::solver::Form
Definition
Form.hpp:11
polyfem::solver
Definition
OptState.hpp:16
src
polyfem
solver
forms
lagrangian
AugmentedLagrangianForm.hpp
Generated by
1.9.8