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::solver
12{
14 {
15 public:
17 const VariableToSimulationGroup &variable_to_simulations,
18 std::shared_ptr<const varform::DifferentiableVarForm> varform,
19 const bool scale_invariant,
20 const int power,
21 const std::vector<int> &surface_selections,
22 const std::vector<int> &active_dims);
23
24 double value_unweighted(const Eigen::VectorXd &x) const override;
25 void compute_partial_gradient(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
26
27 private:
28 std::shared_ptr<const varform::DifferentiableVarForm> varform_;
29 const bool scale_invariant_;
30 const int power_; // only if scale_invariant_ is true
31 Eigen::SparseMatrix<bool, Eigen::RowMajor> adj;
32 Eigen::SparseMatrix<double, Eigen::RowMajor> L;
33 std::set<int> surface_ids_;
34 std::vector<int> active_dims_;
35 };
36} // namespace polyfem::solver
int x
Eigen::SparseMatrix< bool, Eigen::RowMajor > adj
std::shared_ptr< const varform::DifferentiableVarForm > varform_
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