PolyFEM
Loading...
Searching...
No Matches
WeightedVolumeForm.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <Eigen/Core>
6
7#include <memory>
8#include <utility>
9
10namespace polyfem::solver
11{
14 {
15 public:
16 WeightedVolumeForm(CompositeParametrization &&parametrizations, std::shared_ptr<const legacy::State> state)
17 : ParametrizationForm(std::move(parametrizations)), state_(std::move(state))
18 {
19 }
20
21 protected:
23 double value_unweighted_with_param(const Eigen::VectorXd &x) const override;
24
26 void compute_partial_gradient_with_param(const Eigen::VectorXd &x, Eigen::VectorXd &gradv) const override;
27
28 private:
29 std::shared_ptr<const legacy::State> state_;
30 };
31} // namespace polyfem::solver
int x
Computes the dot product of the input x (after parametrization) and the volume of each element on the...
std::shared_ptr< const legacy::State > state_
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.
double value_unweighted_with_param(const Eigen::VectorXd &x) const override
WeightedVolumeForm(CompositeParametrization &&parametrizations, std::shared_ptr< const legacy::State > state)