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
#include <
polyfem/optimization/forms/VariableToSimulation.hpp
>
5
6
#include <Eigen/Core>
7
8
#include <memory>
9
#include <utility>
10
11
namespace
polyfem::solver
12
{
14
class
WeightedVolumeForm
:
public
ParametrizationForm
15
{
16
public
:
17
WeightedVolumeForm
(
CompositeParametrization
&¶metrizations, 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
ParametrizationForm.hpp
x
int x
Definition
SplineBasis3d.cpp:55
VariableToSimulation.hpp
polyfem::solver::CompositeParametrization
Definition
Parametrization.hpp:49
polyfem::solver::ParametrizationForm
Definition
ParametrizationForm.hpp:17
polyfem::solver::WeightedVolumeForm
Computes the dot product of the input x (after parametrization) and the volume of each element on the...
Definition
WeightedVolumeForm.hpp:15
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::WeightedVolumeForm
WeightedVolumeForm(CompositeParametrization &¶metrizations, std::shared_ptr< const State > state)
Definition
WeightedVolumeForm.hpp:17
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::state_
std::shared_ptr< const State > state_
Definition
WeightedVolumeForm.hpp:30
polyfem::solver
Definition
AdjointNLProblem.cpp:29
src
polyfem
optimization
forms
WeightedVolumeForm.hpp
Generated by
1.9.8