Wildmeshing Toolkit
Loading...
Searching...
No Matches
LocalNeighborsSumFunction.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Function.hpp"
4
5namespace wmtk::function {
6
7class PerSimplexFunction;
8
10{
11public:
13 Mesh& mesh,
15 PerSimplexFunction& function);
22 double get_value(const simplex::Simplex& variable_simplex) const override;
23
35 Eigen::VectorXd get_gradient(const simplex::Simplex& variable_simplex) const override;
36
37 // TODO: should differentiable function be required to be twice differentiable?
38 Eigen::MatrixXd get_hessian(const simplex::Simplex& variable_simplex) const override;
39
40 std::vector<simplex::Simplex> domain(const simplex::Simplex& variable_simplex) const override;
41
42private:
45};
46} // namespace wmtk::function
double get_value(const simplex::Simplex &variable_simplex) const override
collects the local neigh and call the same m_function on all simplicies
Eigen::MatrixXd get_hessian(const simplex::Simplex &variable_simplex) const override
get_hessian evaluates the hessian of the function f(x) defined wrt the variable x.
Eigen::VectorXd get_gradient(const simplex::Simplex &variable_simplex) const override
get_gradient collects the local neigh and call the gradient of m_function on all simplicies
std::vector< simplex::Simplex > domain(const simplex::Simplex &variable_simplex) const override