PolyFEM
Loading...
Searching...
No Matches
GenericLagrangianForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
AugmentedLagrangianForm.hpp
"
4
5
namespace
polyfem::solver
6
{
8
class
GenericLagrangianForm
:
public
AugmentedLagrangianForm
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
:
41
const
StiffnessMatrix
A
;
42
const
Eigen::VectorXd
b
;
43
};
44
}
// namespace polyfem::solver
AugmentedLagrangianForm.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::GenericLagrangianForm
Form of the lagrangian in augmented lagrangian.
Definition
GenericLagrangianForm.hpp:9
polyfem::solver::GenericLagrangianForm::second_derivative_unweighted
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
Definition
GenericLagrangianForm.cpp:27
polyfem::solver::GenericLagrangianForm::value_unweighted
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
Definition
GenericLagrangianForm.cpp:14
polyfem::solver::GenericLagrangianForm::A
const StiffnessMatrix A
Definition
GenericLagrangianForm.hpp:41
polyfem::solver::GenericLagrangianForm::compute_error
double compute_error(const Eigen::VectorXd &x) const override
Definition
GenericLagrangianForm.cpp:37
polyfem::solver::GenericLagrangianForm::b
const Eigen::VectorXd b
Definition
GenericLagrangianForm.hpp:42
polyfem::solver::GenericLagrangianForm::update_lagrangian
void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override
Definition
GenericLagrangianForm.cpp:32
polyfem::solver::GenericLagrangianForm::name
std::string name() const override
Definition
GenericLagrangianForm.hpp:19
polyfem::solver::GenericLagrangianForm::first_derivative_unweighted
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
Definition
GenericLagrangianForm.cpp:22
polyfem::solver
Definition
OptState.hpp:16
polyfem::StiffnessMatrix
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition
Types.hpp:22
src
polyfem
solver
forms
lagrangian
GenericLagrangianForm.hpp
Generated by
1.9.8