Wildmeshing Toolkit
wmtk::function::Function Class Referenceabstract

#include <Function.hpp>

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

Public Member Functions

 Function (Mesh &mesh, const attribute::MeshAttributeHandle &handle)
 
virtual ~Function ()
 
virtual double get_value (const simplex::Simplex &variable_simplex) const =0
 Given a function f(x), get_value evaluate the function at the input simplex. More...
 
virtual Eigen::VectorXd get_gradient (const simplex::Simplex &variable_simplex) const =0
 get_gradient evaluates the gradient of the function f(x) defined wrt the variable x. More...
 
virtual Eigen::MatrixXd get_hessian (const simplex::Simplex &variable_simplex) const =0
 get_hessian evaluates the hessian of the function f(x) defined wrt the variable x. More...
 
Meshmesh ()
 
const Meshmesh () const
 
PrimitiveType attribute_type () const
 
int64_t embedded_dimension () const
 
const attribute::MeshAttributeHandleattribute_handle () const
 
virtual std::vector< simplex::Simplexdomain (const simplex::Simplex &variable_simplex) const =0
 

Private Attributes

Meshm_mesh
 
attribute::MeshAttributeHandle m_handle
 

Detailed Description

Definition at line 9 of file Function.hpp.

Constructor & Destructor Documentation

◆ Function()

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

Definition at line 7 of file Function.cpp.

References wmtk::attribute::MeshAttributeHandle::holds(), wmtk::attribute::MeshAttributeHandle::is_same_mesh(), and m_mesh.

Here is the call graph for this function:

◆ ~Function()

virtual wmtk::function::Function::~Function ( )
inlinevirtual

Definition at line 13 of file Function.hpp.

Member Function Documentation

◆ attribute_handle()

const attribute::MeshAttributeHandle& wmtk::function::Function::attribute_handle ( ) const
inline

Definition at line 51 of file Function.hpp.

References m_handle.

◆ attribute_type()

PrimitiveType wmtk::function::Function::attribute_type ( ) const
inline

Definition at line 49 of file Function.hpp.

References m_handle, and wmtk::attribute::MeshAttributeHandle::primitive_type().

Referenced by wmtk::function::LocalNeighborsSumFunction::get_gradient(), wmtk::function::LocalNeighborsSumFunction::get_hessian(), and wmtk::function::LocalNeighborsSumFunction::get_value().

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

◆ domain()

virtual std::vector<simplex::Simplex> wmtk::function::Function::domain ( const simplex::Simplex variable_simplex) const
pure virtual

◆ embedded_dimension()

int64_t wmtk::function::Function::embedded_dimension ( ) const

Definition at line 15 of file Function.cpp.

References wmtk::attribute::MeshAttributeHandle::dimension(), wmtk::attribute::MeshAttributeHandle::is_valid(), and m_handle.

Referenced by wmtk::function::LocalNeighborsSumFunction::get_gradient(), wmtk::function::LocalNeighborsSumFunction::get_hessian(), and wmtk::function::LocalNeighborsSumFunction::get_value().

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

◆ get_gradient()

virtual Eigen::VectorXd wmtk::function::Function::get_gradient ( const simplex::Simplex variable_simplex) const
pure virtual

get_gradient evaluates the gradient 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::VectorXd The gradient of the function. The dimension of the vector is equal to the dimension of the embedded space.

Implemented in wmtk::function::LocalNeighborsSumFunction.

◆ get_hessian()

virtual Eigen::MatrixXd wmtk::function::Function::get_hessian ( const simplex::Simplex variable_simplex) const
pure virtual

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.

Implemented in wmtk::function::LocalNeighborsSumFunction.

◆ get_value()

virtual double wmtk::function::Function::get_value ( const simplex::Simplex variable_simplex) const
pure virtual

Given a function f(x), get_value evaluate the function at the input simplex.

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

Implemented in wmtk::function::LocalNeighborsSumFunction.

◆ mesh() [1/2]

Mesh& wmtk::function::Function::mesh ( )
inline

Definition at line 47 of file Function.hpp.

References m_mesh.

Referenced by wmtk::function::LocalNeighborsSumFunction::domain(), wmtk::function::LocalNeighborsSumFunction::get_gradient(), wmtk::function::LocalNeighborsSumFunction::get_hessian(), wmtk::function::LocalNeighborsSumFunction::get_value(), and wmtk::function::LocalNeighborsSumFunction::LocalNeighborsSumFunction().

Here is the caller graph for this function:

◆ mesh() [2/2]

const Mesh& wmtk::function::Function::mesh ( ) const
inline

Definition at line 48 of file Function.hpp.

References m_mesh.

Member Data Documentation

◆ m_handle

attribute::MeshAttributeHandle wmtk::function::Function::m_handle
private

Definition at line 58 of file Function.hpp.

Referenced by attribute_handle(), attribute_type(), and embedded_dimension().

◆ m_mesh

Mesh& wmtk::function::Function::m_mesh
private

Definition at line 57 of file Function.hpp.

Referenced by Function(), and mesh().


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