Loading [MathJax]/extensions/tex2jax.js
PolyFEM
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
x
y
z
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Typedefs
b
c
d
e
f
g
h
l
m
n
o
p
q
s
t
v
Enumerations
Related Symbols
a
c
e
g
i
l
o
p
s
Files
File List
File Members
All
_
a
c
d
e
f
g
h
i
j
l
m
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
_
a
c
d
e
f
g
i
l
m
q
s
t
v
w
x
y
z
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
QuadraticPenaltyForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Form.hpp
"
4
5
#include <
polyfem/utils/Types.hpp
>
6
7
namespace
polyfem::solver
8
{
10
class
QuadraticPenaltyForm
:
public
Form
11
{
12
public
:
17
QuadraticPenaltyForm
(
const
StiffnessMatrix
&A,
18
const
Eigen::MatrixXd &b,
19
const
double
weight
);
20
21
std::string
name
()
const override
{
return
"quadratic-penalty"
; }
22
23
double
weight
()
const override
{
return
weight_
*
penalty_weight_
; }
24
28
double
value_unweighted
(
const
Eigen::VectorXd &
x
)
const override
;
29
33
void
first_derivative_unweighted
(
const
Eigen::VectorXd &
x
, Eigen::VectorXd &gradv)
const override
;
34
38
void
second_derivative_unweighted
(
const
Eigen::VectorXd &
x
,
StiffnessMatrix
&hessian)
const override
;
39
40
private
:
41
StiffnessMatrix
A_
;
42
Eigen::MatrixXd
b_
;
43
44
StiffnessMatrix
AtA_
;
45
Eigen::VectorXd
Atb_
;
46
47
const
double
penalty_weight_
;
48
};
10
class
QuadraticPenaltyForm
:
public
Form
{
…
};
49
}
// namespace polyfem::solver
Form.hpp
x
int x
Definition
SplineBasis3d.cpp:55
Types.hpp
polyfem::solver::Form
Definition
Form.hpp:11
polyfem::solver::Form::weight_
double weight_
weight of the form (e.g., AL penalty weight or Δt²)
Definition
Form.hpp:149
polyfem::solver::QuadraticPenaltyForm
Form for quadratic soft constraints.
Definition
QuadraticPenaltyForm.hpp:11
polyfem::solver::QuadraticPenaltyForm::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
QuadraticPenaltyForm.cpp:25
polyfem::solver::QuadraticPenaltyForm::name
std::string name() const override
Definition
QuadraticPenaltyForm.hpp:21
polyfem::solver::QuadraticPenaltyForm::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
QuadraticPenaltyForm.cpp:30
polyfem::solver::QuadraticPenaltyForm::b_
Eigen::MatrixXd b_
Constraints value.
Definition
QuadraticPenaltyForm.hpp:42
polyfem::solver::QuadraticPenaltyForm::value_unweighted
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
Definition
QuadraticPenaltyForm.cpp:19
polyfem::solver::QuadraticPenaltyForm::A_
StiffnessMatrix A_
Constraints matrix.
Definition
QuadraticPenaltyForm.hpp:41
polyfem::solver::QuadraticPenaltyForm::AtA_
StiffnessMatrix AtA_
Definition
QuadraticPenaltyForm.hpp:44
polyfem::solver::QuadraticPenaltyForm::penalty_weight_
const double penalty_weight_
Definition
QuadraticPenaltyForm.hpp:47
polyfem::solver::QuadraticPenaltyForm::weight
double weight() const override
Get the form's multiplicative constant weight.
Definition
QuadraticPenaltyForm.hpp:23
polyfem::solver::QuadraticPenaltyForm::Atb_
Eigen::VectorXd Atb_
Definition
QuadraticPenaltyForm.hpp:45
polyfem::solver
Definition
OptState.hpp:16
polyfem::StiffnessMatrix
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition
Types.hpp:22
src
polyfem
solver
forms
QuadraticPenaltyForm.hpp
Generated by
1.9.8