PolyFEM
Loading...
Searching...
No Matches
SumCompositeForm.hpp
Go to the documentation of this file.
1
#include "
CompositeForm.hpp
"
2
3
namespace
polyfem::solver
4
{
5
class
SumCompositeForm
:
public
CompositeForm
6
{
7
public
:
8
using
CompositeForm::CompositeForm
;
9
~SumCompositeForm
() {}
10
11
private
:
12
inline
double
compose
(
const
Eigen::VectorXd &inputs)
const override
13
{
14
return
inputs.sum();
15
}
16
17
inline
Eigen::VectorXd
compose_grad
(
const
Eigen::VectorXd &inputs)
const override
18
{
19
return
Eigen::VectorXd::Ones(inputs.size());
20
}
21
};
22
}
// namespace polyfem::solver
CompositeForm.hpp
polyfem::solver::CompositeForm
Definition
CompositeForm.hpp:10
polyfem::solver::CompositeForm::CompositeForm
CompositeForm(const VariableToSimulationGroup &variable_to_simulations, const std::vector< std::shared_ptr< AdjointForm > > &forms)
Definition
CompositeForm.hpp:13
polyfem::solver::SumCompositeForm
Definition
SumCompositeForm.hpp:6
polyfem::solver::SumCompositeForm::compose
double compose(const Eigen::VectorXd &inputs) const override
Definition
SumCompositeForm.hpp:12
polyfem::solver::SumCompositeForm::~SumCompositeForm
~SumCompositeForm()
Definition
SumCompositeForm.hpp:9
polyfem::solver::SumCompositeForm::compose_grad
Eigen::VectorXd compose_grad(const Eigen::VectorXd &inputs) const override
Definition
SumCompositeForm.hpp:17
polyfem::solver
Definition
OptState.hpp:16
src
polyfem
solver
forms
adjoint_forms
SumCompositeForm.hpp
Generated by
1.9.8