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 const std::vector<int> &active_dims);
22
23 double value_unweighted(const Eigen::VectorXd &x) const override;
24 void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
25
26 private:
27 const State &state_;
28 const bool scale_invariant_;
29 const int power_; // only if scale_invariant_ is true
30 Eigen::SparseMatrix<bool, Eigen::RowMajor> adj;
31 Eigen::SparseMatrix<double, Eigen::RowMajor> L;
32 std::set<int> surface_ids_;
33 std::vector<int> active_dims_;
34 };
35} // 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.