PolyFEM
Loading...
Searching...
No Matches
MacroStrainLagrangianForm.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace polyfem::assembler
6{
7 class MacroStrainValue;
8}
9
10namespace polyfem::solver
11{
14 {
15 public:
17 MacroStrainLagrangianForm(const assembler::MacroStrainValue &macro_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_;
46 };
47} // namespace polyfem::solver
int x
Form of the lagrangian in augmented lagrangian for homogenization.
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the contact barrier potential value.
Eigen::VectorXd lagr_mults_
vector of lagrange multipliers
void update_lagrangian(const Eigen::VectorXd &x, const double k_al) override
const assembler::MacroStrainValue & macro_strain_constraint_
double compute_error(const Eigen::VectorXd &x) const override
void update_quantities(const double t, const Eigen::VectorXd &x) override
Update time-dependent fields.
Used for test only.
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition Types.hpp:22