PolyFEM
Loading...
Searching...
No Matches
GrowthDissipationForm.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Form.hpp"
4
5namespace polyfem::solver
6{
26 {
27 public:
31 GrowthDissipationForm(const Eigen::VectorXd &weights,
32 const Eigen::VectorXd &theta_n,
33 const double floor_fraction);
34
35 std::string name() const override { return "growth-dissipation"; }
36
37 double max_step_size(const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override;
38 bool is_step_valid(const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override;
39
40 const Eigen::VectorXd &weights() const { return weights_; }
41 const Eigen::VectorXd &theta_n() const { return theta_n_; }
42
43 protected:
44 double value_unweighted(const Eigen::VectorXd &x) const override;
45 void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
46 void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override;
47
48 private:
49 Eigen::VectorXd weights_;
50 Eigen::VectorXd theta_n_;
51 Eigen::VectorXd floor_;
52 };
53} // namespace polyfem::solver
LocalHessian hessian
int x
Rate-independent dissipation of the growth law, on the growth block of the stacked (displacement,...
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
double max_step_size(const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override
Determine the maximum step size allowable between the current and next solution.
const Eigen::VectorXd & theta_n() const
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
bool is_step_valid(const Eigen::VectorXd &x0, const Eigen::VectorXd &x1) const override
Determine if a step from solution x0 to solution x1 is allowed.
const Eigen::VectorXd & weights() const
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition Types.hpp:24