PolyFEM
Loading...
Searching...
No Matches
WeightedVolumeForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
polyfem/optimization/forms/ParametrizationForm.hpp
>
4
5
#include <Eigen/Core>
6
7
#include <memory>
8
#include <utility>
9
10
namespace
polyfem::solver
11
{
13
class
WeightedVolumeForm
:
public
ParametrizationForm
14
{
15
public
:
16
WeightedVolumeForm
(
CompositeParametrization
&¶metrizations, 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
ParametrizationForm.hpp
x
int x
Definition
SplineBasis3d.cpp:55
polyfem::solver::CompositeParametrization
Definition
Parametrization.hpp:55
polyfem::solver::ParametrizationForm
Definition
ParametrizationForm.hpp:20
polyfem::solver::WeightedVolumeForm
Computes the dot product of the input x (after parametrization) and the volume of each element on the...
Definition
WeightedVolumeForm.hpp:14
polyfem::solver::WeightedVolumeForm::state_
std::shared_ptr< const legacy::State > state_
Definition
WeightedVolumeForm.hpp:29
polyfem::solver::WeightedVolumeForm::compute_partial_gradient_with_param
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.
Definition
WeightedVolumeForm.cpp:25
polyfem::solver::WeightedVolumeForm::value_unweighted_with_param
double value_unweighted_with_param(const Eigen::VectorXd &x) const override
Definition
WeightedVolumeForm.cpp:11
polyfem::solver::WeightedVolumeForm::WeightedVolumeForm
WeightedVolumeForm(CompositeParametrization &¶metrizations, std::shared_ptr< const legacy::State > state)
Definition
WeightedVolumeForm.hpp:16
polyfem::solver
Definition
SolverCSVWriter.hpp:11
src
polyfem
optimization
forms
WeightedVolumeForm.hpp
Generated by
1.9.8