PolyFEM
Loading...
Searching...
No Matches
SumCompositeForm.hpp
Go to the documentation of this file.
1#include "CompositeForm.hpp"
2
3namespace polyfem::solver
4{
6 {
7 public:
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(const VariableToSimulationGroup &variable_to_simulations, const std::vector< std::shared_ptr< AdjointForm > > &forms)
double compose(const Eigen::VectorXd &inputs) const override
Eigen::VectorXd compose_grad(const Eigen::VectorXd &inputs) const override