Wildmeshing Toolkit
wmtk::function::LocalNeighborsSumFunction Class Reference

#include <LocalNeighborsSumFunction.hpp>

Inheritance diagram for wmtk::function::LocalNeighborsSumFunction:
[legend]
Collaboration diagram for wmtk::function::LocalNeighborsSumFunction:
[legend]

Public Member Functions

 LocalNeighborsSumFunction (Mesh &mesh, const attribute::MeshAttributeHandle &handle, PerSimplexFunction &function)
 
double get_value (const simplex::Simplex &variable_simplex) const override
 collects the local neigh and call the same m_function on all simplicies More...
 
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 More...
 
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. More...
 
std::vector< simplex::Simplexdomain (const simplex::Simplex &variable_simplex) const override
 
- Public Member Functions inherited from wmtk::function::Function
 Function (Mesh &mesh, const attribute::MeshAttributeHandle &handle)
 
virtual ~Function ()
 
Meshmesh ()
 
const Meshmesh () const
 
PrimitiveType attribute_type () const
 
int64_t embedded_dimension () const
 
const attribute::MeshAttributeHandleattribute_handle () const
 

Private Attributes

PerSimplexFunctionm_function
 
PrimitiveType m_domain_simplex_type
 

Detailed Description

Definition at line 9 of file LocalNeighborsSumFunction.hpp.

Constructor & Destructor Documentation

◆ LocalNeighborsSumFunction()

wmtk::function::LocalNeighborsSumFunction::LocalNeighborsSumFunction ( Mesh mesh,
const attribute::MeshAttributeHandle handle,
PerSimplexFunction function 
)

Definition at line 11 of file LocalNeighborsSumFunction.cpp.

References m_domain_simplex_type, wmtk::function::Function::mesh(), and wmtk::Mesh::top_simplex_type().

Here is the call graph for this function:

Member Function Documentation

◆ domain()

std::vector< simplex::Simplex > wmtk::function::LocalNeighborsSumFunction::domain ( const simplex::Simplex variable_simplex) const
overridevirtual

Implements wmtk::function::Function.

Definition at line 21 of file LocalNeighborsSumFunction.cpp.

References wmtk::simplex::cofaces_single_dimension_simplices(), m_domain_simplex_type, and wmtk::function::Function::mesh().

Referenced by get_gradient(), get_hessian(), and get_value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_gradient()

Eigen::VectorXd wmtk::function::LocalNeighborsSumFunction::get_gradient ( const simplex::Simplex variable_simplex) const
overridevirtual

get_gradient collects the local neigh and call the gradient of m_function on all simplicies

This variable is represented by the input argument variable_simplex.

Parameters
variable_simplexThe input simplex. f(x) is defined wrt the attributes of this argument.
Returns
Eigen::VectorXd The gradient of the function. The dimension of the vector is equal to the dimension of the embedded space.

Implements wmtk::function::Function.

Definition at line 48 of file LocalNeighborsSumFunction.cpp.

References wmtk::function::Function::attribute_type(), domain(), wmtk::function::Function::embedded_dimension(), wmtk::function::PerSimplexFunction::embedded_dimension(), wmtk::function::PerSimplexFunction::get_gradient(), m_domain_simplex_type, m_function, wmtk::function::Function::mesh(), wmtk::function::PerSimplexFunction::mesh(), and wmtk::simplex::Simplex::primitive_type().

Here is the call graph for this function:

◆ get_hessian()

Eigen::MatrixXd wmtk::function::LocalNeighborsSumFunction::get_hessian ( const simplex::Simplex variable_simplex) const
overridevirtual

get_hessian evaluates the hessian of the function f(x) defined wrt the variable x.

This variable is represented by the input argument variable_simplex.

Parameters
variable_simplexThe input simplex. f(x) is defined wrt the attributes of this argument.
Returns
Eigen::MatrixXd The hessian of the function. The dimension of the matrix is equal to the dimension of the embedded space.

Implements wmtk::function::Function.

Definition at line 67 of file LocalNeighborsSumFunction.cpp.

References wmtk::function::Function::attribute_type(), domain(), wmtk::function::Function::embedded_dimension(), wmtk::function::PerSimplexFunction::embedded_dimension(), wmtk::function::PerSimplexFunction::get_hessian(), m_domain_simplex_type, m_function, wmtk::function::Function::mesh(), wmtk::function::PerSimplexFunction::mesh(), and wmtk::simplex::Simplex::primitive_type().

Here is the call graph for this function:

◆ get_value()

double wmtk::function::LocalNeighborsSumFunction::get_value ( const simplex::Simplex variable_simplex) const
overridevirtual

collects the local neigh and call the same m_function on all simplicies

Parameters
variable_simplexThe input simplex. f(x) is defined wrt this argument.
Returns
double The value of the function at the input simplex.

Implements wmtk::function::Function.

Definition at line 30 of file LocalNeighborsSumFunction.cpp.

References wmtk::function::Function::attribute_type(), domain(), wmtk::function::Function::embedded_dimension(), wmtk::function::PerSimplexFunction::embedded_dimension(), wmtk::function::PerSimplexFunction::get_value(), m_domain_simplex_type, m_function, wmtk::function::Function::mesh(), wmtk::function::PerSimplexFunction::mesh(), and wmtk::simplex::Simplex::primitive_type().

Here is the call graph for this function:

Member Data Documentation

◆ m_domain_simplex_type

PrimitiveType wmtk::function::LocalNeighborsSumFunction::m_domain_simplex_type
private

◆ m_function

PerSimplexFunction& wmtk::function::LocalNeighborsSumFunction::m_function
private

Definition at line 43 of file LocalNeighborsSumFunction.hpp.

Referenced by get_gradient(), get_hessian(), and get_value().


The documentation for this class was generated from the following files: