PolyFEM
Loading...
Searching...
No Matches
WeightedVolumeForm.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <Eigen/Core>
7
8#include <memory>
9#include <utility>
10
11namespace polyfem::solver
12{
15 {
16 public:
17 WeightedVolumeForm(CompositeParametrization &&parametrizations, std::shared_ptr<const State> state)
18 : ParametrizationForm(std::move(parametrizations)), state_(std::move(state))
19 {
20 }
21
22 protected:
24 double value_unweighted_with_param(const Eigen::VectorXd &x) const override;
25
27 void compute_partial_gradient_with_param(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
28
29 private:
30 std::shared_ptr<const State> state_;
31 };
32} // namespace polyfem::solver
int x
Computes the dot product of the input x (after parametrization) and the volume of each element on the...
void compute_partial_gradient_with_param(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override
Computes the gradient of this form wrt. x, assuming that the volume of elements doesn't depend on x.
WeightedVolumeForm(CompositeParametrization &&parametrizations, std::shared_ptr< const State > state)
double value_unweighted_with_param(const Eigen::VectorXd &x) const override
std::shared_ptr< const State > state_