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 namespace legacy
14 {
15 class State;
16 }
17} // namespace polyfem
18
19namespace polyfem::solver
20{
22 {
23 public:
25 const VariableToSimulationGroup &variable_to_simulations,
26 std::shared_ptr<const legacy::State> state,
27 const bool scale_invariant,
28 const int power,
29 const std::vector<int> &surface_selections,
30 const std::vector<int> &active_dims);
31
32 double value_unweighted(const Eigen::VectorXd &x) const override;
33 void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
34
35 private:
36 std::shared_ptr<const legacy::State> state_;
37 const bool scale_invariant_;
38 const int power_; // only if scale_invariant_ is true
39 Eigen::SparseMatrix<bool, Eigen::RowMajor> adj;
40 Eigen::SparseMatrix<double, Eigen::RowMajor> L;
41 std::set<int> surface_ids_;
42 std::vector<int> active_dims_;
43 };
44} // namespace polyfem::solver
int x
std::shared_ptr< const legacy::State > state_
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
polyfem::legacy::State State
Definition Remesher.hpp:19