PolyFEM
Loading...
Searching...
No Matches
MacroStrainLagrangianForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
AugmentedLagrangianForm.hpp
"
4
5
namespace
polyfem::assembler
6
{
7
class
MacroStrainValue;
8
}
9
10
namespace
polyfem::solver
11
{
13
class
MacroStrainLagrangianForm
:
public
AugmentedLagrangianForm
14
{
15
public
:
17
MacroStrainLagrangianForm
(
const
assembler::MacroStrainValue
¯o_strain_constraint);
18
19
std::string
name
()
const override
{
return
"strain-Lagrangian"
; }
20
21
void
update_quantities
(
const
double
t,
const
Eigen::VectorXd &
x
)
override
;
22
void
update_lagrangian
(
const
Eigen::VectorXd &
x
,
const
double
k_al)
override
;
23
double
compute_error
(
const
Eigen::VectorXd &
x
)
const override
;
24
25
protected
:
29
double
value_unweighted
(
const
Eigen::VectorXd &
x
)
const override
;
30
34
void
first_derivative_unweighted
(
const
Eigen::VectorXd &
x
, Eigen::VectorXd &gradv)
const override
;
35
39
void
second_derivative_unweighted
(
const
Eigen::VectorXd &
x
,
StiffnessMatrix
&hessian)
const override
;
40
41
private
:
42
Eigen::VectorXd
values
;
43
44
Eigen::VectorXd
lagr_mults_
;
45
const
assembler::MacroStrainValue
&
macro_strain_constraint_
;
46
};
47
}
// namespace polyfem::solver
AugmentedLagrangianForm.hpp
x
int x
Definition
SplineBasis3d.cpp:55
polyfem::assembler::MacroStrainValue
Definition
MacroStrain.hpp:12
polyfem::solver::AugmentedLagrangianForm
Form of the augmented lagrangian.
Definition
AugmentedLagrangianForm.hpp:9
polyfem::solver::MacroStrainLagrangianForm
Form of the lagrangian in augmented lagrangian for homogenization.
Definition
MacroStrainLagrangianForm.hpp:14
polyfem::solver::MacroStrainLagrangianForm::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
MacroStrainLagrangianForm.cpp:22
polyfem::solver::MacroStrainLagrangianForm::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
MacroStrainLagrangianForm.cpp:29
polyfem::solver::MacroStrainLagrangianForm::value_unweighted
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the contact barrier potential value.
Definition
MacroStrainLagrangianForm.cpp:13
polyfem::solver::MacroStrainLagrangianForm::values
Eigen::VectorXd values
Definition
MacroStrainLagrangianForm.hpp:42
polyfem::solver::MacroStrainLagrangianForm::lagr_mults_
Eigen::VectorXd lagr_mults_
vector of lagrange multipliers
Definition
MacroStrainLagrangianForm.hpp:44
polyfem::solver::MacroStrainLagrangianForm::update_lagrangian
void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override
Definition
MacroStrainLagrangianForm.cpp:50
polyfem::solver::MacroStrainLagrangianForm::macro_strain_constraint_
const assembler::MacroStrainValue & macro_strain_constraint_
Definition
MacroStrainLagrangianForm.hpp:45
polyfem::solver::MacroStrainLagrangianForm::name
std::string name() const override
Definition
MacroStrainLagrangianForm.hpp:19
polyfem::solver::MacroStrainLagrangianForm::compute_error
double compute_error(const Eigen::VectorXd &x) const override
Definition
MacroStrainLagrangianForm.cpp:44
polyfem::solver::MacroStrainLagrangianForm::update_quantities
void update_quantities(const double t, const Eigen::VectorXd &x) override
Update time-dependent fields.
Definition
MacroStrainLagrangianForm.cpp:38
polyfem::assembler
Used for test only.
Definition
AMIPSEnergy.cpp:6
polyfem::solver
Definition
OptState.hpp:16
polyfem::StiffnessMatrix
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition
Types.hpp:22
src
polyfem
solver
forms
lagrangian
MacroStrainLagrangianForm.hpp
Generated by
1.9.8