PolyFEM
Loading...
Searching...
No Matches
WeightedVolumeForm.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
polyfem/solver/forms/adjoint_forms/ParametrizationForm.hpp
>
4
#include "
VariableToSimulation.hpp
"
5
6
namespace
polyfem::solver
7
{
9
class
WeightedVolumeForm
:
public
ParametrizationForm
10
{
11
public
:
12
WeightedVolumeForm
(
CompositeParametrization
&¶metrizations,
const
State
&state)
13
:
ParametrizationForm
(std::move(parametrizations)),
state_
(state)
14
{
15
}
16
17
protected
:
19
double
value_unweighted_with_param
(
const
Eigen::VectorXd &
x
)
const override
;
20
22
void
compute_partial_gradient_with_param
(
const
Eigen::VectorXd &
x
, Eigen::VectorXd &gradv)
const override
;
23
24
private
:
25
const
State
&
state_
;
26
};
27
}
// namespace polyfem::solver
ParametrizationForm.hpp
x
int x
Definition
SplineBasis3d.cpp:55
VariableToSimulation.hpp
polyfem::State
main class that contains the polyfem solver and all its state
Definition
State.hpp:79
polyfem::solver::CompositeParametrization
Definition
Parametrization.hpp:27
polyfem::solver::ParametrizationForm
Definition
ParametrizationForm.hpp:15
polyfem::solver::WeightedVolumeForm
Computes the dot product of the input x (after parametrization) and the volume of each element on the...
Definition
WeightedVolumeForm.hpp:10
polyfem::solver::WeightedVolumeForm::WeightedVolumeForm
WeightedVolumeForm(CompositeParametrization &¶metrizations, const State &state)
Definition
WeightedVolumeForm.hpp:12
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:20
polyfem::solver::WeightedVolumeForm::value_unweighted_with_param
double value_unweighted_with_param(const Eigen::VectorXd &x) const override
Definition
WeightedVolumeForm.cpp:6
polyfem::solver::WeightedVolumeForm::state_
const State & state_
Definition
WeightedVolumeForm.hpp:25
polyfem::solver
Definition
OptState.hpp:16
src
polyfem
solver
forms
adjoint_forms
WeightedVolumeForm.hpp
Generated by
1.9.8