PolyFEM
Loading...
Searching...
No Matches
SmoothingForms.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "AdjointForm.hpp"
4
5namespace polyfem
6{
7 class State;
8}
9
10namespace polyfem::solver
11{
13 {
14 public:
16 const VariableToSimulationGroup &variable_to_simulations,
17 const State &state,
18 const bool scale_invariant,
19 const int power,
20 const std::vector<int> &surface_selections);
21
22 double value_unweighted(const Eigen::VectorXd &x) const override;
23 void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
24
25 private:
26 const State &state_;
27 const bool scale_invariant_;
28 const int power_; // only if scale_invariant_ is true
29 Eigen::SparseMatrix<bool, Eigen::RowMajor> adj;
30 Eigen::SparseMatrix<double, Eigen::RowMajor> L;
31 std::set<int> surface_ids_;
32 };
33
34} // namespace polyfem::solver
int x
main class that contains the polyfem solver and all its state
Definition State.hpp:79
Eigen::SparseMatrix< bool, Eigen::RowMajor > adj
double value_unweighted(const Eigen::VectorXd &x) const override
Compute the value of the form.
void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Eigen::SparseMatrix< double, Eigen::RowMajor > L
A collection of VariableToSimulation.