Wildmeshing Toolkit
LocalNeighborsSumFunction.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Function.hpp"
4 
5 namespace wmtk::function {
6 
7 class PerSimplexFunction;
8 
10 {
11 public:
13  Mesh& mesh,
14  const attribute::MeshAttributeHandle& handle,
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 
42 private:
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
LocalNeighborsSumFunction(Mesh &mesh, const attribute::MeshAttributeHandle &handle, PerSimplexFunction &function)