PolyFEM
Loading...
Searching...
No Matches
InertiaForm.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Form.hpp"
4
7
8#include <Eigen/Core>
9
10namespace polyfem::solver
11{
13 class InertiaForm : public Form
14 {
16
17 public:
21 InertiaForm(const StiffnessMatrix &mass,
22 const time_integrator::ImplicitTimeIntegrator &time_integrator);
23
24 std::string name() const override { return "inertia"; }
25
26 protected:
30 double value_unweighted(const Eigen::VectorXd &x) const override;
31
35 void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
36
40 void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override;
41
42 private:
43 // TODO mass might be time dependent
46 };
47} // namespace polyfem::solver
int x
Form of the inertia.
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
void first_derivative_unweighted(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Compute the first derivative of the value wrt x.
std::string name() const override
void second_derivative_unweighted(const Eigen::VectorXd &x, StiffnessMatrix &hessian) const override
Compute the second derivative of the value wrt x.
const time_integrator::ImplicitTimeIntegrator & time_integrator_
Time integrator.
const StiffnessMatrix & mass_
Mass matrix.
Implicit time integrator of a second order ODE (equivently a system of coupled first order ODEs).
Eigen::SparseMatrix< double, Eigen::ColMajor > StiffnessMatrix
Definition Types.hpp:24