PolyFEM
Loading...
Searching...
No Matches
SmoothingForms.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <Eigen/Core>
6
7#include <memory>
8#include <set>
9#include <vector>
10
11namespace polyfem
12{
13 class State;
14}
15
16namespace polyfem::solver
17{
19 {
20 public:
22 const VariableToSimulationGroup &variable_to_simulations,
23 std::shared_ptr<const State> state,
24 const bool scale_invariant,
25 const int power,
26 const std::vector<int> &surface_selections,
27 const std::vector<int> &active_dims);
28
29 double value_unweighted(const Eigen::VectorXd &x) const override;
30 void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
31
32 private:
33 std::shared_ptr<const State> state_;
34 const bool scale_invariant_;
35 const int power_; // only if scale_invariant_ is true
36 Eigen::SparseMatrix<bool, Eigen::RowMajor> adj;
37 Eigen::SparseMatrix<double, Eigen::RowMajor> L;
38 std::set<int> surface_ids_;
39 std::vector<int> active_dims_;
40 };
41} // namespace polyfem::solver
int x
Eigen::SparseMatrix< bool, Eigen::RowMajor > adj
std::shared_ptr< const State > state_
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.